mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 21:14:17 +02:00
PR Feedback
This commit is contained in:
parent
f03578047b
commit
e3cacdf3af
2 changed files with 2 additions and 6 deletions
|
|
@ -482,9 +482,6 @@ class FastMCPProxy(FastMCP):
|
|||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
if "name" not in kwargs:
|
||||
kwargs["name"] = self.generate_name()
|
||||
|
||||
# Handle client and client_factory parameters
|
||||
if client is not None and client_factory is not None:
|
||||
raise ValueError("Cannot specify both 'client' and 'client_factory'")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from fastmcp.mcp_config import (
|
|||
MCPConfig,
|
||||
MCPServerTypes,
|
||||
)
|
||||
from fastmcp.server.proxy import ProxyClient
|
||||
from fastmcp.server.proxy import FastMCPProxy, ProxyClient
|
||||
from fastmcp.server.server import FastMCP
|
||||
|
||||
|
||||
|
|
@ -29,7 +29,6 @@ def mcp_server_type_to_servers_and_transports(
|
|||
mcp_server: MCPServerTypes,
|
||||
) -> tuple[str, FastMCP[Any], ClientTransport]:
|
||||
"""A utility function to convert each entry of an MCP Config into a transport and server."""
|
||||
import secrets
|
||||
|
||||
from fastmcp.mcp_config import (
|
||||
TransformingRemoteMCPServer,
|
||||
|
|
@ -40,7 +39,7 @@ def mcp_server_type_to_servers_and_transports(
|
|||
transport: ClientTransport
|
||||
|
||||
client_name = ProxyClient.generate_name(f"MCP_{name}")
|
||||
server_name = FastMCP.generate_name(f"MCP_{name}")
|
||||
server_name = FastMCPProxy.generate_name(f"MCP_{name}")
|
||||
|
||||
if isinstance(mcp_server, TransformingRemoteMCPServer | TransformingStdioMCPServer):
|
||||
server, transport = mcp_server._to_server_and_underlying_transport(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue