MCP servers lose connection after /clear and /exit, requiring manual re-trigger

Resolved 💬 3 comments Opened Mar 7, 2026 by Projazzbone Closed Mar 11, 2026

Description

MCP servers (particularly Notion, but likely all MCP servers) lose their connection after using /clear, /exit, and sometimes /compact. After these commands, MCP tools become unavailable until the user manually triggers a tool call from that server to force lazy-reload.

This is disruptive because:

  1. Users don't realize MCP is disconnected until they're deep into a workflow
  2. There's no automatic reconnection mechanism
  3. The workaround (manually triggering an MCP call) is not obvious

Steps to Reproduce

  1. Start a Claude Code session with MCP servers configured (e.g., Notion via @notionhq/notion-mcp-server)
  2. Verify MCP tools work (e.g., call a Notion read tool)
  3. Run /clear (or /exit and restart)
  4. Attempt to use the same MCP tool — it's no longer available in the deferred tools list

Expected Behavior

MCP servers should automatically reconnect after /clear, /exit, and /compact. At minimum:

  • /compact should preserve MCP connections (it's just context compression, not a session reset)
  • /clear should re-initialize MCP connections as part of the reset
  • After /exit + new claude launch, MCP servers should eagerly connect rather than lazy-load

Current Workaround

Added an "MCP health check" to startup instructions in CLAUDE.md that tells Claude to immediately trigger an MCP tool call on session start to force lazy-reload. This works but shouldn't be necessary.

Environment

  • Claude Code (CLI)
  • macOS (Apple Silicon)
  • MCP servers configured in .claude/settings.json under mcpServers
  • Affected servers: notion-mcp-server, likely all MCP servers

Suggestion

Consider adding an MCP server health check / reconnection step to the /clear and post-/exit initialization flow. Even a simple "ping all configured MCP servers" during startup would prevent this class of issue.

View original on GitHub ↗

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