fastmcp.client.group
Coordination of independent MCP client connections.
Classes
ToolRoute
The client and upstream name behind a public group tool name.
ClientGroup
Coordinate independent clients without introducing a proxy server.
Each client retains its own transport, session, capabilities, and protocol
version. The group only combines tool discovery and routes tool calls.
Callers may manage the clients’ connections themselves or use the group as
a convenience context manager. The group’s context is reentrant in the
same way a client’s is: entries are reference counted, the first entry
connects every client, and the last exit disconnects them. Entering an
already-connected FastMCP client is likewise safe because client contexts
are reference counted.
Methods:
clients
from_config
mode field. It applies
only to that server; entries without one use default_mode.
protocol_versions
list_tools
cache_mode="refresh": a client-side response cache
(SEP-2549) is repopulated rather than served, and the routes reflect
what every server advertises now. Pass cache_mode="use" to allow
cache hits when staleness within the server’s hint is acceptable.

