SM

spences10/mcp-svelte-docs

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

124 stars 8 forks Качество 83 Тренд 20MIT

spences10/mcp-svelte-docs — это кандидат на MCP-сервер, импортированный из https://github.com/spences10/mcp-svelte-docs.

Обзор

spences10/mcp-svelte-docs — это кандидат на MCP-сервер, импортированный из https://github.com/spences10/mcp-svelte-docs.

Обзор (машинный перевод)

Сервер Model Context Protocol (MCP), предоставляющий авторитетный Svelte 5 и определения SvelteKit, извлеченные напрямую из TypeScript объявления. Получите точный синтаксис, параметры и примеры для всех Svelte 5 концепций через единый унифицированный интерфейс.

Архитектура

Подход, ориентированный на определение: Вместо нескольких специализированных инструментов, этот сервер предоставляет мощный svelte_definition инструмент, который Получает доступ к 28+ подробным определениям, охватывающим:

  • Все руны Svelte 5 (варианты $state, $derived, $props, $effect)
  • Современные функции (фрагменты, выражения ожидания, удалённые функции)
  • Обработка событий (DOM-события, пользовательские события, компонент коммуникация)
  • Рекомендации по миграции (Svelte 4–5 паттерны и лучшие практики)
  • Интерфейсы TypeScript (Типы снэппетов, снимков)
  • Продвинутые шаблоны (глобальное состояние, распространённые ошибки, жизненный цикл эквиваленты)

Доступный инструмент

svelte_definition

Единственный, мощный инструмент для всех концепций Svelte 5 и SvelteKit:

Примеры:

  • svelte_definition("$state") - Полная $state документация
  • svelte_definition("snippets", "quick") - Обзор фрагмента с Пример

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального 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, 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)
Открыть полный README на GitHub

Установка

npx -y mcp-svelte-docs
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

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