Feature Request: Auto-reconnect for MCP servers when disconnected

Resolved 💬 3 comments Opened Dec 31, 2025 by nikhilchowdhury-nixet Closed Feb 15, 2026

Problem

MCP servers disconnect intermittently during sessions (every few runs/commands). Currently, the only way to reconnect is manually running /mcp, which interrupts workflow.

Current Behavior

  • MCP servers disconnect without warning during active sessions
  • No automatic reconnection attempt is made
  • User must manually run /mcp to reconnect
  • This is disruptive when relying on MCP tools (postgres, github, etc.)

Desired Behavior

  1. Auto-reconnect: When an MCP server disconnects, Claude Code should automatically attempt to reconnect
  2. Configurable retry: Allow configuration for:
  • Number of retry attempts
  • Retry interval/backoff
  • Whether to notify user on reconnect
  1. Graceful degradation: Only stop attempting reconnection if:
  • User explicitly disables the server
  • Max retries exceeded (with user notification)
  • Server is explicitly removed from config

Proposed Configuration

{
  "mcpServers": {
    "postgres": {
      "command": "...",
      "autoReconnect": true,
      "maxRetries": 5,
      "retryIntervalMs": 3000
    }
  }
}

Impact

This would significantly improve the experience for users who rely on MCP servers for database access, GitHub integration, and other tools during development sessions.

Environment

  • OS: Windows (MINGW64)
  • Claude Code: Latest version

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗