eee
Browse files
app.py
CHANGED
@@ -2,14 +2,17 @@ from fastapi import FastAPI
|
|
2 |
from fastapi.routing import APIRoute
|
3 |
from mcp_server_mariadb_vector.server import mcp
|
4 |
|
5 |
-
#
|
6 |
-
app =
|
7 |
|
8 |
-
#
|
9 |
@app.get("/", tags=["health"])
|
10 |
async def root():
|
11 |
return {"status": "ok"}
|
12 |
|
|
|
|
|
|
|
13 |
print("Registered routes:")
|
14 |
for route in app.routes:
|
15 |
if isinstance(route, APIRoute):
|
|
|
2 |
from fastapi.routing import APIRoute
|
3 |
from mcp_server_mariadb_vector.server import mcp
|
4 |
|
5 |
+
# Create the main FastAPI app
|
6 |
+
app = FastAPI()
|
7 |
|
8 |
+
# Create a health endpoint on the main FastAPI app
|
9 |
@app.get("/", tags=["health"])
|
10 |
async def root():
|
11 |
return {"status": "ok"}
|
12 |
|
13 |
+
# Mount the MCP HTTP app - this exposes all the MCP tool endpoints
|
14 |
+
app.mount("", mcp.http_app())
|
15 |
+
|
16 |
print("Registered routes:")
|
17 |
for route in app.routes:
|
18 |
if isinstance(route, APIRoute):
|