Repository navigation
v9.4.0
[v9.4.0] - 2026-11-09
A minor release: mount routes as Model Context Protocol tools, and list them with responder routes.
import responder
api = responder.API(mcp=True)
@api.get("/items/{item_id}")
def get_item(req, resp, *, item_id: int):
"""Fetch one item."""
resp.media = {"id": item_id}API(mcp=True) serves Streamable HTTP at /mcp. api.mcp("/agents") mounts it on another path. Tool names, descriptions, and input schemas come from the route, its docstring, and the types you already wrote. A tool call is a normal in-process request, so validation, dependencies, and auth hooks still apply. Pass mcp=False to leave a route out. There is no extra package to install.
$ responder routes app:api
$ responder routes --json app:api