feat: update config & deps

This commit is contained in:
Sun-ZhenXing
2025-07-14 15:14:38 +08:00
parent 7d9b5e0679
commit 43c7a970dd
10 changed files with 277 additions and 93 deletions

View File

@@ -2,11 +2,7 @@ import contextlib
from fastapi import FastAPI
from .app.math import mcp as math
MCP_MAP = {
"math": math,
}
from .config import MCP_MAP
@contextlib.asynccontextmanager
@@ -25,6 +21,11 @@ async def root():
return {"message": "Welcome to the MCP Template Python Server!"}
@app.get("/health")
async def health():
return {"status": "healthy"}
for name, mcp in MCP_MAP.items():
app.mount(f"/{name}/compatible", mcp.sse_app())
app.mount(f"/{name}", mcp.streamable_http_app())