MCP tools permanently removed from session after transient server disconnect, even after reconnection
Description
When an MCP server experiences a transient disconnect mid-conversation, Claude Code injects a system message permanently removing all tools from that server for the remainder of the session. Even if the server reconnects (confirmed via /mcp showing "connected"), the tools remain unavailable — ToolSearch returns no matches and the tools cannot be invoked.
Steps to reproduce
- Start a Claude Code session with an MCP server configured (in this case, Notion OAuth-based MCP)
- Use the MCP tools successfully for several interactions
- Wait for a transient server disconnect (timeout, OAuth token refresh, process crash/restart)
- Observe the system message: "The following deferred tools are no longer available (their MCP server disconnected). Do not search for them — ToolSearch will return no match"
- Run
/mcp— server shows as connected - Attempt to use
ToolSearchto find the tools — returns no matches - Tools are permanently unavailable for the rest of the session
Expected behavior
If the MCP server reconnects successfully (as shown by /mcp), the tools should be re-injected into the active session's tool registry. A transient disconnect should not permanently remove tools.
Actual behavior
Tools are permanently removed from the conversation context. The only recovery is starting a new session.
Environment
- Platform: macOS (Darwin 25.2.0, Apple Silicon)
- MCP server type: Notion (OAuth-based,
@anthropic-ai/mcp-notion) - Claude Code version: current as of 2026-03-23
- Model: claude-opus-4-6
Impact
Mid-session loss of MCP tools forces users to abandon work-in-progress and start a new session. For long-running sessions with significant context built up, this is disruptive. The disconnect between /mcp status (connected) and actual tool availability (removed) is confusing.
Suggested fix
Either:
- Re-inject tool definitions when a disconnected MCP server reconnects
- Mark tools as temporarily unavailable (with retry) rather than permanently removed
- Allow a
/mcp refreshor similar command to re-register tools from connected servers
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗