How does claude choose the correct service when there are multiple MCP servers #120
Replies: 5 comments 4 replies
-
I guess you'll need to set up keyword triggers in your MCP server code. Like the Correct me if i'm wrong @jspahrsummers |
Beta Was this translation helpful? Give feedback.
-
I generally mention in my prompt use xyz tool for this purpose |
Beta Was this translation helpful? Give feedback.
-
I have a similar question. What if there are multiple servers that expose tools with the same name. The console(https://console.anthropic.com/) does not allow you to add two tools with the same name (makes sense), but MCP must allow it. |
Beta Was this translation helpful? Give feedback.
-
There was a similar question in the Anthropic Discord: https://discord.com/channels/1072196207201501266/1323580910079185008/1323580910079185008 Someone gave this answer: I'm not sure exactly where he pulled that level of detail, but it's similar to how Claude's Tool Use is documented:
So I'd say the answer to your question
is basically: the tools get stuffed into the system prompt, and from there the "selection" gets made the same way any prompt is processed; by the black box that is the foundational LLM. I don't think Claude is designed to elegantly handle name clashes, and unless they change the way tool calling is implemented to be more structured in some way, that's a problem that is more likely to be solved at the MCP specification level than in Claude itself. |
Beta Was this translation helpful? Give feedback.
-
I think server name and description will work on client side. But when I try to make a proxy server that can aggregate other server tools, I cannot distinguish tool calls from client side (they just send in tool name, description and schema). I tried to hack by prefixing a namespace using server name but tool name has a regex validation of ^[a-zA-Z0-9_-]{1,64}$ so I cannot split out the server name as namespace.. Is there any support planned on explicit namespace of tools? Thanks. |
Beta Was this translation helpful? Give feedback.
-
Pre-submission Checklist
Question Category
Your Question
When I configure multiple MCP servers, how does claude determine which service to call when I input a sentence, does claude have fields such as desc as prompts, and how to configure it? Thank you
Beta Was this translation helpful? Give feedback.
All reactions