Local setup
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/mcpHere’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/mcpThe [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 claude_desktop_config.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/mcpThe [scope] must be user, project or local.
OpenCode
Run the command:
opencode mcp addand 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/mcpVS Code
- Open the command palette
- Select “MCP: Add Server...”
- Select “Command (stdio)”
- Insert
npx -y @sveltejs/mcpin the input and pressEnter - When prompted for a name, insert
svelte - Select if you want to add it as a
GlobalorWorkspaceMCP 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