feat: any code

This commit is contained in:
junjun
2025-06-09 16:04:03 +08:00
parent 09a0bc8c63
commit 53964a3f90
3 changed files with 13 additions and 1 deletions
+3 -1
View File
@@ -20,7 +20,9 @@ wlist = [
"*.woff2",
"*.ttf",
"*.eot",
"*.otf"
"*.otf",
"/mcp",
"/mcp/message"
]
class WhitelistChecker:
+9
View File
@@ -14,6 +14,7 @@ from common.core.config import settings
from common.core.response_middleware import ResponseMiddleware, exception_handler
from alembic.config import Config
from alembic import command
from fastapi_mcp import FastApiMCP
def run_migrations():
alembic_cfg = Config("alembic.ini")
@@ -38,6 +39,14 @@ app = FastAPI(
lifespan=lifespan
)
mcp = FastApiMCP(
app,
name="My API MCP",
description="My API description",
)
mcp.mount()
# Set all CORS enabled origins
if settings.all_cors_origins:
app.add_middleware(
+1
View File
@@ -34,6 +34,7 @@ dependencies = [
"psycopg2-binary (>=2.9.10,<3.0.0)",
"oracledb (>=3.1.1,<4.0.0)",
"pyyaml (>=6.0.2,<7.0.0)",
"fastapi-mcp (>=0.3.4,<0.4.0)",
]
[[tool.uv.index]]
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"