Skip to content

MCP server reconnect failure gives no diagnostic information #34744

Description

@kovan

Problem

When an MCP server fails to connect or reconnect (via /mcp), the only feedback is:

Failed to reconnect to <server-name>.

There is no additional information about why it failed — no stderr output, no exit code, no timeout indication, nothing. This makes debugging MCP server startup issues extremely difficult.

Expected behavior

The error message should include at least:

  • The command that was attempted
  • stderr output from the failed process (if any)
  • Whether it was a timeout vs crash vs connection refused
  • The exit code if the process exited

For example:

Failed to reconnect to hn.
  Command: bash -c "exec clojure -M -m hn.mcp"
  Exit code: 1
  stderr: Exception in thread "main" java.io.FileNotFoundException: ...

Context

I'm building custom MCP servers (Clojure stdio servers). When they fail to start, the only way to debug is to manually run the command in a terminal and see what happens. The /mcp dialog gives zero diagnostic info.

claude mcp get <name> sometimes reports ✓ Connected even when /mcp in-session fails to reconnect, which adds to the confusion.

Environment

  • Claude Code on Linux (WSL2)
  • MCP servers configured via claude mcp add-json --scope user
  • stdio transport

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions