Local setup
The STDIO (local) version of the MCP server is available as an npm
package: @sveltjs/mcp
. 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] [name] npx -y @sveltejs/mcp
You can choose your preferred scope
(it must be user
, project
or local
) and name
.
Claude Desktop
Open the Developer section in settings, 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": {
"[name]": {
"command": "npx",
"args": ["-y", "@sveltejs/mcp"]
}
}
}
The top level must be mcpServers
but you can choose your preferred name
.
Codex CLI
Add the following to your config.toml
(defaults to ~/.codex/config.toml
... refer to the configuration documentation for more advanced setups):
[mcp_servers.name]
command = "npx"
args = ["-y", "@sveltejs/mcp"]
The top level must be mcp_server
but you can choose your preferred name
.
Gemini CLI
To include the local MCP version in Gemini CLI, simply run the following command:
gemini mcp add -t stdio -s [scope] [name] npx -y @sveltejs/mcp
You can choose your preferred scope
(it must be user
, project
or local
) and name
.
Opencode
Run the command:
opencode mcp add
and follow the instructions, selecting Local when asked for “Select MCP server type”:
opencode mcp add
┌ Add MCP server
│
◇ Enter MCP server name
│ [name]
│
◇ Select MCP server type
│ Local
│
◆ Enter command to run
│ npx -y @sveltejs/mcp
You can choose your preferred name
.
VSCode
- Open the command Palette
- Select “MCP: Add Server...”
- Select “Command (stdio)”
- Insert
npx -y @sveltejs/mcp
in the input and pressEnter
- Insert your preferred name
- Select if you want to add it as a
Global
orWorkspace
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": {
"[name]": {
"command": "npx",
"args": ["-y", "@sveltejs/mcp"]
}
}
}
The top level must be mcpServers
but you can choose your preferred name
.
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