[BUG] Claude Code sends ~20 tools/list requests on a single MCP connection and accumulates tools (8 → 160)
Title:
Claude Code sends ~20 tools/list requests on a single MCP connection and accumulates tools (8 → 160)
Body:
### What happened
On connecting to a remote MCP server, Claude Code issues ~20 tools/list
requests within ~5 seconds of a single connection, and accumulates the
results in the tool list instead of replacing. The server exposes 8 tools, but
Claude Code's /mcp panel shows 160 (8 × ~20).
### Environment
- Claude Code: 2.1.218 (latest;
claude updatereports up to date) - OS: macOS
- MCP server: stdio server wrapped by
mcp-proxy0.12.0, behind nginx - Transport: reproduced on both
--transport http(streamable-http) and
--transport sse; and with mcp-proxy both stateful and --stateless
- Server capability:
capabilities.tools.listChanged = false
(so this is NOT notification-driven)
### Steps to reproduce
- Run any MCP server behind mcp-proxy (streamable-http
/mcpendpoint).
Server returns 8 tools for tools/list.
claude mcp add --transport http <name> https://<host>/<path>/mcp --header "Authorization: Bearer <token>"- Open Claude Code, connect the server, open
/mcp.
### Expected
Fetch tools/list once per connection (or replace on refresh). Show 8 tools.
### Actual
Claude Code sends ~20 tools/list in one connect and shows 8 × 20 = 160 tools
(the 8 tool names repeated ~20 times).
### Evidence (server access log, one Claude Code connect)
POST /mcp 200 (initialize)
POST /mcp 202 (notifications/initialized)
GET /mcp 200 (open stream)
POST /mcp 200 method=tools/list <-- repeated ~20x within ~5s
POST /mcp 200 method=tools/list
... (about 20 times) ...
### Cross-check (server is correct)
curlcallingtools/listdirectly returns 8 tools (once).- Codex connecting to the SAME endpoint shows the correct 8 tools.
- Reproduced on 3 different Macs, fresh windows/conversations.
So the server + proxy return 8 correctly; only Claude Code inflates to 160.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗