svelte-index-mcp Svelte Themes

Svelte Index Mcp

mcp for indexing Svelte 5 code for AI assisted development

Svelte Index MCP

[!CAUTION] Not ready to use yet

An MCP server that indexes Svelte 5 components and provides code intelligence via the Model Context Protocol.

100% Vibecoded in Zig 0.17.0

Build

zig build --fetch
zig build
zig build test

Install

install zig-out/bin/svelte_index_mcp ~/.local/bin/svelte_index_mcp

Usage

Run the MCP server with a database path:

svelte_index_mcp .svelte-index.db

The server indexes the current working directory and starts listening for JSON-RPC requests on stdin/stdout.

Command Line Options

--config <path>   Override config file location (default: .svelte-index.json)
--index <path>    Override index database path
--force           Force full re-index
--verbose         Detailed logging during indexing

Configuration

Create a .svelte-index.json in your project root:

{
  "exclude": [".git", "node_modules", "dist", "build", ".svelte-kit"],
  "include": ["**/*.svelte", "**/*.svelte.js", "**/*.svelte.ts"],
  "index_path": ".svelte-index.db",
  "project_root": "."
}

MCP Client Configuration

Add to your .mcp.json (or client config):

{
  "mcpServers": {
    "svelte-index": {
      "command": "svelte_index_mcp",
      "args": [".svelte-index.db"],
    }
  }
}

MCP Tools

  • search - Search components, symbols, and routes by name
  • find_routes - List all SvelteKit routes
  • list_components - List all indexed components
  • get_component - Get component details including props and snippets
  • list_symbols - List symbols in a file
  • get_symbol - Get symbol details
  • find_imports - Find import relationships
  • find_usage - Find where a component is used
  • find_usage_deep - Deep usage analysis through the component tree
  • find_context - Find setContext/getContext usage
  • trace - Trace component relationships
  • index - Trigger re-indexing
  • index_status - Get indexing status

Top categories

Loading Svelte Themes