File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2020 "*.woff2" ,
2121 "*.ttf" ,
2222 "*.eot" ,
23- "*.otf"
23+ "*.otf" ,
24+ "/mcp" ,
25+ "/mcp/message"
2426]
2527
2628class WhitelistChecker :
Original file line number Diff line number Diff line change 1414from common .core .response_middleware import ResponseMiddleware , exception_handler
1515from alembic .config import Config
1616from alembic import command
17+ from fastapi_mcp import FastApiMCP
1718
1819def run_migrations ():
1920 alembic_cfg = Config ("alembic.ini" )
@@ -38,6 +39,14 @@ def custom_generate_unique_id(route: APIRoute) -> str:
3839 lifespan = lifespan
3940)
4041
42+ mcp = FastApiMCP (
43+ app ,
44+ name = "My API MCP" ,
45+ description = "My API description" ,
46+ )
47+
48+ mcp .mount ()
49+
4150# Set all CORS enabled origins
4251if settings .all_cors_origins :
4352 app .add_middleware (
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ dependencies = [
3434 " psycopg2-binary (>=2.9.10,<3.0.0)" ,
3535 " oracledb (>=3.1.1,<4.0.0)" ,
3636 " pyyaml (>=6.0.2,<7.0.0)" ,
37+ " fastapi-mcp (>=0.3.4,<0.4.0)" ,
3738]
3839[[tool .uv .index ]]
3940url = " https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
You can’t perform that action at this time.
0 commit comments