ds
Browse files
app.py
CHANGED
@@ -2,14 +2,14 @@ from fastapi import FastAPI
|
|
2 |
from fastapi.routing import APIRoute
|
3 |
from mcp_server_mariadb_vector.server import mcp
|
4 |
|
5 |
-
|
|
|
6 |
|
7 |
@app.get("/", tags=["health"])
|
8 |
async def root():
|
9 |
return {"status": "ok"}
|
10 |
|
11 |
-
|
12 |
-
app.mount("/sse", mcp.http_app())
|
13 |
|
14 |
print("Registered routes in main app:")
|
15 |
for route in app.routes:
|
|
|
2 |
from fastapi.routing import APIRoute
|
3 |
from mcp_server_mariadb_vector.server import mcp
|
4 |
|
5 |
+
mcp_app = mcp.http_app()
|
6 |
+
app = FastAPI(lifespan=mcp_app.lifespan)
|
7 |
|
8 |
@app.get("/", tags=["health"])
|
9 |
async def root():
|
10 |
return {"status": "ok"}
|
11 |
|
12 |
+
app.mount("/sse", mcp_app)
|
|
|
13 |
|
14 |
print("Registered routes in main app:")
|
15 |
for route in app.routes:
|