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.
A class wrapping Litestar to register tools, resources, and prompts declaratively.
Expose handlers with mcp_tool / mcp_resource /
mcp_prompt kwargs or the dedicated decorator.
Templated instructions exposed via prompts/list and
prompts/get, including standalone and handler-based forms.
Read-only payloads served via resources/list and
resources/read, with RFC 6570 URI template support.
Executable operations served via tools/list and
tools/call, validated through Litestar signature models.
The /.well-known/* manifests the plugin publishes automatically.
Bearer-token validation, OIDC providers, and mapping claims to users.
Domain authorization, task ownership boundaries, identity sources, and file/path argument guidance.
Connect stdio-only MCP clients to the loaded Litestar app's MCP endpoint.
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 single-file uv run
guidance.
Stateless multi-replica routing, durable task stores, and cross-worker subscription fan-out.
Move initialize-era clients to MCP 2026-07-28 request metadata, extensions, subscriptions, and MRTR.
Connect Google ADK clients to your remote Litestar MCP server.