Skip to content

MCP server connections drop silently and require manual /mcp reconnection #24350

@happytalkAL

Description

@happytalkAL

Problem

MCP server connections are frequently dropped during a session. The MCP server itself does not initiate disconnection — the connection appears to be terminated by Claude Code internally (possibly due to idle timeout or context compression).

When this happens, all MCP tool calls fail silently or with errors, and the only recovery method is for the user to manually run /mcp in the CLI.

Expected Behavior

  • Claude Code should automatically detect when an MCP server connection has been lost
  • Claude Code should automatically attempt to reconnect to MCP servers before failing tool calls
  • Or at minimum, provide a clear error message indicating the MCP connection was lost

Current Workaround

Users must manually run /mcp to reconnect when they notice MCP tools are no longer responding.

Feature Request

Add automatic MCP server reconnection capability, so that:

  1. When an MCP tool call fails due to a disconnected server, Claude Code automatically attempts reconnection
  2. If reconnection succeeds, the tool call is retried transparently
  3. If reconnection fails, a clear error message is shown to the user suggesting /mcp

Environment

  • Platform: macOS (Darwin 25.1.0)
  • Claude Code CLI
  • MCP server: db-gateway (but likely affects all MCP servers)

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions