feat: mcp server

This commit is contained in:
junjun
2025-06-23 14:01:29 +08:00
parent d76e2e0253
commit 961b53d5ea
+2 -3
View File
@@ -43,8 +43,7 @@ app = FastAPI(
lifespan=lifespan
)
mcp_app = FastAPI()
mcp_app.add_middleware(TokenMiddleware)
# mcp_app = FastAPI()
mcp = FastApiMCP(
app,
@@ -53,7 +52,7 @@ mcp = FastApiMCP(
include_operations=["get_datasource_list", "get_model_list", "question"]
)
mcp.mount(mcp_app)
mcp.mount(app)
# Set all CORS enabled origins
if settings.all_cors_origins: