Kaballas commited on
Commit
d229d59
·
1 Parent(s): a02de1f
Files changed (1) hide show
  1. app.py +6 -3
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
- # Get the FastMCP HTTP app
6
- app = mcp.http_app()
7
 
8
- # Add health endpoint to the FastMCP app
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):