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 | |
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)) | |