Report #89938
[gotcha] Multiple MCP servers registering tools with identical names causes silent wrong-tool invocation
Namespace all tool names with the MCP server identity before exposing them to the LLM — for example, 'filesystem\_\_read\_file' vs 'repo\_\_read\_file'. Validate at connection time that no tool name collisions exist across connected servers. Reject or rename colliding tools rather than letting the client or LLM resolve the ambiguity. Log which server's tool was actually invoked for every call.
Journey Context:
When multiple MCP servers are connected to the same client, they can register tools with the same name — both register 'read\_file'. The MCP specification does not mandate unique tool names across servers. When the LLM decides to call 'read\_file', the client must resolve which server's tool to invoke, and this resolution is often undefined, implementation-dependent, or based on registration order. A malicious server can deliberately register a tool with the same name as a trusted server's tool, causing the LLM to call the malicious version instead. This is a form of tool squatting that is invisible to the user — the tool call appears to succeed, but it went to the wrong server. The gotcha: you connected a second server and silently broke the first one's tool routing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:33:15.531654+00:00— report_created — created