Feature Request: MCP Tool Caching and Hot-Reload Support

Resolved 💬 2 comments Opened Jan 13, 2026 by Decryptortuning Closed Feb 27, 2026

Summary

MCP tools are only discovered at Claude Code startup. If an MCP server isn't running when Claude Code starts, those tools are unavailable for the entire session. This creates a poor user experience for MCP servers that depend on external applications (like Ghidra, IDEs, or other GUI tools) that may not be running at Claude Code launch time.

Problem Description

Current Behavior

  1. Claude Code starts and reads ~/.claude/mcp.json
  2. Attempts to connect to each configured MCP server
  3. Discovers tools dynamically via MCP protocol
  4. If a server is down → no tools discovered → tools unavailable for entire session
  5. Tool list is fixed for session lifetime - no way to refresh

Real-World Impact

Many valuable MCP integrations depend on external applications:

  • Ghidra (reverse engineering) - must have GUI open with program loaded
  • IDE integrations - editor must be running
  • Database tools - connections may not be ready at startup
  • Docker-based servers - containers may start after Claude Code

Users must carefully orchestrate startup order: start all MCP dependencies first, wait for them to be ready, then start Claude Code. If anything restarts mid-session, those tools become unavailable until Claude Code is restarted.

Proposed Solutions

Option 1: Hot-Reload MCP Tools (Preferred)

Add a command to re-discover MCP tools mid-session:

/mcp-reload                    # Reload all MCP servers
/mcp-reload ghidrassistmcp     # Reload specific server

Benefits:

  • Server comes online → user runs /mcp-reload → tools become available
  • No session restart required
  • Simple mental model

Option 2: Tool Schema Caching

Cache last-known tool definitions to disk:

~/.claude/mcp-cache/
  ghidrassistmcp.json    # Cached tool schemas
  ghydramcp.json

Behavior:

  • If server is down at startup, load cached tool definitions
  • Mark tools as "cached/unverified"
  • When tool is called, attempt to connect to server
  • If server now available, validate cached schema matches
  • Refresh cache when server responds

Benefits:

  • Tools always available if previously discovered
  • Graceful degradation when servers are temporarily down
  • Lazy connection - don't block startup

Option 3: Background Retry with Notification

  • If MCP server fails at startup, retry connection periodically in background
  • When server becomes available, notify user: "MCP server 'ghidrassistmcp' is now available (40 tools)"
  • Integrate newly discovered tools into session

Environment

  • Claude Code version: Latest (as of Jan 2025)
  • OS: Linux (Ubuntu-based)
  • MCP servers affected: Any server depending on external applications

Use Case: Ghidra Integration

I use GhidrAssistMCP which provides 40 tools for reverse engineering:

  • get_program_info(), decompile_function(), xrefs_to(), etc.
  • Server runs inside Ghidra GUI on port 8888
  • Ghidra must be open with a program loaded before the MCP server is available

Current workflow (frustrating):

  1. Open Ghidra, load binary
  2. Enable GhidrAssistMCP plugin (Window → GhidrAssistMCP)
  3. Verify port 8888 is listening
  4. Only then start Claude Code
  5. If Ghidra crashes or restarts → must restart Claude Code too

Desired workflow:

  1. Start Claude Code anytime
  2. Open Ghidra when needed
  3. Run /mcp-reload or have tools auto-discover
  4. Continue working seamlessly

Additional Context

The MCP protocol itself supports dynamic tool discovery - servers can add/remove tools at runtime. Claude Code could leverage this by periodically re-querying tool lists or providing manual refresh capability.

This would significantly improve the developer experience for MCP integrations that depend on external applications, making the MCP ecosystem more practical for real-world workflows.

View original on GitHub ↗

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