by spences10
Access authoritative Svelte 5 and SvelteKit definitions through a single, type‑safe tool that returns syntax, quick, or full documentation formats.
Mcp Svelte Docs provides a Model Context Protocol (MCP) server exposing the full set of Svelte 5 and SvelteKit definitions directly extracted from the official TypeScript declarations. A single svelte_definition tool covers all Svelte runes, modern features, event handling patterns, migration guidance, and TypeScript interfaces.
Call the tool via the MCP interface:
svelte_definition(identifier: string, format?: "syntax" | "quick" | "full")
identifier selects the Svelte concept (e.g., $state, snippets, migration-patterns).format controls verbosity: syntax for a concise signature, quick for a short definition with example, full for complete documentation (default). The server can be started with npx -y mcp-svelte-docs and configured in any MCP‑compatible client (Cursor, Windsurf, etc.).$state, $derived, $effect family), modern features (await-expressions, remote‑functions), event handling, migration patterns, and TS interfaces.npx.migration-patterns to convert Svelte 4 code to Svelte 5 idioms.Q: Do I need to install Svelte locally? A: No. The server extracts definitions directly from the official Svelte 5 TypeScript package, so a separate Svelte installation is not required.
Q: How are updates handled?
A: Running npx -y mcp-svelte-docs always pulls the latest published version, keeping the definitions in sync with the upstream Svelte releases.
Q: Can I query multiple identifiers at once? A: The current API accepts a single identifier per call. Clients can batch requests by invoking the tool repeatedly.
Q: What if I misspell an identifier? A: The server performs fuzzy matching and returns suggestions or the closest matching definition.
Q: Is there a limit on request rate? A: The package does not enforce a rate limit; typical local usage is unrestricted.
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.
Definition-First Approach: Rather than multiple specialized tools,
this server provides one powerful svelte_definition tool that
accesses 28+ comprehensive definitions covering:
svelte_definitionSingle, powerful tool for all Svelte 5 and SvelteKit concepts:
svelte_definition(identifier: string, format?: "syntax"|"quick"|"full")
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
guideResponse Formats:
"syntax" - TypeScript signature only (~50 words)"quick" - Definition + minimal example (~200 words)"full" - Complete documentation with examples (~500-1000 words,
default)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
svelte_definition replaces 16+ specialized tools$state
or remote-functionsawait-expressions)remote-functions)$effect family, $state variants,
$derived.by, $bindableClaude Desktop (via WSL)
{
"mcpServers": {
"mcp-svelte-docs": {
"command": "wsl.exe",
"args": ["bash", "-c", "npx -y mcp-svelte-docs"]
}
}
}
Cursor
Windsurf (via WSL)
{
"mcpServers": {
"mcp-svelte-docs": {
"command": "wsl.exe",
"args": ["bash", "-c", "npx -y mcp-svelte-docs"]
}
}
}
Windows (without WSL)
{
"mcpServers": {
"mcp-svelte-docs": {
"command": "npx",
"args": ["-y", "mcp-svelte-docs"]
}
}
}
macOS / Linux
{
"mcpServers": {
"mcp-svelte-docs": {
"command": "npx",
"args": ["-y", "mcp-svelte-docs"]
}
}
}
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see the LICENSE file for details.
Built on:
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by headroomlabs-ai
Compress tool outputs, logs, files, RAG chunks, and conversation history before they reach the LLM, keeping answers identical while saving up to 95% of tokens for JSON payloads.
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
{
"mcpServers": {
"mcp-svelte-docs": {
"command": "npx",
"args": [
"-y",
"mcp-svelte-docs"
]
}
}
}claude mcp add mcp-svelte-docs npx -y mcp-svelte-docs