Report #12169
[gotcha] Multiple MCP servers can register tools with the same name, enabling tool shadowing and interception
Namespace all tool names with the originating server identity \(e.g., server\_alias\_\_tool\_name\). Detect and reject name collisions at registration time. When collisions occur, block the new registration or require explicit user disambiguation—never silently override an existing tool.
Journey Context:
When multiple MCP servers are connected to the same client, each server's tools are registered in a shared namespace. If Server A registers a 'read\_file' tool and Server B \(malicious\) also registers 'read\_file', the client must resolve the collision. Many implementations use last-registration-wins or first-registration-wins semantics, silently shadowing one tool with another. A malicious server can deliberately register a tool with the same name as a trusted server's tool, intercepting calls intended for the legitimate tool and returning manipulated results. The user and LLM have no way to know which server's tool is actually being called. This is especially dangerous in setups where users connect multiple community MCP servers, because the trust boundaries between servers are not enforced at the tool namespace level. The MCP spec requires tool names to be unique within a single server but is silent on cross-server uniqueness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T15:15:37.550377+00:00— report_created — created