MCP server that wraps the Svelte Language Server, exposing its LSP capabilities as MCP tools for Claude Code.
Claude Code <--MCP/stdio--> SvelteLS.MCP <--LSP/stdio--> svelteserver
npm install
npm run build
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.
{
"mcpServers": {
"svelte-ls": {
"command": "cmd",
"args": ["/c", "node", "F:\\Shared\\SvelteLS.MCP\\dist\\index.js", "F:\\path\\to\\svelte\\project"]
}
}
}
{
"mcpServers": {
"svelte-ls": {
"command": "node",
"args": ["/path/to/SvelteLS.MCP/dist/index.js", "/path/to/svelte/project"]
}
}
}
find_definition - Go to definition of a symbolfind_references - Find all references to a symbolget_hover - Get hover documentation and type infogo_to_implementation - Find implementations of an interface/abstract methodgo_to_type_definition - Jump to the type definition of a symbolfind_document_symbols - List all symbols in a filefind_workspace_symbols - Search symbols across the workspaceget_diagnostics - Get errors, warnings, and diagnostics for a filerename_symbol - Rename a symbol across the workspaceformat_document - Format a file or line rangeget_code_actions - List available quick fixes and refactoringsapply_code_action - Apply a code action by titleget_completion - Get completion suggestions at a positionget_signature_help - Get method signature overloads and parameter infoincoming_calls - Find all callers of a function/methodoutgoing_calls - Find all calls from a function/methodload_project - Load a Svelte project by its root directoryrestart_lsp - Restart the Svelte language serverget_compiled_code - Get compiled JS/CSS output for a Svelte componentget_component_references - Find all usages of a Svelte componentget_file_references - Find all files that import a given fileSVELTELS_TIMEOUT - LSP request timeout in ms (default: 30000)SVELTELS_SERVER_PATH - Override path to the svelteserver entry script