File size: 528 Bytes
9682111
 
 
 
f30acce
9682111
a994b2f
 
 
 
 
 
 
 
9682111
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)