Repository navigation
List same-named tools of every connector on a server - #1309
Merged
Merged
Conversation
helpcodeai
enabled auto-merge (squash)
October 28, 2026 08:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When several connectors on one MCP server expose a tool with the same name, only the first copy was listed and every call went to the first connector. Every DATABASE connector has
execute_query,get_database_schemaandget_example_queries, so a server with two databases served only one of them (#1296). The same happens with two configs of one catalog provider on one server.Now:
sales_db_execute_query. The name stays within 64 characters and gets a_2suffix if two connectors have the same name.connectorIds: [tool.connectorId]), not in the server's whole list. Before, the registry returned the first connector with that name.The executor lookup is unchanged, so the global
/mcpendpoint is not affected.Changes
planToolSet(mcp-endpoint.controller.ts): dedupe by connector instead of by name, prefix the extra copies, label shared names, scope execution to the tool's connector.connectorScopedToolNamehelper, reusingslugifyForPrefixfrom the GraphQL built-ins.Type
Testing
Commands, in
packages/backendafternpm ciandprisma generate:npx jest src/mcp-server: 28 suites, 503 tests passed.mcp-endpoint.controller.spec.tswith the old controller: 5 of 52 failed (the new tests).npx tsc --noEmit -p tsconfig.json: clean.npx eslinton the two changed files: clean.Cloud and self-hosted behave the same. On a server with a single connector per tool name nothing changes.
Checklist
Related Issues
Fixes #1296