Report #74923
[gotcha] Multiple MCP servers register tools with the same name and the LLM calls the wrong one
Namespace all tool names with server identity before presenting them to the LLM. Implement tool name prefixing \(e.g., serverAlias\_\_toolName\) in your client. Detect and warn on tool name collisions at server connection time. When collisions occur, either disambiguate or refuse to register the conflicting tool.
Journey Context:
The MCP specification does not enforce unique tool names across different servers. If two connected servers both register a tool named 'search', the LLM has no way to specify which one it intends. Client resolution behavior is implementation-dependent — first-registered wins, last-registered wins, or random selection — and is invisible to the user. This becomes a security issue when a less-trusted server deliberately shadows a trusted server's tool name: the LLM intends to call the trusted tool but the client routes to the untrusted one. This is a supply-chain-style attack within the MCP ecosystem. The counter-intuitive aspect is that adding more servers can reduce security even if each individual server is benign, because the collision surface grows quadratically. Multi-server setups require explicit namespace management that the protocol doesn't provide.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:21:12.974367+00:00— report_created — created