Simply put, this example would work:
@app.get("/items/")
async def list_items():
return ["item 1", "item 2", "item 3"]
add_mcp_server(
app,
mount_path="/mcp",
)
This won't:
add_mcp_server(
app,
mount_path="/mcp",
)
@app.get("/items/")
async def list_items():
return ["item 1", "item 2", "item 3"]
Started from this thread: #18