ProxyProvider for proxying to remote MCP servers.This module provides the ProxyProvider class that proxies components from
a remote MCP server via a client factory. It also provides proxy component
classes that forward execution to remote servers.
Provider that proxies to a remote MCP server via a client factory.This provider fetches components from a remote server and returns Proxy*
component instances that forward execution to the remote server.All components returned by this provider have task_config.mode=“forbidden”
because tasks cannot be executed through a proxy.Methods:
Return empty list since proxy components don’t support tasks.Override the base implementation to avoid calling list_tools() during
server lifespan initialization, which would open the client before any
context is set. All Proxy* components have task_config.mode=“forbidden”.
A FastMCP server that acts as a proxy to a remote MCP-compliant server.This is a convenience wrapper that creates a FastMCP server with a
ProxyProvider. For more control, use FastMCP with add_provider(ProxyProvider(…)).
A proxy client that forwards advanced interactions between a remote MCP server and the proxy’s connected clients.Supports forwarding roots, sampling, elicitation, logging, and progress.
A proxy client that provides a stateful client factory for the proxy server.The stateful proxy client bound its copy to the server session.
And it will be disconnected when the session is exited.This is useful to proxy a stateful mcp server such as the Playwright MCP server.
Note that it is essential to ensure that the proxy server itself is also stateful.Methods: