Kaballas's picture
zx
2617623
raw
history blame
804 Bytes
from fastapi import FastAPI
from fastmcp import create_server # ➊ import the FastMCP factory
# ── Parent FastAPI app ───────────────────────────────────────────
app = FastAPI()
# ── Mount the existing FastMCP server under /sse/ ────────────────
#
# FastMCP already returns a FastAPI/Starlette app, so you can plug it
# straight into your main application.
#
vector_app = create_server(transport="sse") # keep any flags you need
app.mount("/sse", vector_app) # /sse/ now serves the API
# ── Minimal health-check route for Hugging Face and Docker ───────
@app.get("/", tags=["health"])
async def root():
return {"status": "ok"}