mcp-asgi-http¶
Mount an MCP server on an ASGI app over Streamable HTTP. Optional request auth. Works when ASGI lifespan is off (Mangum on Lambda).
from fastapi import FastAPI
from mcp_asgi_http import ApiKeyAuth, mount_mcp
api = FastAPI(redirect_slashes=False)
app = mount_mcp(api, server, auth=ApiKeyAuth(allowed_keys={"dev-secret"}))
Where to go¶
- Quickstart
- Auth
- Serverless
- Samples (including live demos when deployed)
- Blog