Advanced
AGENTS.md instructions
Recommended prompt for AGENTS.md, CLAUDE.md, or GEMINI.md telling agents which tools to use.
Appendix
Best practices
Build and deploy
Client setup instructions
Setup steps for Claude Code, Claude Desktop, Codex CLI, Copilot CLI, Antigravity CLI, OpenCode, VS Code, Cursor and GitHub Coding Agent.
Component compilation
The Svelte compiler converts your components to JavaScript that renders the page HTML and to CSS that styles the page.
Core concepts
Discord community
Ask questions and hang out with fellow Svelte users.
Discord server
Community space to ask questions and get help.
Fetch APIs
FormData
get-documentation
Retrieves full documentation content for one or multiple sections.
Getting started
Headers
Instructions
Small prompt always injected into your session to make your agent more aware of available tools.
Interactive tutorial
Teaches how to use Svelte in the browser.
Legacy syntax support
Svelte 5 still supports the old Svelte 4 syntax and allows mixing components.
list-sections
Discovers all available documentation sections, returning titles, use_cases, and paths.
llms-full.txt
Complete documentation for Svelte, SvelteKit and the CLI.
llms-medium.txt
Compressed documentation for use with medium context windows.
llms-small.txt
Highly compressed documentation for use with smaller context windows.
llms.txt convention
Support for the llms.txt convention to make documentation available to LLMs.
Local MCP package
Local setup using @sveltejs/mcp.
Local stdio transport
Local (stdio) version of the MCP server.
MCP Server
Tools, prompts and resources pulling from official Svelte docs and static analysis.
Migration guide
Brings Svelte 4 users up to speed on Svelte 5 changes.
Migration script
A migration script automates many Svelte 4 to Svelte 5 upgrade steps.
Run with npx
Run the server with npx -y @sveltejs/mcp.
Old docs
Reference for sites using only Svelte 3 or Svelte 4.
Package-level documentation
Package-level llms.txt files for Svelte, SvelteKit and the CLI.
Plaintext documentation
Documentation offered in plaintext format for LLMs.
Plaintext docs for LLMs
Documentation offered in plaintext format for AI or LLM use.
Playground
See examples, create Svelte apps in the browser, and share them.
playground-link
Generates a Svelte Playground link with the provided code.
Remote MCP endpoint
Remote setup using https://mcp.svelte.dev/mcp.
Request
Response
Runes
Reactive primitives such as $state, $derived, $effect and $props.
Runes reactivity
let becomes $state, $: becomes $derived/$effect, export let becomes $props.
Runtime
Stores, context, lifecycle hooks and imperative component API.
Scoped styles
Component-level CSS with scoped, global and custom property support.
Skills
Lazy-loaded descriptions teaching Svelte best practices and @sveltejs/mcp cli usage.
Snippets instead of slots
Svelte 5 replaces slots with snippets for content composition.
Special elements
Elements such as <svelte:boundary>, <svelte:window> and <svelte:head>.
Subagents
Focused agents invoked in parallel for atomic operations in a separate context window.
sv add
Add add-ons to a Svelte project.
sv check
Check a Svelte project.
sv create
Create Svelte applications.
sv migrate
Migrate a Svelte project.
svelte-autofixer
Analyzes Svelte code and returns issues and suggestions.
svelte-task prompt
Prompt instructing the LLM on the best way to use the MCP server.
Template syntax
Markup blocks including {#if}, {#each}, {#await} and {#snippet}.
UI components
A way of writing user interface components — like a navigation bar, comment section, or contact form.
Web standards