dev
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
PORT=47173
|
||||
MCPPORT=47174
|
||||
DEBUG_MODE=True
|
||||
WORKERS=1
|
||||
REDIS_URL=redis://localhost:6379/1
|
||||
@@ -5,6 +5,7 @@ class Config(BaseSettings):
|
||||
DEBUG_MODE: bool = True
|
||||
WORKERS: int = 1
|
||||
PORT:int = 27173
|
||||
MCPPORT: int = 27174
|
||||
REDIS_URL: str = 'redis://localhost:6379/1'
|
||||
|
||||
class Config:
|
||||
|
||||
@@ -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