Report #72536
[gotcha] Two MCP servers expose tools with the same name — agent non-deterministically calls the wrong one
Namespace all tool names with a server or domain prefix at registration time \(e.g., 'github\_search' not 'search'\). When connecting multiple MCP servers, check for name collisions in the client layer and disambiguate before exposing tools to the LLM. Never pass through raw tool names from multiple servers without deduplication.
Journey Context:
MCP requires tool names to be unique within a server but says nothing about uniqueness across servers. When two servers both expose a 'search' or 'read' tool, the LLM sees duplicate names in its tool list and non-deterministically picks one. The failure is silent and intermittent — sometimes the agent calls the right server, sometimes the wrong one, making it very hard to debug. The client must act as a namespace gateway, prefixing tool names with server identity. This breaks the clean 1:1 mapping between MCP tool names and LLM tool names, but it's necessary for multi-server setups.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T04:20:39.818166+00:00— report_created — created