Kaballas commited on
Commit
a02de1f
·
1 Parent(s): bf03758
app.py CHANGED
@@ -2,13 +2,10 @@ from fastapi import FastAPI
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
- # Mount the FastMCP HTTP app at /sse
9
- app.mount("/sse", mcp.http_app())
10
-
11
- # Health endpoint
12
  @app.get("/", tags=["health"])
13
  async def root():
14
  return {"status": "ok"}
 
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"}
src/mcp_server_mariadb_vector/server.py CHANGED
@@ -253,7 +253,7 @@ def main():
253
  mcp.run(transport=args.transport)
254
 
255
 
256
- app = mcp.sse_app()
257
 
258
  if __name__ == "__main__":
259
  main()
 
253
  mcp.run(transport=args.transport)
254
 
255
 
256
+ app = mcp.http_app() # Using http_app instead of deprecated sse_app
257
 
258
  if __name__ == "__main__":
259
  main()