Svelte Docs

Svelte Docs

spences10

Provides authoritative Svelte 5 and SvelteKit documentation extracted from TypeScript declarations. Get precise syntax, parameters, and examples for runes, components, and migration patterns.

Integrates with Svelte documentation to enable efficient querying and retrieval of framework-specific content for development assistance.

124731 views10RemoteLocal (stdio)

What it does

  • Query Svelte 5 rune definitions ($state, $derived, $effect, etc.)
  • Get TypeScript signatures for Svelte components and features
  • Access migration guidance from Svelte 4 to 5
  • Retrieve event handling patterns and examples
  • Look up snippet syntax and modern Svelte features
  • Get documentation in different formats (syntax-only, quick, or full)

Best for

Svelte developers learning the new v5 syntaxTeams migrating from Svelte 4 to 5Getting quick reference for runes and TypeScript types
28+ comprehensive definitionsExtracted from official TypeScript declarationsThree response formats for different needs

About Svelte Docs

Svelte Docs is a community-built MCP server published by spences10 that provides AI assistants with tools and capabilities via the Model Context Protocol. Svelte Docs lets you efficiently query and retrieve Svelte documentation, streamlining access to framework-specific reso It is categorized under developer tools. This server exposes 1 tool that AI clients can invoke during conversations and coding sessions.

How to install

You can install Svelte Docs in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport. This server supports remote connections over HTTP, so no local installation is required.

License

Svelte Docs is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (1)

svelte_definition

Get authoritative Svelte 5 definitions extracted from TypeScript declarations. Returns precise syntax, parameters, and variants for runes ($state, $derived, $props, $effect), features (snippets, onclick), and patterns (component-events). Use "syntax" format for quick reference (~50 words), "quick" for definition + example (~200 words), or "full" for complete documentation (~500-1000 words). Replaces 13+ specialized tools with a single, consistent interface.

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)

Available Tool

svelte_definition

Single, powerful tool for all Svelte 5 and SvelteKit concepts:

svelte_definition(identifier: string, format?: "syntax"|"quick"|"full")

Examples:

  • svelte_definition("$state") - Complete $state documentation
  • svelte_definition("snippets", "quick") - Snippet overview with example
  • svelte_definition("onclick", "syntax") - Just the TypeScript signature
  • svelte_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_definition replaces 16+ specialized tools
  • 28+ Definitions: Every Svelte 5 rune, feature, and pattern covered
  • Consistent Responses: Same interface whether you need $state or remote-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 $effect family, $state variants, $derived.by, $bindable
  • Advanced 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)

{
	"mcpServers": {
		"mcp-svelte-docs": {
			"command": "wsl.exe",
			"args": ["bash", "-c", "npx -y mcp-svelte-docs"]
		}
	}
}

Cursor

Install MCP Server

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"]
		}
	}
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.

Acknowledgments

Built on:

Alternatives

Related Skills

Browse all skills
api-documenter

Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.

4
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

4
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

18
ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

6
doc-reader

Efficiently consume and navigate external documentation sites. Use when researching APIs, libraries, or tools; when the user mentions docs, documentation, or references a docs URL; or when you need to understand how something works before implementing it.

4
cli-builder

Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.

3