r/modelcontextprotocol • u/Automatic-Pea8220 • Jun 16 '25
Can one MCP server depend on another MCP server
For my use case I have 4 MCP servers as dependencies. I know one client can connect to one server, but I’m not sure how connecting one server to another would work. Do I have to create 4 clients for my host?
18
Upvotes
1
u/AchillesDev Jun 17 '25
Why do you want to connect servers to each other? Which SDK are you using?
There are a few approaches you can use (and I've used them all), at least with the Python SDK:
3
u/Smart-Town222 Jun 16 '25
There’s no one to one mapping. A single client can connect to multiple servers. Streamable http servers will have their own urls, which is what the client will use.
1
u/GladRelationship9779 Jun 17 '25
Yeah, I built an agent but instead of using chat as the interface, created tools which can be connected via MCP and then that agent calls various tools using MCP
1
u/glassBeadCheney Jun 17 '25
connect all of the servers to your client application (which should have some kind of McpHub or multi-client manager) and write a workflow for the AI to perform using all the tools.
1
u/trickyelf Jun 17 '25
SessionGroups are oddly unique to the Python SDK and do not appear in the specification or schema. Reliance on out-of-spec actors for architectural decisions is risky, as they are ripe for removal as the spec evolves and parity between the SDKs is sought. That said, If it is a solid feature, there’s a chance it will make it into the spec and eventually all the other SDKs.
1
u/trickyelf Jun 16 '25
A Server can itself be a Client. Or the Host can maintain multiple Clients and coordinate communications between them. The architecture you choose is up to you.