You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/10-introduction/10-overview.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,18 @@
2
2
title: Overview
3
3
---
4
4
5
-
The official Svelte MCP (Model Context Protocol) Server can help your LLM or Agent of choice write better Svelte codeby 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.
6
6
7
7
## Setup
8
8
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)
10
13
11
14
## Usage
12
15
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.
14
17
15
18
```md
16
19
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.
38
41
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.
39
42
```
40
43
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.
Copy file name to clipboardExpand all lines: documentation/docs/20-setup/20-local-setup.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Local setup
3
3
---
4
4
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`:
6
6
7
7
```bash
8
8
npx -y @sveltejs/mcp
@@ -15,19 +15,19 @@ Here's how to set it up in some common MCP clients:
15
15
To include the local MCP version in Claude Code, simply run the following command:
You can choose your preferred `scope` (it must be `user`, `project` or `local`) and `name`.
22
22
23
23
## Claude Desktop
24
24
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:
26
26
27
27
```json
28
28
{
29
29
"mcpServers": {
30
-
"[name]": {
30
+
"svelte": {
31
31
"command": "npx",
32
32
"args": ["-y", "@sveltejs/mcp"]
33
33
}
@@ -39,10 +39,10 @@ The top level must be `mcpServers` but you can choose your preferred `name`.
39
39
40
40
## Codex CLI
41
41
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):
43
43
44
44
```toml
45
-
[mcp_servers.name]
45
+
[mcp_servers.svelte]
46
46
command = "npx"
47
47
args = ["-y", "@sveltejs/mcp"]
48
48
```
@@ -54,28 +54,28 @@ The top level must be `mcp_server` but you can choose your preferred `name`.
54
54
To include the local MCP version in Gemini CLI, simply run the following command:
Copy file name to clipboardExpand all lines: documentation/docs/20-setup/30-remote-setup.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Here's how to set it up in some common MCP clients:
11
11
To include the remote MCP version in Claude Code, simply run the following command:
12
12
13
13
```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
15
15
```
16
16
17
17
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`)
26
26
27
27
## Codex CLI
28
28
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):
30
30
31
31
```toml
32
32
experimental_use_rmcp_client = true
33
-
[mcp_servers.name]
33
+
[mcp_servers.svelte]
34
34
url = "https://mcp.svelte.dev/mcp"
35
35
```
36
36
@@ -41,7 +41,7 @@ To use HTTP servers in Codex you need to enable `experimental_use_rmcp_client` a
41
41
To include the remote MCP version in Gemini CLI, simply run the following command:
0 commit comments