Skip to content

Commit 6b57902

Browse files
committed
docs: new sync
1 parent fd9270d commit 6b57902

File tree

4 files changed

+46
-57
lines changed

4 files changed

+46
-57
lines changed

apps/svelte.dev/content/docs/mcp/10-introduction/10-overview.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-doc
33
title: Overview
44
---
55

6-
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.
6+
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.
77

88
## Setup
99

10-
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.
10+
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):
11+
12+
- [local setup](local-setup) using `@sveltejs/mcp`
13+
- [remote setup](remote-setup) using [mcp.svelte.dev/mcp](https://mcp.svelte.dev/mcp)
1114

1215
## Usage
1316

14-
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.
17+
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.
1518

1619
```md
1720
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:
@@ -39,4 +42,4 @@ Generates a Svelte Playground link with the provided code.
3942
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.
4043
```
4144

42-
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.
45+
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.

apps/svelte.dev/content/docs/mcp/20-setup/20-local-setup.md

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-doc
33
title: Local setup
44
---
55

6-
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`.
6+
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`:
77

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

1818
```bash
19-
claude mcp add -t stdio -s [scope] [name] npx -y @sveltejs/mcp
19+
claude mcp add -t stdio -s [scope] svelte npx -y @sveltejs/mcp
2020
```
2121

22-
You can choose your preferred `scope` (it must be `user`, `project` or `local`) and `name`.
22+
The `[scope]` must be `user`, `project` or `local`.
2323

2424
## Claude Desktop
2525

26-
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:
26+
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:
2727

2828
```json
2929
{
3030
"mcpServers": {
31-
"[name]": {
31+
"svelte": {
3232
"command": "npx",
3333
"args": ["-y", "@sveltejs/mcp"]
3434
}
3535
}
3636
}
3737
```
3838

39-
The top level must be `mcpServers` but you can choose your preferred `name`.
40-
4139
## Codex CLI
4240

43-
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):
41+
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):
4442

4543
```toml
46-
[mcp_servers.name]
44+
[mcp_servers.svelte]
4745
command = "npx"
4846
args = ["-y", "@sveltejs/mcp"]
4947
```
5048

51-
The top level must be `mcp_server` but you can choose your preferred `name`.
52-
5349
## Gemini CLI
5450

5551
To include the local MCP version in Gemini CLI, simply run the following command:
5652

5753
```bash
58-
gemini mcp add -t stdio -s [scope] [name] npx -y @sveltejs/mcp
54+
gemini mcp add -t stdio -s [scope] svelte npx -y @sveltejs/mcp
5955
```
6056

61-
You can choose your preferred `scope` (it must be `user`, `project` or `local`) and `name`.
57+
The `[scope]` must be `user`, `project` or `local`.
6258

63-
## Opencode
59+
## OpenCode
6460

6561
Run the command:
6662

6763
```bash
6864
opencode mcp add
6965
```
7066

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

7369
```bash
7470
opencode mcp add
7571

7672
┌ Add MCP server
7773
7874
◇ Enter MCP server name
79-
[name]
75+
svelte
8076
8177
◇ Select MCP server type
8278
│ Local
@@ -85,20 +81,18 @@ opencode mcp add
8581
│ npx -y @sveltejs/mcp
8682
```
8783

88-
You can choose your preferred `name`.
84+
## VS Code
8985

90-
## VSCode
91-
92-
- Open the command Palette
86+
- Open the command palette
9387
- Select "MCP: Add Server..."
9488
- Select "Command (stdio)"
9589
- Insert `npx -y @sveltejs/mcp` in the input and press `Enter`
96-
- Insert your preferred name
90+
- When prompted for a name, insert `svelte`
9791
- Select if you want to add it as a `Global` or `Workspace` MCP server
9892

9993
## Cursor
10094

101-
- Open the command Palette
95+
- Open the command palette
10296
- Select "View: Open MCP Settings"
10397
- Click on "Add custom MCP"
10498

@@ -107,16 +101,14 @@ It will open a file with your MCP servers where you can add the following config
107101
```json
108102
{
109103
"mcpServers": {
110-
"[name]": {
104+
"svelte": {
111105
"command": "npx",
112106
"args": ["-y", "@sveltejs/mcp"]
113107
}
114108
}
115109
}
116110
```
117111

118-
The top level must be `mcpServers` but you can choose your preferred `name`.
119-
120112
## Other clients
121113

122114
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.

apps/svelte.dev/content/docs/mcp/20-setup/30-remote-setup.md

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

1414
```bash
15-
claude mcp add -t http -s [scope] [name] https://mcp.svelte.dev/mcp
15+
claude mcp add -t http -s [scope] svelte https://mcp.svelte.dev/mcp
1616
```
1717

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

2020
## Claude Desktop
2121

22-
- Open `Settings > Connectors`
23-
- Click on `Add Custom Connector`
24-
- Insert the name you prefer most
25-
- Insert `https://mcp.svelte.dev/mcp` as the `Remote MCP server URL`
26-
- Click `Add`
22+
- Open Settings > Connectors
23+
- Click on Add Custom Connector
24+
- When prompted for a name, enter `svelte`
25+
- Under the Remote MCP server URL input, use `https://mcp.svelte.dev/mcp`
26+
- Click Add
2727

2828
## Codex CLI
2929

30-
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):
30+
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):
3131

3232
```toml
3333
experimental_use_rmcp_client = true
34-
[mcp_servers.name]
34+
[mcp_servers.svelte]
3535
url = "https://mcp.svelte.dev/mcp"
3636
```
3737

38-
To use HTTP servers in Codex you need to enable `experimental_use_rmcp_client` and the top level must be `mcp_server` but you can choose your preferred `name`.
39-
4038
## Gemini CLI
4139

42-
To include the remote MCP version in Gemini CLI, simply run the following command:
40+
To use the remote MCP server with Gemini CLI, simply run the following command:
4341

4442
```bash
45-
gemini mcp add -t http -s [scope] [name] https://mcp.svelte.dev/mcp
43+
gemini mcp add -t http -s [scope] svelte https://mcp.svelte.dev/mcp
4644
```
4745

48-
You can choose your preferred `scope` (it must be `user`, `project` or `local`) and `name`.
46+
The `[scope]` must be `user`, `project` or `local`.
4947

50-
## Opencode
48+
## OpenCode
5149

5250
Run the command:
5351

5452
```bash
5553
opencode mcp add
5654
```
5755

58-
and follow the instructions, selecting Remote when asked for "Select MCP server type":
56+
and follow the instructions, selecting 'Remote' under the 'Select MCP server type' prompt:
5957

6058
```bash
6159
opencode mcp add
6260

6361
┌ Add MCP server
6462
6563
◇ Enter MCP server name
66-
[name]
64+
svelte
6765
6866
◇ Select MCP server type
6967
│ Remote
@@ -72,11 +70,9 @@ opencode mcp add
7270
│ https://mcp.svelte.dev/mcp
7371
```
7472

75-
You can choose your preferred `name`.
73+
## VS Code
7674

77-
## VSCode
78-
79-
- Open the command Palette
75+
- Open the command palette
8076
- Select "MCP: Add Server..."
8177
- Select "HTTP (HTTP or Server-Sent-Events)"
8278
- Insert `https://mcp.svelte.dev/mcp` in the input and press `Enter`
@@ -85,7 +81,7 @@ You can choose your preferred `name`.
8581

8682
## Cursor
8783

88-
- Open the command Palette
84+
- Open the command palette
8985
- Select "View: Open MCP Settings"
9086
- Click on "Add custom MCP"
9187

@@ -94,15 +90,13 @@ It will open a file with your MCP servers where you can add the following config
9490
```json
9591
{
9692
"mcpServers": {
97-
"[name]": {
93+
"svelte": {
9894
"url": "https://mcp.svelte.dev/mcp"
9995
}
10096
}
10197
}
10298
```
10399

104-
The top level must be `mcpServers` but you can choose your preferred `name`.
105-
106100
## Other clients
107101

108102
If we didn't include the MCP client you are using, refer to their documentation for `remote` servers and use `https://mcp.svelte.dev/mcp` as the URL.

apps/svelte.dev/content/docs/mcp/30-capabilities/10-tools.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-doc
33
title: Tools
44
---
55

6-
This is the list of available tools provided by the MCP server. The list of tools is given to the model which can decide to call one or more of the tools during a session.
6+
The following tools are provided by the MCP server to the model, which can decide to call one or more of them during a session:
77

88
## list-sections
99

10-
Provides a list of all the available documentation sections and their use cases if available. The titles of the sections will be used by the LLM to get up-to-date documentation directly from the official documentation.
10+
Provides a list of all the available documentation sections.
1111

1212
## get-documentation
1313

14-
Allows the model to get the full documentation for the requested sections. The documentation is fetched on the fly from the official Svelte documentation and it will always be up to date.
14+
Allows the model to get the full (and up-to-date) documentation for the requested sections directly from [svelte.dev/docs](/docs).
1515

1616
## svelte-autofixer
1717

1818
Uses static analysis to provide suggestions for the generated code. It should be invoked in a loop by the model until all issues and suggestions are resolved.
1919

2020
## playground-link
2121

22-
Generates an ephemeral playground link with the generated code. It's useful when the generated code is not written to a file in your project and you want to quickly test the generated solution. The code is not stored anywhere, the server uses the `share-with-hash` functionality of the Svelte playground to generate the correct hash on the fly (which is also why it will generate a pretty big link).
22+
Generates an ephemeral playground link with the generated code. It's useful when the generated code is not written to a file in your project and you want to quickly test the generated solution. The code is not stored anywhere except the URL itself (which will often, as a consequence, be quite large).

0 commit comments

Comments
 (0)