From 0482eddb62127769d2411e8b33cce06d884f2195 Mon Sep 17 00:00:00 2001 From: hideyukiMORI Date: Tue, 19 May 2026 23:06:16 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20Claude=20Desktop=20MCP=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=81=ABWSL2=E3=83=91=E3=82=BF=E3=83=BC=E3=83=B3?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=20(FT3-F3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #83 Co-Authored-By: Claude Sonnet 4.6 --- docs/howto/mcp-setup.md | 51 +++++++++++++++++++++++++++++++++++++- docs/ja/howto/mcp-setup.md | 51 +++++++++++++++++++++++++++++++++++++- 2 files changed, 100 insertions(+), 2 deletions(-) diff --git a/docs/howto/mcp-setup.md b/docs/howto/mcp-setup.md index 24927c8..d1440bc 100644 --- a/docs/howto/mcp-setup.md +++ b/docs/howto/mcp-setup.md @@ -12,7 +12,14 @@ Once configured, Claude Desktop and the `claude` CLI can perform CRUD operations ## Claude Desktop configuration -Add the following to `claude_desktop_config.json`: +`claude_desktop_config.json` is located at: + +| OS | Path | +|---|---| +| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` | +| Windows | `%APPDATA%\Claude\claude_desktop_config.json` | + +### macOS / Linux (native) ```json { @@ -38,6 +45,48 @@ Add the following to `claude_desktop_config.json`: Replace `/path/to/nene2-python` with the absolute path to this repository. +### Windows + WSL2 + +Claude Desktop runs on Windows but the project lives inside WSL2. +Use `wsl` as the command to bridge them: + +```json +{ + "mcpServers": { + "nene2-example": { + "command": "wsl", + "args": [ + "-e", "bash", "-c", + "cd /home//nene2-python && PYTHONPATH=src uv run python -m example.mcp" + ], + "env": { + "DB_ADAPTER": "sqlite", + "DB_NAME": "/home//nene2-python/data/nene2.db" + } + } + } +} +``` + +> All paths must be **WSL Linux paths** (e.g. `/home/user/...`), not Windows paths. +> The `DB_NAME` must also be a Linux path so SQLite creates the file inside WSL. + +For a project installed via `uv add git+...` (not the nene2-python repo itself): + +```json +{ + "mcpServers": { + "myapp": { + "command": "wsl", + "args": [ + "-e", "bash", "-c", + "cd /home//my-project && PYTHONPATH=src uv run python -m mcp_server" + ] + } + } +} +``` + ## Available tools | Tool | Description | diff --git a/docs/ja/howto/mcp-setup.md b/docs/ja/howto/mcp-setup.md index bfa8797..a77875c 100644 --- a/docs/ja/howto/mcp-setup.md +++ b/docs/ja/howto/mcp-setup.md @@ -12,7 +12,14 @@ Claude Desktop や `claude` CLI から直接 CRUD 操作が可能になります ## Claude Desktop への設定 -`claude_desktop_config.json` に以下を追加します: +`claude_desktop_config.json` のパス: + +| OS | パス | +|---|---| +| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` | +| Windows | `%APPDATA%\Claude\claude_desktop_config.json` | + +### macOS / Linux(ネイティブ) ```json { @@ -38,6 +45,48 @@ Claude Desktop や `claude` CLI から直接 CRUD 操作が可能になります `/path/to/nene2-python` をリポジトリの絶対パスに変更してください。 +### Windows + WSL2 + +Claude Desktop は Windows で動作しますが、プロジェクトは WSL2 内にあります。 +`wsl` コマンドでブリッジします: + +```json +{ + "mcpServers": { + "nene2-example": { + "command": "wsl", + "args": [ + "-e", "bash", "-c", + "cd /home//nene2-python && PYTHONPATH=src uv run python -m example.mcp" + ], + "env": { + "DB_ADAPTER": "sqlite", + "DB_NAME": "/home//nene2-python/data/nene2.db" + } + } + } +} +``` + +> パスはすべて **WSL の Linux パス**(例: `/home/user/...`)で指定します。 +> `DB_NAME` も Linux パスにすることで、SQLite ファイルが WSL 内に作成されます。 + +`uv add git+...` でインストールした外部プロジェクトの場合: + +```json +{ + "mcpServers": { + "myapp": { + "command": "wsl", + "args": [ + "-e", "bash", "-c", + "cd /home//my-project && PYTHONPATH=src uv run python -m mcp_server" + ] + } + } +} +``` + ## 利用可能なツール | ツール | 説明 |