Skip to main content
New in version 2.0.0 The Proxy Provider sources components from another MCP server through a client connection. This lets you expose any MCP server’s tools, resources, and prompts through your own server, whether the source is local or accessed over the network.

Why Use Proxy Provider

The Proxy Provider enables:
  • Bridge transports: Make an HTTP server available via stdio, or vice versa
  • Aggregate servers: Combine multiple source servers into one unified server
  • Add security: Act as a controlled gateway with authentication and authorization
  • Simplify access: Provide a stable endpoint even if backend servers change

Quick Start

New in version 2.10.3 Create a proxy using create_proxy():
This gives you:
  • Safe concurrent request handling
  • Automatic forwarding of MCP features (sampling, elicitation, etc.)
  • Session isolation to prevent context mixing
To mount a proxy inside another FastMCP server, see Mounting External Servers.

Transport Bridging

A common use case is bridging transports between servers:
Or expose a local server via HTTP:

Session Isolation

New in version 2.10.3 create_proxy() provides session isolation - each request gets its own isolated backend session:

Shared Sessions

If you pass an already-connected client, the proxy reuses that session:
Shared sessions may cause context mixing in concurrent scenarios. Use only in single-threaded situations or with explicit synchronization.

MCP Feature Forwarding

New in version 2.10.3 Proxies automatically forward MCP protocol features:

Disabling Features

Selectively disable forwarding:

Configuration-Based Proxies

New in version 2.4.0 Create proxies from configuration dictionaries:

Multi-Server Proxies

Combine multiple servers with automatic namespacing:

Component Prefixing

Proxied components follow standard prefixing rules:

Mirrored Components

New in version 2.10.5 Components from a proxy server are “mirrored” - they reflect the remote server’s state and cannot be modified directly. To modify a proxied component (like disabling it), create a local copy:

Performance Considerations

Proxying introduces network latency: When mounting proxy servers, this latency affects all operations on the parent server. For low-latency requirements, consider using import_server() to copy tools at startup.

Advanced Usage

FastMCPProxy Class

For explicit session control, use FastMCPProxy directly:
This gives you full control over session creation and reuse strategies.

Adding Proxied Components to Existing Server

Mount a proxy to add components from another server: