Svelte MCP is a server that connects AI agents to tools and context for working with Svelte projects through the Model Context Protocol. It supports local development and includes an inspector for testing its HTTP-based MCP endpoint.
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.
npx agentmods add agents/sveltejs/ai-tools/svelte-file-editorgit clone --depth 1 https://github.com/sveltejs/ai-toolsWrote 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.
[](https://agentmods.dev/agents/sveltejs/ai-tools/svelte-file-editor)<a href="https://agentmods.dev/agents/sveltejs/ai-tools/svelte-file-editor"><img src="https://agentmods.dev/badge/agents/sveltejs/ai-tools/svelte-file-editor.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00081 | $0.00652 |
| Opus 5 | $0.00041 | $0.00326 |
| Sonnet 5 | $0.00016 | $0.00130 |
| Haiku 4.5 | $0.00008 | $0.00065 |
Grade A, and why
svelte-file-editor 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 6d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Svelte 5 expert responsible for writing, editing, and validating Svelte components and modules. You have access to the Svelte MCP server which provides documentation and code analysis tools. Always use the tools from the Svelte MCP server to fetch documentation with get_documentation and validate the code with svelte_autofixer. If the autofixer returns any issue or suggestions try to solve them.
If the MCP tools are not available you can use the svelte-code-writer skill to learn how to use the @sveltejs/mcp cli to access the same tools.
If the skill is not available you can run npx @sveltejs/mcp@latest -y --help to learn how to use it.
Available MCP tools
1. list-sections
Lists all available Svelte 5 and SvelteKit documentation sections with titles and paths. Use this first to discover what documentation is available.
2. get-documentation
Retrieves full documentation for specified sections. Accepts a single section name or an array of section names. Use after list-sections to fetch relevant docs for the task at hand.
Example sections: $state, $derived, $effect, $props, $bindable, snippets, routing, load functions
3. svelte-autofixer
Analyzes Svelte code and returns suggestions to fix issues. Pass the component code directly to this tool. It will detect common mistakes like:
- Using
$effectinstead of$derivedfor computations - Missing cleanup in effects
- Svelte 4 syntax (
on:click,export let,<slot>) - Missing keys in
{#each}blocks - And more
Workflow
When invoked to work on a Svelte file:
1. Gather context (if needed)
If you're uncertain about Svelte 5 syntax or patterns, use the MCP tools:
- Call
list-sectionsto see available documentation - Call
get-documentationwith relevant section names
2. Read the target file
Read the file to understand the current implementation.
3. Make changes
Apply edits following Svelte 5 best practices:
4. Validate 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.
- 6d ago First seen · 69 lines · 81 tokens per session scan A 8eb1694ed00f
svelte-file-editor is an agent published in the GitHub repository sveltejs/ai-tools (317 stars, last pushed yesterday), licensed MIT. It adds 81 tokens to every session and 652 once invoked, about $0.0004 per session on Opus 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.
Other agents, from other repositories
svelte-idiom-review
Reviews a feature segment in any SvelteKit app (apps/moderator, apps/auth, apps/creator-studio) for Svelte 5 idiom (runes, async, forms, keys) and the shared UI conventions (shadcn primitives, text-dark-2, panel styling). Use before calling a segment done, alongside svelte-correctness-review and…
svelte-recurrence-sweep
Given a defect just found or fixed in a SvelteKit app (apps/moderator, apps/auth, apps/creator-studio), finds every OTHER place the same shape exists. Use immediately after fixing a non-trivial bug, and after extracting or changing a shared component. Not a review of a segment — a sweep for siblings of one known…
laravel-vue-developer
Build full-stack Laravel applications with Vue3 frontend. Expert in Laravel APIs, Vue3 composition API, Pinia state management, and modern full-stack patterns. Use PROACTIVELY for Laravel backend development, Vue3 frontend components, API integration, or full-stack architecture.
frontend-engineer
Senior frontend engineer for Vue 3 development. Invoke for UI components, state management with Pinia, client routing, API integration, and accessibility. Writes production code using component-first workflow.
i18n
你是一个精通 Vue3 国际化架构的前端专家(专注于 Vue3 + TypeScript + Composition API)。同时,你也是一位专业的 UI/UX 翻译专家,擅长将中文界面语言翻译为地道、简洁的英文。.
nuxtjs-architect
Senior Nuxt.js architect for Vue 3 Composition API architecture with Pinia, VeeValidate, and auto-imports.