File size: 569 Bytes
644bdfe
e98f4ed
142e01f
644bdfe
d229d59
 
644bdfe
d229d59
22f28c2
 
 
70a8675
d229d59
 
 
cd37e0c
 
e98f4ed
 
 
 
cd37e0c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from fastapi import FastAPI
from fastapi.routing import APIRoute
from mcp_server_mariadb_vector.server import mcp

# Create the main FastAPI app
app = FastAPI()

# Create a health endpoint on the main FastAPI app
@app.get("/", tags=["health"])
async def root():
    return {"status": "ok"}

# Mount the MCP HTTP app - this exposes all the MCP tool endpoints
app.mount("", mcp.http_app())

print("Registered routes:")
for route in app.routes:
    if isinstance(route, APIRoute):
        print(route.path, route.methods)
    else:
        print(route.path, type(route))