Changelog¶
All notable litestar-mcp changes are summarized here. Entries are grouped by release and focus on user-visible behavior, public API changes, compatibility notes, and protocol fixes.
v0.18.0¶
Features¶
-
Support distributed MCP Tasks on
litestar-queuesviaQueueTaskExecutor(#104) AddedQueueTaskExecutorso long-running MCP Tasks run on workers managed bylitestar-queues(optionalqueuesextra). Set it onMCPTaskConfig(executor=...)and registerQueuePluginon the same app;LitestarMCPattaches the executor's task dependencies to the queue during app init.MCPTaskConfig.executoris typed by theMCPTaskExecutorprotocol, so the core package never importslitestar-queues. Supports fail-closed principal loading (principal_loader), cooperative cancellation, cross-replica resumption oninput_required, and internal job dispatch decoupling.MCPTaskStore.updatereturns merged responses andMCPTaskStore.createtakes a keyword-onlylocal. Thequeuesextra now requireslitestar-queues>=0.13.0, whose standalone workers run the application lifespan, so MCP Tasks and durable workflows execute on every worker placement. -
Support durable workflow execution on
litestar-queuesviaDurableWorkflowEngine(#104) AddedDurableWorkflowEngine,WorkflowStore,WorkflowRun, andNodeRecordinlitestar_mcp.queuesfor durable, distributed DAG workflows.DurableWorkflowEngine(workflows)is a Litestar plugin: registered next toQueuePluginit attaches its task dependencies, stores records in the app'sstoresregistry (litestar_mcp_workflows), and provides itself as theworkflow_enginedependency. Provides idempotent node scheduling with reservation cleanup, at-least-once node execution, per-run watchdog ticks that recover lost advances, configurable run timeouts, and rejects immediate execution backends when the watchdog is active. -
Infer configuration that previously had to be spelled out (#104)
mcp_tool,mcp_resource, andmcp_promptdecorators defaultnameto the function name, and the route opt keys acceptTrue(@get("/users", mcp_tool=True)) to do the same.- Resources advertise the route's
media_typeas their MIME type when nomcp_resource_mime_type/mime_typeoverride is set. MCPTaskConfig.storedefaults to the app'sstoresregistry entrylitestar_mcp_tasks, so a sharedStoreRegistrycovers MCP Tasks.AgentRuntimeis a Litestar plugin that provides itself as theruntimedependency used byAgentChatController.LitestarA2Aaccepts anAgentExecutorin place of aRequestHandlerand wraps it inDefaultRequestHandlerwith anInMemoryTaskStore.
v0.17.0¶
Features¶
-
Support MCP
ToolAnnotationsvia route opt keys and HTTP method inference (#103) AddedToolAnnotations,MCPOptKeys.annotations(mcp_annotations),MCPOptKeys.read_only(mcp_read_only), andMCPConfig.infer_http_method_annotationsso Litestar routes and@toolcallables serializereadOnlyHint,destructiveHint,idempotentHint,openWorldHint, andtitleundertools/listannotations. -
Support dual-version stateless Streamable HTTP negotiation (#103) Added
SUPPORTED_PROTOCOL_VERSIONS(2026-07-28,2025-06-18,2025-03-26) so/mcpnegotiates both2026-07-28(server/discoverwith SEP-2575 request header validation) and2025-06-18/2025-03-26(initialize,notifications/initialized,ping,202 Acceptednotifications, and204 No ContentonDELETE /mcp) on a single stateless endpoint. -
Honor route handler description, strip docstring DI sections, and add
export-tool-specCLI (#103) Updatedextract_description_sourcesandstrip_docstring_sectionsto honorhandler.description/handler.summaryand strip Google, Sphinx, and NumPy parameter/return/raises docstring sections from top-level tool, resource, and prompt descriptions while preserving per-parameter descriptions ininputSchema.properties. Addedlitestar mcp export-tool-specto export static{"tools": [...]}manifests without booting the ASGI server. -
Support
LitestarA2Aroute opt discovery, tenant resolution, andHTTP+JSONtransport (#103) AddedA2AConfig.agent_card_route_opt,A2AConfig.tenant_header, andA2AConfig.enable_http_jsonsoLitestarA2AdiscoversAgentCardmetadata from routeoptdictionaries, propagates tenant context fromX-A2A-Tenantheaders and/{tenant}/...routes intoServerCallContext.state["tenant"], and serves the A2A v1.0HTTP+JSONREST binding alongside JSON-RPC 2.0.
v0.16.0¶
Breaking Changes¶
- Make
SkillCatalogaccessors asynchronous and request-awareSkillCatalog.skills,list_page,get_by_uri,read_file, andread_directoryare nowasyncmethods accepting an optionalRequestso dynamicSkillSourcebackends can resolve skills per caller. Direct callers inspecting a static filesystem snapshot can readFilesystemSkillSource(paths).skills.
Features¶
-
Add request-aware
SkillSourceprotocol and dynamic skill composition Added theSkillSourceprotocol,FilesystemSkillSource, in-memorySkill.build/Skill.from_contentandSkillFile.from_contentconstructors, andMCPSkillsConfig.sourcesso applications can serve caller-scoped, database-backed, or lazily loaded Agent Skills over MCP alongside static filesystem folders while preserving SHA-256 manifest integrity verification. -
Support universal dependency injection and nested router discovery for tools and controllers
@tool,SkillController, andPromptControllernow resolve LitestarProvide/Dependencyproviders, DishkaFromDishka[T]dependencies, third-partyAnnotated[T, Inject()]/Depends(fn)markers, and customToolContext(container=..., dependency_resolver=...)hooks across HTTP endpoints, MCPtools/call/prompts/get, and standaloneAgentRuntimeturns.LitestarMCPalso recursively discovers and deduplicatesSkillControllerandPromptControllerclasses mounted inside nestedRouterandDishkaRoutertrees.
v0.15.0¶
Features¶
- Agent abstractions, class-based controllers, and Google GenAI runtime Added high-level agent primitives integrating directly with Litestar:
- Class-based
PromptControllerandSkillControllercompile each method into an internal route handler preserving Litestar guards and dependency injection providers. Class instructions are automatically prepended to the first user message, adhering to MCP's user/assistant role constraint. - Core
Tooland@toolabstraction with type-based context injection (ToolContext,ASGIConnection,Request) and strictmsgspecargument validation. - Hierarchical
AgentandAgentGroupmodels with non-mutating coordinator boundaries andLiteral-typedtransfer_to_agenttools. GoogleGenAIClientdefaulting togemini-3.8-flashwith automatic thought signature and provider call ID preservation, structured function response envelopes, thinking token tracking, and sharedhttpx2client support.- Pluggable
SessionStoreimplementations (MemorySessionStoreandLitestarStoreSessionStore) with per-session locks, TTL eviction, and strict owner scoping. - Realtime SSE chat streaming via
AgentChatControllerwith typedAgentStreamFramestructures, keepalive pings, andLast-Event-IDcursor recovery. - Concurrent in-process DAG execution engine via
DynamicWorkflowandWorkflowEnginewith ready queue scheduling and upstream output passing. - Protocol bridges for bidirectional MCP (
agent_to_mcp,mcp_to_tools,discover_mcp_tools) and A2A 1.0 (agent_to_a2a). - OpenTelemetry observability using vendor-neutral GenAI semantic conventions (
invoke_agent,execute_tool) withenable_spans=Falsedefault matchingsqlspec.
v0.14.0¶
Breaking Changes¶
-
Move the HTTP client to
httpx2and drop thebridgeextra The runtime dependency onhttpxis replaced byhttpx2. The stdio bridge reads server-sent events withhttpx2's built-inEventSource, so thebridgeextra andhttpx-sseare gone, andmax_message_sizenow bounds each incoming event as well as each stdin message. -
Require modern MCP requests and canonical APIs
MCP.run()now defaults totransport="streamable-http"and rejects the removed"sse"selector. UseMCPRequestContextandMCPTaskStoreinstead of the removed MCPRequestContextandInMemoryTaskStorealiases. Missing, null, boolean, container, and fractional request IDs are rejected before tool dependency resolution, execution, or stream allocation. Current task, subscription, cache, and application-session settings remain available. -
Remove the built-in OIDC auth backend and protected-resource manifest Removed
litestar_mcp.auth,litestar_mcp.manifests,MCPConfig.auth,MCPConfig.register_oauth_protected_resource, and/.well-known/oauth-protected-resource. Authentication is the app's Litestar middleware (litestar-securityor a customAbstractAuthenticationMiddleware); declare an opt-based policy withMCPConfig.route_optand publish RFC 9728 metadata from the security plugin. The runtime dependency islitestarinstead oflitestar[jwt]. -
Bound subscription queues
MCPConfig.stream_queue_capacity(default256) bounds eachsubscriptions/listenqueue. A subscriber that falls behind receives theresultType: "complete"response for its subscription and is then closed instead of growing memory without limit. -
Group the package into
core,mcp,a2a, andutilslitestar_mcp.coreholds the protocol-agnostic primitives (JSON-RPC, subscription streams, schema building, serialization, typing, exceptions);litestar_mcp.mcpholds the MCP plugin, configuration, routes, executor, registry, tasks, bridge, and CLI;litestar_mcp.a2aholds the optional A2A adapter;litestar_mcp.utilskeeps the decorators and signature helpers. Root imports are unchanged andlitestar_mcp.A2AConfig/litestar_mcp.LitestarA2Aresolve lazily without importinga2a-sdkat package import time. Deep module paths moved without compatibility aliases; see Migration Guide: v0.14.
Features¶
-
Serve Agent Skills over MCP Added
MCPSkillsConfigand the opt-inio.modelcontextprotocol/skillsextension, which loads a static catalog of<path>/<name>/SKILL.mdfolders once at startup.skills/listandskills/getreturn each skill's frontmatter and a SHA-256 manifest of its files, andresources/directory/readlists the entries directly under a skill directory whendirectory_readis enabled. Skill files themselves are served through the existingresources/readmethod underskill://<name>/<relative-path>URIs, alongside handler-declared resources. -
Add Litestar-native in-process stdio serving Added
litestar mcp stdio,run_stdio_async, and a streaming ASGI transport. Standalone stdio now runs through the application's real MCP route, lifespan, middleware, guards, and dependency system; the HTTP bridge remains available for already-running servers. -
Add standards-backed optional A2A support Added
litestar-mcp[a2a]and the narrowlitestar_mcp.a2a.A2AConfig/LitestarA2Aadapter around the official A2A 1.0 SDK. Litestar owns HTTP, JSON, SSE, guards, middleware, and disconnect cleanup; the optional extra uses barea2a-sdk. The RPC route is exempt from CSRF, hidden from OpenAPI unlessA2AConfig.include_in_schemais set, validates the request'sA2A-Versionheader regardless of the configured context builder, reportsscope["user"]objects that carryis_authenticatedas such, and serves the agent card withETagandCache-Control. Only A2A 1.0 is accepted: requests must sendA2A-Version: 1.0(or a1.0.xpatch version) and use the 1.0 method names and protobuf JSON shapes.A2AConfig.context_builderreceives(request, context)and may be synchronous or asynchronous. Notifications are answered with HTTP 204 without running the handler, while explicit null IDs still get a response. The card's JSONRPC interface URL may carry a proxy orroot_pathprefix ahead ofA2AConfig.path. An authenticated principal without anid,sub, orusernameis refused unless a context builder supplies the SDK user, so it never shares the anonymous task owner. Requiresa2a-sdk1.1.4 or later. -
Stream progress on the requesting response A request carrying
_meta.progressTokenis answered on its owntext/event-streamresponse:MCPRequestContext.report_progressemitsnotifications/progressthere, followed by the JSON-RPC response. Progress is never fanned out tosubscriptions/listenstreams.
Bug Fixes¶
-
Fix nested tool schemas and harden subscriptions Tool input schemas now hoist the
$defsofmsgspecStructs and nested Pydantic models to the schema root so their$refentries resolve, andattrsclasses are described by their fields. Tool schemas are built once per handler instead of on every request. The cross-worker subscription listener skips undecodable events and resubscribes after a backend error instead of stopping silently, and streams closed at shutdown receive their terminal response.schema_dumpcaches encoder maps by content and returns JSON-safe values for Pydantic models. Unexpected JSON-RPC handler errors no longer send the exception message to the client. -
Close streamed work and use native stdio lifespan Request progress and A2A responses use bounded channels with backpressure and producer-owned iterator cleanup. Configurable cleanup deadlines report incomplete cancellation. Stdio enters native
Litestar.lifespan(); the public manualapp_lifespanhelper is removed. Its shutdown timeout applies after successful startup; application hooks own bounded, shielded startup unwind.
v0.13.2¶
Bug Fixes¶
- Resolve tool wire names from
Parameter(name=...)(#93, closes #92) A parameter whose wire alias came fromQueryParameter(name=...)orParameterKwarg(name=...)was advertised and dispatched under its Python name, so Litestar never read it and the handler ran as if the argument had never been sent. This made everyadvanced-alchemyfilter provider silently inert over MCP. Wire names now resolve from.name, and header/cookie parameters are excluded from query wire-name resolution. Advertised names change for affected parameters (for examplecategory_name_inbecomescategoryNameIn). For compatibility, the Python name is still accepted at dispatch and rewritten to the wire name, logging a warning; the wire name wins when both are sent.
Miscellaneous¶
- Correct the contributor clone URL (#91)
The README development instructions now clone the canonical
cofin/litestar-mcprepository.
v0.13.1 (2026-08-24)¶
Bug Fixes¶
- Preserve native dispatch for controllers and request bodies (#94)
MCP tools declared on controllers now resolve path parameters without requiring route handlers to support weak references. Path metadata is cached per application so separate Litestar applications remain isolated. Omitted request bodies now use the handler's declared default, while explicit falsey JSON bodies such as
null,false,0, empty strings, empty lists, and empty objects are passed through unchanged.
v0.13.0 (2026-08-19)¶
Features¶
- Configure MCP router options and discovery route ownership (#88)
Added
MCPConfig.route_optfor mounted-router policies and separate controls for registering the OAuth protected-resource metadata and agent-card discovery routes. Applications can now let another plugin own the RFC 9728 root path without a duplicate-route startup failure.
v0.12.0 (2026-07-29)¶
Breaking Changes¶
- Stateless MCP 2026-07-28
MCP is now POST-only and request-scoped. The initialize handshake, sessions, ping, GET/DELETE transport handlers, replay, and the experimental MCP server manifest were removed. Every request carries protocol, client, method, name, and custom-header metadata; use
server/discoverfor capabilities.
Features¶
-
Tasks, subscriptions, and MRTR Added filtered
subscriptions/listenstreams, the opt-inio.modelcontextprotocol/tasksextension, durable Litestar Store task records, and typed multi-round-tripinput_requiredresults for tools, resources, and prompts. -
Concurrent stdio bridge The bridge now forwards independent request-scoped POST streams concurrently, multiplexes subscription responses, maps cancellation to stream closure, and lazily maps annotated tool parameters to MCP headers.
v0.11.1¶
Bug Fixes¶
- Hide MCP plugin discovery routes from OpenAPI by default
MCPConfig.include_in_schema=Falsenow hides the plugin-owned/.well-known/oauth-protected-resource,/.well-known/agent-card.json, and/.well-known/mcp-server.jsonroutes from generated OpenAPI schemas, matching the existing default behavior for the/mcptransport route. Marked application routes remain visible in OpenAPI unless the application hides them separately, andinclude_in_schema=Trueopts all MCP plugin routes back in.
v0.11.0¶
Features¶
- Support binary resources and explicit tool content blocks
Adds
MCPResourceLink,MCPBlobResource, andMCPToolResulthelpers for protocol-shaped tool results. Marked resources can now advertise MIME metadata withmcp_resource_mime_typeormcp_resource(..., mime_type=...)andresources/readreturns binary handler responses as base64blobcontents. Embedded blobs are capped byMCPConfig.max_blob_bytesbefore encoding; set it toNoneto rely on deployment or client limits instead.
v0.10.0¶
Features¶
-
Add a Litestar CLI stdio bridge for Streamable HTTP (#79) Adds
litestar --app my_app:app mcp bridgeand thelitestar-mcp[bridge]extra for stdio-only MCP clients that need to reach a running Litestar MCP app. The command is registered by theLitestarMCPCLI plugin, defaults to the loaded app'sMCPConfig.base_path, and supports base URL overrides, explicit endpoints, discovery from/.well-known/mcp-server.json, static headers, token providers, stream errors, and session cleanup. It shields stdio output from accidental applicationprintcalls, reports unreachable endpoints with a bridge-owned error message, and caps each stdin JSON-RPC message at 16 MiB by default, configurable with--max-message-size. The bridge is implemented directly onhttpxand optionalhttpx-sseand does not depend on the officialmcpPython SDK or its server-side transport dependencies. -
Support authenticated stdio principals (#76, closes #74) Adds public
MCPStdioContextsupport forMCP.run(transport="stdio", stdio_context=...). Standalone stdio dispatch now seeds synthetic Litestar scopes withuser,auth, copiedsession, copiedstate, and a resolvedowner_idso tools, resources, prompts, guards, and task execution can run on behalf of a process-local principal. -
Allow custom auth headers and token prefixes (#77, closes #75)
MCPAuthBackendnow acceptsheader_nameandtoken_prefixoptions. ExistingAuthorization: Bearerdeployments keep the default behavior, while identity proxy deployments such as Google Cloud IAP and AWS ALB OIDC can validate raw or custom-prefixed JWTs from their provider-specific headers.
Bug Fixes¶
-
Honor custom base paths in standalone internal routes (#79) Standalone
MCP.tool(),MCP.resource(), andMCP.prompt()internal dispatch routes now followMCPConfig.base_pathinstead of hard-coding/mcp/internal/.... -
Return the correct SSE content type for GET streams (#79)
GET /mcpnow advertisestext/event-streamso strict SSE clients accept the Streamable HTTP event stream. -
Reduce routine lifecycle log noise (#76, closes #73) Routine startup, registry callback, and router-invalidation lifecycle messages are now logged at debug level instead of warning level.
Miscellaneous¶
- Align reference and security documentation (#78, #79)
Adds reference coverage for
MCP,MCPStdioContext, auth helpers, tool-call callback protocols, and the bridge API. Also adds security guidance for domain authorization, bridge identity boundaries, and safe file/path arguments.
v0.9.0 (2026-06-29)¶
Breaking Changes¶
- Tighten standalone transport internals (#70)
Internal transport callers now pass a
RequestContexttoJSONRPCRouter.dispatch().litestar_mcp.routes.build_jsonrpc_routeris no longer exported, and handler-signature helpers moved tolitestar_mcp.utils.handler_signature. Applications should prefer the publicMCPandLitestarMCPentry points instead of private router construction.
Features¶
- Add a standalone MCP application surface (#70, closes #71, #72)
Adds
MCP(...)for applications whose primary surface is an MCP server. Standalone apps can register@mcp.tool,@mcp.resource, and@mcp.promptcallables, lazily exposemcp.app, pass normal Litestar app and route-handler options, run SSE through the Litestar CLI, and run line-delimited stdio JSON-RPC while manually driving ASGI lifespan.
Miscellaneous¶
- Clean up runtime, docs, and optional dependency internals (#70) Refreshes examples, snippet coverage, optional Dishka dependency-key handling, router caching/session plumbing, framework-native serialization paths, release tooling, and Python 3.14 CI coverage.
v0.8.0 (2026-06-24)¶
Features¶
- Add tool-call observability callbacks (#69, closes #68)
Adds
MCPConfig.before_tool_callandMCPConfig.after_tool_callhooks aroundtools/calldispatch for audit, metrics, and tracing use cases. The after hook receives either the result or exception plus elapsed dispatch duration, and hook failures are logged without changing tool-call behavior.
Bug Fixes¶
- Exclude Dishka-resolved provider params from tool inputs (#69, closes #67)
Litestar
Provide(...)factory parameters whose annotated type can be resolved fromapp.state.dishka_containerare no longer emitted as MCP tool arguments. Ordinary provider-declared inputs, such as pagination and filter values, still appear in schemas and dispatch.
v0.7.2 (2026-06-11)¶
Bug Fixes¶
- Include provider-declared query parameters in MCP schemas (#65, closes #64) Query parameters declared on Litestar dependency providers now appear in MCP tool input schemas and are forwarded during tool execution, so provider-backed pagination and aliases are discoverable and callable by MCP clients.
v0.7.1 (2026-06-09)¶
Bug Fixes¶
-
Fix published project URLs (#60) Corrects package metadata links so the project URL points at the GitHub repository and the documentation URL points at the published docs site.
-
Return 202 for accepted Streamable HTTP notifications (closes #61) Accepted JSON-RPC notifications over MCP Streamable HTTP now return
202 Acceptedwith an empty body, matching the MCP transport requirement for accepted JSON-RPC notifications and responses sent via POST. -
Apply filters to direct tool and resource invocation (closes #62)
include_*andexclude_*filters now gate directtools/callandresources/readinvocation in addition to list responses. A filtered tool, resource, or resource template is treated like an unknown name or URI. Filters narrow the MCP exposure surface; Litestar guards and auth middleware remain the access-control boundary.
v0.7.0 (2026-06-07)¶
Features¶
- Paginate MCP list methods (#58, closes #47)
Adds opaque cursor pagination for MCP list methods so clients can page through tools, resources, resource templates, and prompts using
nextCursor.
Bug Fixes¶
-
Converge handler signature introspection (#58, closes #49) Uses the same handler-signature introspection path for schema generation and execution-time argument handling, reducing drift between advertised input schemas and accepted call arguments.
-
Document the MCP primitive error contract (#58, closes #48) Locks and documents the primitive-level error contract for tools, resources, and prompts. Handler HTTP status is preserved in error data where relevant instead of minting non-standard JSON-RPC codes.
Miscellaneous¶
- Document MCP Prompts end-to-end (#58, closes #56) Adds Prompts coverage across the usage guide, API reference, README, and task-manager example.
v0.6.0 (2026-06-04)¶
Features¶
- Add MCP Prompts support (#46)
Adds MCP Prompts support, including prompt discovery and retrieval via
prompts/listandprompts/get.
Bug Fixes¶
- Unwrap
Annotatedparameters in input schemas (#53, closes #52) UnwrapsAnnotated[T, Parameter(...)]declarations when generating MCP tool input schemas so Litestar parameter metadata does not hide the underlying value type.
Miscellaneous¶
- Update for Litestar 3 deprecations (#54) Updates runtime, docs, and tests for Litestar 3 deprecation paths.
v0.5.1 (2026-04-19)¶
Bug Fixes¶
- Restore full Litestar execution parity (#44, closes #41, #42, #43) Runs MCP tool execution through the full Litestar request lifecycle for hooks, renamed fields, and path-parameter coercion.
v0.5.0 (2026-04-19)¶
Breaking Changes¶
- Remove scope enforcement and
authextra (#40) Removes inline scope enforcement so scopes are discovery metadata and Litestar guards are the access-control surface. The legacyauthextra was removed and auth dependencies now install with the core package.
Features¶
- Add consumer-readiness features (#40)
Adds structured tool/resource descriptions, resource templates,
resources/templates/list,completion/complete, injectable JWKS cache support, and well-known discovery documents.
Miscellaneous¶
- Refresh docs and examples for consumer usage (#40)
Raises the supported Python floor to 3.10, renames bundled examples to
hello_worldandtask_manager, adds example tests and snippet markers, and updates docs to prefer Litestar route kwargs such asmcp_tool="name".
v0.4.0 (2026-04-16)¶
Features¶
- Switch to Streamable HTTP (#32)
Replaces the legacy REST endpoint surface with MCP Streamable HTTP, using
GET /mcpfor SSE andPOST /mcpfor JSON-RPC requests.
Miscellaneous¶
- Add database integration test matrix (#34) Adds database-backed integration coverage for Advanced Alchemy, SQLSpec, Dishka, and auth-mode combinations.
v0.3.0 (2026-03-22)¶
Features¶
- Align with MCP JSON-RPC, transport, and auth specs (#13) Adds MCP spec compliance for JSON-RPC 2.0, Streamable HTTP, and OAuth auth bridging.
v0.2.2 (2025-09-30)¶
Bug Fixes¶
- Remove duplicate CLI
pass_contextdecorator (#6) Removes a duplicatepass_contextdecorator from CLI commands.
v0.2.1 (2025-09-28)¶
Features¶
- Add Litestar CLI plugin integration (#5) Implements Litestar CLI plugin integration.
v0.2.0 (2025-09-27)¶
Features¶
- Add CLI interface (#4) Adds the initial command-line interface.
v0.1.0 (2025-09-06)¶
Features¶
- Initial release
Adds the initial Litestar MCP plugin with route marking via
mcp_toolandmcp_resourcekwargs, automatic route discovery, REST-based MCP endpoints, OpenAPI schema exposure,MCPConfig, and support for tools and resources.