Skip to main content
MCPServer wraps a FastMCP app as an ASGI endpoint. Tools defined in Python become callable over the Model Context Protocol from Claude, Cursor, or your own agents, running on the cluster with the image, secrets and GPU you give it.
server.py
levers9 deploy prints the URL; FastMCP’s streamable HTTP transport answers at /mcp under it, and clients send the workspace token as a bearer header. A JSON client config carries the same header:
Pass authorized=True every time. The server holds your secrets and maybe a GPU, and a public one lets anyone with the URL call every tool. authorized=False makes it public on purpose, for example for a client that can’t send a header. If you leave it out, the server is public, as it always was, and deploy and serve warn you; a later release makes True the default. MCPServerArgs(fastmcp_version="2.7.1") pins the FastMCP release installed in the image. Everything from Parameters applies: keep_warm_seconds, autoscaler, volumes, gpu.