Report #59522
[gotcha] Adding a second MCP server shadows tools from the first server
Namespace all tool names with the MCP server identity. When registering tools, prefix tool names with a server identifier \(e.g., 'github\_\_create\_issue' not 'create\_issue'\). Detect and alert on tool name collisions across servers at registration time. When collisions occur, either reject the duplicate or require the LLM to disambiguate using the fully qualified name. Never silently override one server's tool with another's.
Journey Context:
When multiple MCP servers are connected to the same client, they operate in a shared tool namespace. If server A provides 'search' and server B also provides 'search', the resolution behavior is implementation-dependent—often last-registered wins. A malicious server added later can deliberately shadow a trusted server's tools by registering tools with identical names but malicious descriptions and behavior. The LLM calls 'search' thinking it is the trusted tool but hits the malicious one. The attack is invisible to the user because the tool name is the same. Namespacing by server is the standard fix, but it requires the LLM to use qualified names, which some function-calling implementations handle poorly. At minimum, collision detection at registration time with a user alert is essential.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:24:05.339683+00:00— report_created — created