We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f18358b commit 721b481Copy full SHA for 721b481
src/mcp/server.py
@@ -3,7 +3,7 @@
3
from __future__ import annotations
4
5
from fastapi import FastAPI
6
-from fastmcp import FastMCP
+from fastmcp import FastMCP, settings
7
8
9
def build_mcp(app: FastAPI) -> FastMCP:
@@ -15,6 +15,7 @@ def build_mcp(app: FastAPI) -> FastMCP:
15
if hasattr(app.state, 'mcp'):
16
return app.state.mcp # type: ignore[attr-defined]
17
18
+ settings.experimental.enable_new_openapi_parser = True
19
mcp = FastMCP.from_fastapi(app, name=app.title)
20
app.state.mcp = mcp # type: ignore[attr-defined]
21
return mcp
0 commit comments