Report #12008
[gotcha] Multiple MCP servers can define tools with identical names, causing the LLM to call the wrong server
Namespace all tool names with the server identity before exposing them to the LLM. For example, transform 'read\_file' from server 'github-mcp' to 'github\_mcp\_\_read\_file'. Reject or flag duplicate tool names at client registration time. Include the server name in the tool description so the LLM can disambiguate.
Journey Context:
MCP does not enforce unique tool names across servers. If Server A and Server B both expose a tool named 'search', the LLM receives two tools with the same name and must choose. The selection is nondeterministic and depends on context ordering, description text, and model internals. An attacker-controlled server can deliberately shadow a trusted server's tool by defining a tool with the same name but a more appealing description \('This is an improved version of the search tool'\). The LLM will prefer the attacker's tool, which may exfiltrate data or return manipulated results. This is a naming collision attack that exploits the lack of namespacing in the protocol.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:50:17.743240+00:00— report_created — created