litestar-mcp

litestar-mcp is a skill for Claude Code from litestar-org/litestar-skills. It costs 68 tokens per session (3,856 once invoked), scanned A, original, MIT.

A Litestar extension for exposing selected web routes as Model Context Protocol tools, resources, and prompts over JSON-RPC, a format for structured requests between software systems.

In plain words
What is it for?
Use it to mark Litestar handlers as callable tools, readable resources, or reusable prompts, including through stateless POST requests or stdio.
Why use it?
It lets a Litestar application make selected endpoints available to AI clients using MCP’s tool and resource model.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the litestar plugin — 20 skills, 1 agent shipped together

Good fit Use it to mark Litestar handlers as callable tools, readable resources, or reusable prompts, including through stateless POST requests or stdio.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/litestar-org/litestar-skills/litestar-mcp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add litestar-org/litestar-skills --skill litestar-mcp
Clone the repo
git clone --depth 1 https://github.com/litestar-org/litestar-skills

Made for: Claude Code.

Or install litestar, the plugin that ships this one along with the rest of its 20 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for litestar-mcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/litestar-org/litestar-skills/litestar-mcp/github.svg)](https://agentmods.dev/skills/litestar-org/litestar-skills/litestar-mcp)
Your own site
<a href="https://agentmods.dev/skills/litestar-org/litestar-skills/litestar-mcp"><img src="https://agentmods.dev/badge/skills/litestar-org/litestar-skills/litestar-mcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for litestar-mcp

Your own site · 80×15
<a href="https://agentmods.dev/skills/litestar-org/litestar-skills/litestar-mcp"><img src="https://agentmods.dev/badge/skills/litestar-org/litestar-skills/litestar-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,856 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 267
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • low MCP Rug Pull · line 25
    pip install without ==version installs the latest release, which could include malicious changes.
    Fix: Pin the version: pip install package==1.2.3
  • low MCP Rug Pull · line 497
    pip install without ==version installs the latest release, which could include malicious changes.
    Fix: Pin the version: pip install package==1.2.3
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.03856
Opus 5.5 $0.00027 $0.01542
Sonnet 5.5 $0.00014 $0.00771
Haiku 4.5 $0.00007 $0.00386

Measured today against content hash d181a2a960ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

litestar-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/litestar-mcp/SKILL.md · 251 lines

How it starts

The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.

litestar-mcp

litestar-mcp 0.21.0 exposes explicitly marked Litestar route handlers as Model Context Protocol (MCP) tools, resources, and prompts over JSON-RPC 2.0, and provides an optional A2A 1.0 adapter (LitestarA2A / agent_to_a2a) backed by a2a-sdk.

It implements Streamable HTTP 2026-07-28 (stateless default via server/discover and subscriptions/listen on POST /mcp) plus 2025-11-25, 2025-06-18, and 2025-03-26 session compatibility (Mcp-Session-Id, initialize, GET/DELETE /mcp).

Code Style Rules

  • Async all I/O; standalone @mcp.tool / @mcp.resource / @mcp.prompt callables may be sync only when non-blocking.
  • Bind typed request bodies (JSONBody[Struct] or msgspec.Struct DTOs) on marked POST/PUT/PATCH routes instead of untyped dict[str, Any] parameters.
  • Mark routes directly with mcp_tool="name", mcp_resource="name", or mcp_prompt="name" kwargs (Litestar stores them in handler.opt); leave internal routes unmarked.

Quick Reference

pip install litestar-mcp          # core + httpx2 stdio bridge + streaming providers
pip install "litestar-mcp[a2a]"   # optional A2A 1.0 adapter (a2a-sdk)

Capability & Transport Routing

Need Primary Surface Endpoint / Notes
Add MCP to existing Litestar app LitestarMCP(MCPConfig(...)) POST /mcp (GET/DELETE for 2025-* sessions only)
Standalone MCP or stdio server MCP(...) + @mcp.tool / resource / prompt app = mcp.app or mcp.run(transport="stdio")
Serve SKILL.md bundles (skill://) MCPSkillsConfig / Skill.from_content skills/list, skills/get, resources/directory/read
Reusable tool/prompt bundles SkillController / PromptController Registered via MCPConfig or routers
A2A 1.0 agent adapter LitestarA2A / agent_to_a2a(..., enable_http_json=True) POST /a2a, HTTP+JSON REST, /.well-known/agent-card.json
Durable MCP tasks & workflows QueueTaskExecutor / DurableWorkflowEngine Auto-enabled when QueuePlugin is registered
Distributed agent chat SSE QueuedAgentChatController + agent_turn_channel Owner-scoped channels via emit_agent_frame
Model provider streaming (httpx2) litestar_mcp.agent.providers Lazy exports (AnthropicProvider, OpenAIProvider, etc.)
Route auth & RFC 9728 metadata MCPConfig(auth=required(...)) + SecurityPlugin /.well-known/oauth-protected-resource

Read the full file on GitHub · 251 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · -122 lines d181a2a960ea
  2. 13d ago Changed 4f2d8fd8fbf7
  3. 23d ago Changed · -6 lines 51c13d682638
  4. 1mo ago Changed · -639 lines · -3 tokens per session 6c4fd8659c28
  5. 1mo ago Changed · +276 lines · +3 tokens per session b67760c7aabf
  6. 2mo ago Changed · +103 lines · +2 tokens per session 1fafb6fc8099
  7. 2mo ago Changed · +10 lines · -24 tokens per session 2b0e6cb66463
  8. 3mo ago First seen · 629 lines · 90 tokens per session scan A 3723d902b639

Subscribe to this mod's changes

litestar-mcp is a skill published in the GitHub repository litestar-org/litestar-skills (19 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 3,856 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

litestar-mcp compared with skills from other repositories

litestar-mcp next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
litestar-mcplitestar-org/litestar-skillsSkill19todayMITA68Claude Code
add-server-logicmicrosoft/power-platform-skillsSkill1.2ktodayMITA83Claude Code
integrate-webapimicrosoft/power-platform-skillsSkill1.2ktodayMITA105Claude Code
add-cloud-flowmicrosoft/power-platform-skillsSkill1.2ktodayMITA91Claude Code
integrate-backendmicrosoft/power-platform-skillsSkill1.2ktodayMITA86Claude Code
migrate-webapi-selectallmicrosoft/power-platform-skillsSkill1.2ktodayMITA141Claude Code
generate-codeful-mcp-toolmicrosoft/power-platform-skillsSkill1.2ktodayMITA71Claude Code