Skip to content

Commit 3106305

Browse files
chore: apply suggestions from code review
Co-authored-by: Rich Harris <[email protected]>
1 parent 3c14872 commit 3106305

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

documentation/docs/10-introduction/10-overview.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
title: Overview
33
---
44

5-
The official Svelte MCP (Model Context Protocol) Server can help your LLM or Agent of choice write better Svelte code by providing it with documentation and tools to get suggestions on the generated code based on static analysis.
5+
The Svelte MCP ([Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro)) server can help your LLM or agent of choice write better Svelte code. It works by providing documentation relevant to the task at hand, and statically analysing generated code so that it can suggest fixes and best practices.
66

77
## Setup
88

9-
The setup differs based on the version of the MCP you prefer (either remote or local) and the MCP client of your choice (e.g. Claude Code, Codex CLI, GitHub Copilot etc.). Refer to our documentation to learn how to set those up [locally](./local-setup) and [remotely](./remote-setup) for the most common clients.
9+
The setup varies based on the version of the MCP you prefer — remote or local — and your chosen MCP client (e.g. Claude Code, Codex CLI or GitHub Copilot):
10+
11+
- [local setup](local-setup) using `@sveltejs/mcp`
12+
- [remote setup](remote-setup) using [mcp.svelte.dev/mcp](https://mcp.svelte.dev/mcp)
1013

1114
## Usage
1215

13-
To get the most out of the MCP we recommend including the following prompt in your `AGENTS.md` or `CLAUDE.md`. This will instruct the LLM on what's available and when it's appropriate to use the MCP.
16+
To get the most out of the MCP server we recommend including the following prompt in your `AGENTS.md` (or `CLAUDE.md`, if using Claude Code). This will tell the LLM which tools are available and when it's appropriate to use them.
1417

1518
```md
1619
You are able to use the Svelte MCP server, where you have access to comprehensive Svelte 5 and SvelteKit documentation. Here's how to use the available tools effectively:
@@ -38,4 +41,4 @@ Generates a Svelte Playground link with the provided code.
3841
After completing the code, ask the user if they want a playground link. Only call this tool after user confirmation and NEVER if code was written to files in their project.
3942
```
4043

41-
If your MCP client supports it, we also recommend using the [svelte-task](./prompts#svelte-task) prompt to instruct the LLM on the best way to use the MCP server.
44+
If your MCP client supports it, we also recommend using the [svelte-task](prompts#svelte-task) prompt to instruct the LLM on the best way to use the MCP server.

documentation/docs/20-setup/20-local-setup.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Local setup
33
---
44

5-
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`.
5+
The local (or stdio) version of the MCP server is available via the [`@sveltejs/mcp`](https://www.npmjs.com/package/@sveltejs/mcp) npm package. You can either install it globally and then reference it in your configuration or run it with `npx`:
66

77
```bash
88
npx -y @sveltejs/mcp
@@ -15,19 +15,19 @@ Here's how to set it up in some common MCP clients:
1515
To include the local MCP version in Claude Code, simply run the following command:
1616

1717
```bash
18-
claude mcp add -t stdio -s [scope] [name] npx -y @sveltejs/mcp
18+
claude mcp add -t stdio -s [scope] svelte npx -y @sveltejs/mcp
1919
```
2020

2121
You can choose your preferred `scope` (it must be `user`, `project` or `local`) and `name`.
2222

2323
## Claude Desktop
2424

25-
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:
25+
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:
2626

2727
```json
2828
{
2929
"mcpServers": {
30-
"[name]": {
30+
"svelte": {
3131
"command": "npx",
3232
"args": ["-y", "@sveltejs/mcp"]
3333
}
@@ -39,10 +39,10 @@ The top level must be `mcpServers` but you can choose your preferred `name`.
3939

4040
## Codex CLI
4141

42-
Add the following to your `config.toml` (defaults to `~/.codex/config.toml`... refer to [the configuration documentation](https://github.com/openai/codex/blob/69cb72f8422f2aa7222bea3a6ce48fd130fa76c4/docs/config.md) for more advanced setups):
42+
Add the following to your `config.toml` (which defaults to `~/.codex/config.toml`, but refer to [the configuration documentation](https://github.com/openai/codex/blob/main/docs/config.md) for more advanced setups):
4343

4444
```toml
45-
[mcp_servers.name]
45+
[mcp_servers.svelte]
4646
command = "npx"
4747
args = ["-y", "@sveltejs/mcp"]
4848
```
@@ -54,28 +54,28 @@ The top level must be `mcp_server` but you can choose your preferred `name`.
5454
To include the local MCP version in Gemini CLI, simply run the following command:
5555

5656
```bash
57-
gemini mcp add -t stdio -s [scope] [name] npx -y @sveltejs/mcp
57+
gemini mcp add -t stdio -s [scope] svelte npx -y @sveltejs/mcp
5858
```
5959

6060
You can choose your preferred `scope` (it must be `user`, `project` or `local`) and `name`.
6161

62-
## Opencode
62+
## OpenCode
6363

6464
Run the command:
6565

6666
```bash
6767
opencode mcp add
6868
```
6969

70-
and follow the instructions, selecting Local when asked for "Select MCP server type":
70+
and follow the instructions, selecting 'Local' under the 'Select MCP server type' prompt:
7171

7272
```bash
7373
opencode mcp add
7474

7575
┌ Add MCP server
7676
7777
◇ Enter MCP server name
78-
[name]
78+
svelte
7979
8080
◇ Select MCP server type
8181
│ Local
@@ -86,9 +86,9 @@ opencode mcp add
8686

8787
You can choose your preferred `name`.
8888

89-
## VSCode
89+
## VS Code
9090

91-
- Open the command Palette
91+
- Open the command palette
9292
- Select "MCP: Add Server..."
9393
- Select "Command (stdio)"
9494
- Insert `npx -y @sveltejs/mcp` in the input and press `Enter`
@@ -97,7 +97,7 @@ You can choose your preferred `name`.
9797

9898
## Cursor
9999

100-
- Open the command Palette
100+
- Open the command palette
101101
- Select "View: Open MCP Settings"
102102
- Click on "Add custom MCP"
103103

@@ -106,7 +106,7 @@ It will open a file with your MCP servers where you can add the following config
106106
```json
107107
{
108108
"mcpServers": {
109-
"[name]": {
109+
"svelte": {
110110
"command": "npx",
111111
"args": ["-y", "@sveltejs/mcp"]
112112
}

documentation/docs/20-setup/30-remote-setup.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Here's how to set it up in some common MCP clients:
1111
To include the remote MCP version in Claude Code, simply run the following command:
1212

1313
```bash
14-
claude mcp add -t http -s [scope] [name] https://mcp.svelte.dev/mcp
14+
claude mcp add -t http -s [scope] svelte https://mcp.svelte.dev/mcp
1515
```
1616

1717
You can choose your preferred `scope` (it must be `user`, `project` or `local`) and `name`.
@@ -26,11 +26,11 @@ You can choose your preferred `scope` (it must be `user`, `project` or `local`)
2626

2727
## Codex CLI
2828

29-
Add the following to your `config.toml` (defaults to `~/.codex/config.toml`... refer to [the configuration documentation](https://github.com/openai/codex/blob/69cb72f8422f2aa7222bea3a6ce48fd130fa76c4/docs/config.md) for more advanced setups):
29+
Add the following to your `config.toml` (which defaults to `~/.codex/config.toml`, but refer to [the configuration documentation](https://github.com/openai/codex/blob/main/docs/config.md) for more advanced setups):
3030

3131
```toml
3232
experimental_use_rmcp_client = true
33-
[mcp_servers.name]
33+
[mcp_servers.svelte]
3434
url = "https://mcp.svelte.dev/mcp"
3535
```
3636

@@ -41,7 +41,7 @@ To use HTTP servers in Codex you need to enable `experimental_use_rmcp_client` a
4141
To include the remote MCP version in Gemini CLI, simply run the following command:
4242

4343
```bash
44-
gemini mcp add -t http -s [scope] [name] https://mcp.svelte.dev/mcp
44+
gemini mcp add -t http -s [scope] svelte https://mcp.svelte.dev/mcp
4545
```
4646

4747
You can choose your preferred `scope` (it must be `user`, `project` or `local`) and `name`.
@@ -62,7 +62,7 @@ opencode mcp add
6262
┌ Add MCP server
6363
6464
◇ Enter MCP server name
65-
[name]
65+
svelte
6666
6767
◇ Select MCP server type
6868
│ Remote
@@ -93,7 +93,7 @@ It will open a file with your MCP servers where you can add the following config
9393
```json
9494
{
9595
"mcpServers": {
96-
"[name]": {
96+
"svelte": {
9797
"url": "https://mcp.svelte.dev/mcp"
9898
}
9999
}

0 commit comments

Comments
 (0)