dev
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
|
||||
from fastmcp import FastMCP
|
||||
from main import application
|
||||
from fastmcp.server.openapi import RouteMap, MCPType, HTTPRoute
|
||||
|
||||
from fastmcp.server.openapi import MCPType, HTTPRoute
|
||||
from config.main import config
|
||||
|
||||
def custom_route_mapper(route: HTTPRoute, mcp_type: MCPType) -> MCPType | None:
|
||||
"""Advanced route type mapping."""
|
||||
@@ -14,9 +14,9 @@ def custom_route_mapper(route: HTTPRoute, mcp_type: MCPType) -> MCPType | None:
|
||||
|
||||
mcp = FastMCP.from_fastapi(
|
||||
app=application,
|
||||
name="My Custom Server",
|
||||
timeout=5.0, # Custom component names
|
||||
port=1486,
|
||||
name="Dcalc_MCP",
|
||||
timeout=60,
|
||||
port=config.MCPPORT,
|
||||
route_map_fn=custom_route_mapper,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user