ローカル(または stdio)バージョンの MCP サーバーは、[`@sveltejs/mcp`](https://www.npmjs.com/package/@sveltejs/mcp) npm パッケージで利用できます。グローバルにインストールして設定で参照するか、または `npx` で実行することもできます: ```bash npx -y @sveltejs/mcp ``` 以下は、一般的な MCP クライアントでの設定方法です: ## Claude Code Claude Code でローカル MCP バージョンを含めるには、次のコマンドを実行するだけです: ```bash claude mcp add -t stdio -s [scope] svelte -- npx -y @sveltejs/mcp ``` `[scope]` には `user`、`project` または `local` を指定する必要があります。 ## Claude Desktop Settings > Developer セクションで、Edit Config をクリックします。`claude_desktop_config.json` ファイルがあるフォルダが開きます。そのファイルを編集して、次の構成を含めます: ```json { "mcpServers": { "svelte": { "command": "npx", "args": ["-y", "@sveltejs/mcp"] } } } ``` ## Codex CLI `config.toml` に次の内容を追加します(デフォルトでは `~/.codex/config.toml` ですが、より高度なセットアップについては [the configuration documentation](https://github.com/openai/codex/blob/main/docs/config.md) を参照してください): ```toml [mcp_servers.svelte] command = "npx" args = ["-y", "@sveltejs/mcp"] ``` ## Copilot CLI Use the Copilot CLI to interactively add the MCP server: ```bash /mcp add ``` Alternatively, create or edit `~/.copilot/mcp-config.json` and add the following configuration: ```json { "mcpServers": { "svelte": { "command": "npx", "args": ["-y", "@sveltejs/mcp"] } } } ``` ## Gemini CLI Gemini CLI でローカル MCP バージョンを含めるには、次のコマンドを実行するだけです: ```bash gemini mcp add -t stdio -s [scope] svelte npx -y @sveltejs/mcp ``` `[scope]` には `user`、`project` または `local` を指定する必要があります。 ## OpenCode You can automatically configure the MCP server using the [OpenCode plugin](opencode-plugin) (recommended). If you prefer to configure the MCP server manually, run: ```bash opencode mcp add ``` 以下のインストラクションに従い、'Select MCP server type' プロンプトで 'Local' を選択します: ```bash opencode mcp add ┌ Add MCP server │ ◇ Enter MCP server name │ svelte │ ◇ Select MCP server type │ Local │ ◆ Enter command to run │ npx -y @sveltejs/mcp ``` ## VS Code - コマンドパレットを開く - "MCP: Add Server..." を選択 - "Command (stdio)" を選択 - 入力欄に `npx -y @sveltejs/mcp` と入力して `Enter` を押す - 名前を尋ねられたら `svelte` と入力 - `Global` MCP サーバーとして追加するか `Workspace` MCP サーバーとして追加するか選択 ## Cursor You can automatically configure the MCP server using the [Cursor plugin](cursor-plugin) (recommended). If you prefer to configure the MCP server manually you can: - Open the command palette - Select "View: Open MCP Settings" - Click on "Add custom MCP" これによって MCP サーバーのファイルが開くので、次の構成を追加します: ```json { "mcpServers": { "svelte": { "command": "npx", "args": ["-y", "@sveltejs/mcp"] } } } ``` ## Zed Install the [Svelte MCP Server extension](https://zed.dev/extensions/svelte-mcp).
Configure Manually - 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: ```json { "svelte": { "command": "npx", "args": ["-y", "@sveltejs/mcp"] } } ```
## Other clients もしお使いの MCP クライアントの設定例がない場合は、その MCP クライアントのドキュメントで `stdio` サーバーについて参照し、コマンドとして `npx`、引数として `-y @sveltejs/mcp` を使用してください。