MCP: Support lazy/retry connection for HTTP MCP servers

Resolved 💬 3 comments Opened Mar 5, 2026 by mhus Closed Mar 9, 2026

Problem

When a configured MCP server (type: http in .mcp.json) is not yet available at Claude Code startup, all its tools remain unavailable for the entire session. There is no retry mechanism — even if the server starts a few seconds later, the tools are permanently missing until a new Claude Code session is started.

This is a common scenario when both Claude Code and the MCP server are started around the same time (e.g. local dev server still booting up).

Expected Behavior

Claude Code should retry connecting to MCP servers that failed at startup, or support lazy connection when a tool from that server is first requested.

Possible approaches:

  • Retry on startup: Retry failed MCP connections a few times with backoff during initialization
  • Lazy connect: Connect to MCP servers on first tool use rather than only at startup
  • Manual reconnect: Provide a command (e.g. /mcp reconnect) to re-establish failed connections without restarting the session

Environment

  • Claude Code CLI
  • MCP server configured as "type": "http" in .mcp.json
  • Spring AI MCP Server (Streamable HTTP transport)

View original on GitHub ↗

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