pocketz.doi.bio/2025-10-16_064607_sveltedev_local-setup.md
Local setup • Svelte MCP Docs
URL: https://svelte.dev/docs/mcp/local-setup
Saved: 2025-10-16T13:46:07.459Z
Introduction Overview Setup Local setup Remote setup Capabilities Tools Resources Prompts MCPSETUP Local setup ON THIS PAGE
The local (or stdio) version of the MCP server is available via the @sveltejs/mcp npm package. You can either install it globally and then reference it in your configuration or run it with npx:
npx -y @sveltejs/mcp
Here’s how to set it up in some common MCP clients:
Claude Code
To include the local MCP version in Claude Code, simply run the following command:
claude mcp add -t stdio -s [scope] svelte -- npx -y @sveltejs/mcp
The [scope] must be user, project or local.
Claude Desktop
In the Settings > Developer section, click on Edit Config. It will open the folder with a claudedesktopconfig.json file in it. Edit the file to include the following configuration:
{ "mcpServers": { "svelte": { "command": "npx", "args": ["-y", "@sveltejs/mcp"] } } } Codex CLI
Add the following to your config.toml (which defaults to ~/.codex/config.toml, but refer to the configuration documentation for more advanced setups):
[mcp_servers.svelte] command = "npx" args = ["-y", "@sveltejs/mcp"] Gemini CLI
To include the local MCP version in Gemini CLI, simply run the following command:
gemini mcp add -t stdio -s [scope] svelte npx -y @sveltejs/mcp
The [scope] must be user, project or local.
OpenCode
Run the command:
opencode mcp add
and follow the instructions, selecting ‘Local’ under the ‘Select MCP server type’ prompt:
opencode mcp add
┌ Add MCP server │ ◇ Enter MCP server name │ svelte │ ◇ Select MCP server type │ Local │ ◆ Enter command to run │ npx -y @sveltejs/mcp VS Code Open the command palette Select “MCP: Add Server…” Select “Command (stdio)” Insert npx -y @sveltejs/mcp in the input and press Enter When prompted for a name, insert svelte Select if you want to add it as a Global or Workspace MCP server Cursor Open the command palette Select “View: Open MCP Settings” Click on “Add custom MCP”
It will open a file with your MCP servers where you can add the following configuration:
{ "mcpServers": { "svelte": { "command": "npx", "args": ["-y", "@sveltejs/mcp"] } } } Zed Open the command palette Search and select “agent:open settings” In settings panel look for Model Context Protocol (MCP) Servers Click on “Add Server” Select: “Add Custom Server”
It will open a popup with MCP server config where you can add the following configuration:
{ "svelte": { "command": "npx", "args": ["-y", "@sveltejs/mcp"] } } Other clients
If we didn’t include the MCP client you are using, refer to their documentation for stdio servers and use npx as the command and -y @sveltejs/mcp as the arguments.
Edit this page on GitHub llms.txt
PREVIOUS NEXT Overview Remote setup