The MCP Svelte Docs Server provides comprehensive documentation and guidance for Svelte 5 and SvelteKit development through specialized tools.
Access detailed documentation for Svelte 5 core runes:
$state,$derived,$props, and$effectLearn about Svelte 5 features like snippets (replacing slots), event handling, component events, and global state management strategies
Explore modern async features including await expressions, boundaries, and SvelteKit remote functions for type-safe client-server communication
Get Svelte 4 to Svelte 5 migration guidance with searchable patterns using the
patternparameter for specific areas like "reactive", "props", or "events"Identify and avoid common mistakes in Svelte 5 development with filtering by categories such as "state", "props", or "events" using the
categoryparameterAccess comprehensive overviews of all Svelte 5 features and runes
Control documentation detail with the optional
includeExamplesparameter (defaults to true) to choose between documentation with or without code examples
Provides efficient access to Svelte documentation with advanced search capabilities, caching, and optimized content delivery. Supports package-specific documentation for Svelte, Kit, and CLI.
mcp-svelte-docs
A Model Context Protocol (MCP) server providing authoritative Svelte 5 and SvelteKit definitions extracted directly from TypeScript declarations. Get precise syntax, parameters, and examples for all Svelte 5 concepts through a single, unified interface.
Architecture
Definition-First Approach: Rather than multiple specialized tools,
this server provides one powerful svelte_definition tool that
accesses 28+ comprehensive definitions covering:
All Svelte 5 runes ($state, $derived, $props, $effect variants)
Modern features (snippets, await expressions, remote functions)
Event handling (DOM events, custom events, component communication)
Migration guidance (Svelte 4 to 5 patterns and best practices)
TypeScript interfaces (Snippet, Snapshot types)
Advanced patterns (global state, common mistakes, lifecycle equivalents)
Related MCP server: @sanderkooger/mcp-server-ragdocs
Available Tool
svelte_definition
Single, powerful tool for all Svelte 5 and SvelteKit concepts:
Examples:
svelte_definition("$state")- Complete $state documentationsvelte_definition("snippets", "quick")- Snippet overview with examplesvelte_definition("onclick", "syntax")- Just the TypeScript signaturesvelte_definition("migration-patterns")- Svelte 4 → 5 migration guide
Response Formats:
"syntax"- TypeScript signature only (~50 words)"quick"- Definition + minimal example (~200 words)"full"- Complete documentation with examples (~500-1000 words, default)
Available Identifiers (28+)
Core Runes: $state, $state.raw, $state.snapshot, $derived,
$derived.by, $props, $bindable, $effect, $effect.pre,
$effect.root, $effect.pending, $effect.tracking
Development Tools: $inspect, $host
Features & Patterns: snippets, onclick, component-events,
migration-patterns, await-expressions, remote-functions,
global-state, common-mistakes, lifecycle-equivalents
Event Handling: custom-events, event-delegation,
event-modifiers
TypeScript Interfaces: snippet, snapshot
Key Features
🎯 Authoritative & TypeScript-First
Direct from Source: Definitions extracted from official Svelte 5 TypeScript declarations
Always Current: Reflects the actual API, not outdated tutorials
Type-Safe: Includes precise parameter types, return values, and constraints
⚡ Single Interface, Complete Coverage
One Tool:
svelte_definitionreplaces 16+ specialized tools28+ Definitions: Every Svelte 5 rune, feature, and pattern covered
Consistent Responses: Same interface whether you need
$stateorremote-functions
🚀 Modern Svelte 5 & SvelteKit Support
Await Expressions: Async operations directly in templates (
await-expressions)Remote Functions: Type-safe client-server communication (
remote-functions)All Runes: Complete
$effectfamily,$statevariants,$derived.by,$bindableAdvanced Patterns: Event handling, global state, component communication
📚 Smart Error Recovery
Fuzzy Matching: Suggests correct identifiers for typos
Related Concepts: Points to similar definitions when searches fail
Migration Help: Converts Svelte 4 patterns to Svelte 5 equivalents
Config
Claude Desktop (via WSL)
Cursor
Windsurf (via WSL)
Windows (without WSL)
macOS / Linux
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see the LICENSE file for details.
Acknowledgments
Built on:
Appeared in Searches
- A server for handling vector memory operations
- MCP integration with LangChain documentation
- A server or tool using RAG for documentation scraping, storage, and retrieval with SSE support
- Retrieve the latest documentation of libraries in word embeddings form for LLMs
- Official Documentation for Tailwind CSS