Report #39142
[gotcha] Agent calls the wrong server's tool because two MCP servers expose the same tool name
Namespace all tool names with the server identity at registration time \(e.g., filesystem\_trusted\_\_read\_file vs filesystem\_sandbox\_\_read\_file\). Reject or rename duplicate tool names and surface the collision to the user. Implement explicit server-aware routing so the agent must specify which server context a tool call targets.
Journey Context:
When multiple MCP servers expose tools with identical names — both a 'trusted-filesystem' and a 'sandbox-filesystem' server expose 'read\_file' — the client must resolve the collision. The MCP specification does not define a resolution strategy. Most implementations use first-registered-wins, last-registered-wins, or alphabetical ordering, none of which are security-aware. The agent may intend to call the trusted server's read\_file but actually invoke the sandbox server's version, which could return malicious content, log the request, or fail silently. The user and agent have zero visibility into which server actually handled the call. This is the 'shadowing' attack: an untrusted server deliberately mirrors a trusted server's tool names to intercept calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:10:26.900798+00:00— report_created — created