Mcp Svelte Docs banner
spences10 spences10

Mcp Svelte Docs

Documentation community

Description

🔍 MCP server that lets you search and access Svelte documentation with built-in caching

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

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`,