from dedalus_mcp import MCPServer, tool@tool(description="Add two numbers")def add(a: int, b: int) -> int: return a + bserver = MCPServer("calculator")server.collect(add)if __name__ == "__main__": import asyncio asyncio.run(server.serve())
Type hints become JSON Schema automatically. Register tools with collect(). Same pattern works for resources and prompts.
Server name must match your slug. The name in MCPServer("my-server") must match your
deployment slug and ctx.dispatch() calls. This ensures OAuth callbacks and request routing work
correctly.