Skip to content

transport.onerror does not work #525

Open
@uinstinct

Description

@uinstinct

Describe the bug

I want to get the error via the stdiotransport instance's onerror method. I have used pipe for stderr. Still the output does not appear. Maybe I am doing something wrong.

To Reproduce

I made a simple MCP client to replicate this behavior. You can find it here
https://github.com/uinstinct/sample-mcp/blob/e99c8b5c83a761db92e307cef03d452719c74620/src/client.ts#L11-L13

  1. clone the repo
  2. npm run build
  3. npm run client
  4. see that the onerror console log is not printed

Expected behavior
Should output the error from the onerror method

Logs
If applicable, add logs to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions