mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 13:34:17 +02:00
Replace FastMCP.as_proxy() with create_proxy() function (#2829)
This commit is contained in:
parent
d8351993f7
commit
3163e61ee4
16 changed files with 341 additions and 124 deletions
|
|
@ -46,13 +46,13 @@ server2 = FastMCP("Server2", providers=[provider])
|
|||
|
||||
### ProxyProvider
|
||||
|
||||
`ProxyProvider` (`src/fastmcp/server/providers/proxy.py`) proxies components from remote MCP servers via a client factory. Used by `FastMCP.as_proxy()` and `FastMCP.mount()` for remote server integration.
|
||||
`ProxyProvider` (`src/fastmcp/server/providers/proxy.py`) proxies components from remote MCP servers via a client factory. Used by `create_proxy()` and `FastMCP.mount()` for remote server integration.
|
||||
|
||||
```python
|
||||
from fastmcp import FastMCP
|
||||
from fastmcp.server import create_proxy
|
||||
|
||||
# Create proxy to remote server
|
||||
server = FastMCP.as_proxy("http://remote-server/mcp")
|
||||
server = create_proxy("http://remote-server/mcp")
|
||||
```
|
||||
|
||||
### OpenAPIProvider
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue