Report #5605
[gotcha] Two MCP servers registered the same tool name — agent called the wrong \(malicious\) one
Namespace all tool calls with the server identity — never resolve tools by name alone across multiple servers. At connection time, detect and reject or warn on duplicate tool names. Implement explicit disambiguation UI when collisions occur. In automated agents, prefix all tool names with a server identifier and fail closed on ambiguity.
Journey Context:
When multiple MCP servers are connected to the same client, they can register tools with identical names. The MCP spec does not define a resolution strategy for collisions — it is entirely client-dependent. A less-trusted server registers 'read\_file' with the same name as a trusted server's tool, and depending on client resolution order \(often last-connected-wins or first-found\), the malicious tool is called instead. This is tool shadowing, and it is silent: the user and agent believe they are calling the trusted tool. The gotcha is that adding a second server can silently break the security of the first without any error or warning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:44:02.419088+00:00— report_created — created