Dhanushsaireddy144's picture
Fix deploy.py to call sse_app method
f30acce
raw
history blame contribute delete
528 Bytes
from server import mcp
# FastMCP 'sse_app' is often a property that returns the Starlette app
# We assign it to 'app' so uvicorn can find it
app = mcp.sse_app()
from starlette.responses import PlainTextResponse
from starlette.routing import Route
async def home(request):
return PlainTextResponse("MCP Server is Running! Connect your client to /sse")
app.routes.append(Route("/", endpoint=home))
if __name__ == "__main__":
import uvicorn
# Use 7860 for HF Spaces
uvicorn.run(app, host="0.0.0.0", port=7860)