Skip to main content
Glama

SvelteLS.MCP

MCP server that wraps the Svelte Language Server, exposing its LSP capabilities as MCP tools for Claude Code.

Architecture

Claude Code <--MCP/stdio--> SvelteLS.MCP <--LSP/stdio--> svelteserver

Setup

npm install
npm run build

Usage

node dist/index.js [path-to-svelte-project]

The project path is optional. If omitted, use the load_project tool at runtime to set it.

Claude Code MCP config

Windows

{
  "mcpServers": {
    "svelte-ls": {
      "command": "cmd",
      "args": ["/c", "node", "F:\\Shared\\SvelteLS.MCP\\dist\\index.js", "F:\\path\\to\\svelte\\project"]
    }
  }
}

macOS / Linux

{
  "mcpServers": {
    "svelte-ls": {
      "command": "node",
      "args": ["/path/to/SvelteLS.MCP/dist/index.js", "/path/to/svelte/project"]
    }
  }
}

Tools

Navigation

  • find_definition - Go to definition of a symbol

  • find_references - Find all references to a symbol

  • get_hover - Get hover documentation and type info

  • go_to_implementation - Find implementations of an interface/abstract method

  • go_to_type_definition - Jump to the type definition of a symbol

  • find_document_symbols - List all symbols in a file

  • find_workspace_symbols - Search symbols across the workspace

Diagnostics

  • get_diagnostics - Get errors, warnings, and diagnostics for a file

Editing

  • rename_symbol - Rename a symbol across the workspace

  • format_document - Format a file or line range

Code Actions

  • get_code_actions - List available quick fixes and refactorings

  • apply_code_action - Apply a code action by title

IntelliSense

  • get_completion - Get completion suggestions at a position

  • get_signature_help - Get method signature overloads and parameter info

Call Hierarchy

  • incoming_calls - Find all callers of a function/method

  • outgoing_calls - Find all calls from a function/method

Lifecycle

  • load_project - Load a Svelte project by its root directory

  • restart_lsp - Restart the Svelte language server

Svelte-specific

  • get_compiled_code - Get compiled JS/CSS output for a Svelte component

  • get_component_references - Find all usages of a Svelte component

  • get_file_references - Find all files that import a given file

Environment Variables

  • SVELTELS_TIMEOUT - LSP request timeout in ms (default: 30000)

  • SVELTELS_SERVER_PATH - Override path to the svelteserver entry script

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adainrivers/SvelteLS.MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server