Usage Guide¶
The Litestar MCP plugin follows a simple mental model: mark routes → the
plugin discovers them → clients interact via the MCP transport. These
pages cover each piece of that pipeline in isolation, with runnable
examples drawn from docs.examples.
Configure MCPConfig, task lifecycle, and
environment overrides.
Expose handlers with mcp_tool / mcp_resource kwargs or the
dedicated decorator.
How marked routes are registered, executed, and returned to MCP clients.
The /.well-known/* manifests the plugin publishes automatically.
Bearer-token validation, OIDC providers, and mapping claims to users.
Plugin ordering, guards, OpenAPI, and custom base paths.
The docs/examples/notes/ family chooser: Advanced Alchemy
vs SQLSpec, no-auth/JWT/Cloud Run/IAP, with uvx run-first
guidance.
Sticky routing on Mcp-Session-Id, shared session stores,
and multi-replica notes for Cloud Run / GKE.