ClientGroup coordinates several independent FastMCP clients without combining them behind a proxy server. Each client keeps its own connection, negotiated protocol version, capabilities, and handlers. The group adds namespaced tool discovery and routes each call back to the client that advertised the tool.
This differs from passing a multi-server configuration directly to Client. Client(config) presents one aggregate MCP endpoint and therefore selects one protocol era shared by its proxy chain. A ClientGroup retains one MCP connection per configured server, so legacy and modern servers can operate in their native eras at the same time.
Create a group from clients
Construct the clients explicitly when each server needs its own handlers, authentication, or connection settings:get_weather tool exposed by the modern client becomes modern_get_weather.
A group with a single client is a supported way to get namespacing alone: the one server’s tools are presented under its configured name, with no other behavior change.
The first routed call loads the tool catalog lazily. After a successful load, unknown tool names fail locally rather than repeating discovery against every server. Call list_tools() explicitly to refresh the routes when servers add or remove tools dynamically — the explicit call refreshes past any client-side response cache, so the catalog reflects what every server advertises now.
Bind tools to their owning client
Tool adapters — code that turns MCP tools into callables for an agent framework — often need more than routed calls: session-driven input loops, handler context, and interceptors must run on the connection that owns the tool.resolve_tool() returns that route, so an adapter can discover through the group and still bind each generated tool to its real client:
Client supports keeps working per tool.
Create a group from configuration
ClientGroup.from_config creates one client per server rather than passing the entire configuration through a proxy. A FastMCP-specific mode field can select the protocol behavior for each server:
mode use "auto" by default.
Manage connections explicitly
Using the group as a context manager is optional. Applications can own each client connection and use the group only for discovery and routing:Related: SDK session groups
The MCP Python SDK has its own aggregation primitive,ClientSessionGroup, which pools raw ClientSession connections. ClientGroup exists because FastMCP clients carry more than a session: authentication, handlers, caching, result parsing, and protocol negotiation all live on the Client, and routing calls through the client that advertised each tool keeps every one of those intact. Reach for the SDK’s group when working with raw sessions directly; reach for ClientGroup when the servers are already configured as FastMCP clients.
