MCP tool list cached by server name — adding new tools requires renaming server
Resolved 💬 4 comments Opened Mar 27, 2026 by Kyle01 Closed Apr 27, 2026
Summary
Claude Code caches the MCP tool list by server name and does not invalidate the cache when the server's tools/list response changes. This means adding new tools to an MCP server is invisible to Claude Code until the server is renamed in .mcp.json.
Reproduction
- Configure an MCP server in
.mcp.jsonwith name"foo"that registers 5 tools - Start Claude Code —
/mcpshows 5 tools. Correct. - Update the server to register 15 tools (same binary, same path)
- Restart Claude Code —
/mcpstill shows 5 tools. Bug. - Rename the server in
.mcp.jsonfrom"foo"to"foo-bar"(samecommandandargs) - Restart Claude Code —
/mcpshows 15 tools. Workaround confirms cache is keyed by name.
Investigation
- Verified the server correctly returns all 15 tools via direct stdio
tools/listJSON-RPC call - Verified no tool filtering in any Claude Code settings (
settings.json,settings.local.json,.mcp.json) - Verified
ENABLE_TOOL_SEARCHis set to"false" - Created a separate test MCP server with 15 tools and identical payload sizes (~11KB) — Claude Code showed all 15 tools for the test server, but still only 5 for the original
"foo"server - Disabling other MCP servers (e.g., Playwright with 22 tools) did not free up tool slots for the
"foo"server — ruling out a total tool budget - The only fix was renaming the server in
.mcp.json
Expected behavior
Claude Code should re-discover tools from MCP servers on each startup (or when tools/list responses change), not serve a stale cached list keyed solely by server name.
Environment
- Claude Code CLI (latest)
- macOS Darwin 25.2.0
- MCP server: custom stdio server using
@modelcontextprotocol/sdk1.27.1
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗