Skip to content

Commit e451ecb

Browse files
committed
Extend options for Claude MCP integration + Clarify to which extent the instructions have been tested
1 parent bdb8b8d commit e451ecb

1 file changed

Lines changed: 37 additions & 7 deletions

File tree

templates/README.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,49 @@ This folder contains MCP server configuration templates for different editors an
44

55
## Quick Setup
66

7-
### VS Code
7+
### VS Code (verified)
88
1. Copy `vscode-mcp.json` to `.vscode/mcp.json` in your project root
99
2. Start the server either directly from the file (toggles appear above the server name) or the Extensions icon (right-click on the server)
1010
3. Use Agent mode in Copilot Chat to access parse-patrol tools
1111

12-
### Claude Desktop
12+
### Claude Desktop (experimental)
13+
14+
**Option 1: Project-scoped (Recommended)**
15+
```bash
16+
# From your parse-patrol project directory
17+
# First ensure dependencies are installed
18+
uv sync --extra mcp
19+
20+
# Add the MCP server - use absolute path to ensure correct environment
21+
claude mcp add parse-patrol --scope project -- sh -c "cd $(pwd) && PYTHONPATH=src uv --project $(pwd) run python -m parse_patrol"
22+
23+
# Alternative: Use the venv python directly
24+
# claude mcp add parse-patrol --scope project -- sh -c "cd $(pwd) && PYTHONPATH=src $(pwd)/.venv/bin/python -m parse_patrol"
25+
```
26+
27+
**Environment Issues:**
28+
- The `claude mcp add` command may run in a different `uv` environment than your project
29+
- Using `--project $(pwd)` ensures `uv` uses the correct project environment
30+
- Alternatively, use the venv Python directly: `.venv/bin/python`
31+
32+
**Option 2: Manual configuration**
1333
1. Copy `claude-desktop-mcp.json` content to your Claude Desktop configuration file:
1434
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
1535
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
16-
2. Restart Claude Desktop
17-
3. Tools will be available in Claude Desktop conversations
18-
19-
### Neovim (with MCP support)
36+
- **Linux/Ubuntu**: `~/.config/Claude/claude_desktop_config.json`
37+
2. **Important**: Update `/path/to/parse-patrol` with your actual project path
38+
3. Restart Claude Desktop
39+
40+
**Troubleshooting Claude MCP:**
41+
- **Environment mismatch**: If "No module named 'mcp'" error, the `uv` environment differs from your project
42+
- Use `uv --project $(pwd) run` or direct venv path: `.venv/bin/python`
43+
- Test manually: `cd /your/project && PYTHONPATH=src uv run python -m parse_patrol`
44+
- **Connection closed**: Server starts but immediately closes
45+
- Check dependencies: `uv sync --extra mcp`
46+
- Verify imports work: `PYTHONPATH=src uv run python -c "import parse_patrol.__main__"`
47+
- **Server doesn't sync**: Try restarting Claude Desktop after adding the server
48+
49+
### Neovim (with MCP support) (experimental)
2050
1. Copy `neovim-mcp.json` to your Neovim MCP configuration location
2151
2. Configure according to your MCP plugin requirements
2252

@@ -78,4 +108,4 @@ uv sync --extra mcp
78108
1. **"No module named 'mcp'" error**: Install MCP dependencies with `uv sync --extra mcp`
79109
2. **"No module named parse_patrol" error**: Ensure `PYTHONPATH` is set correctly in the configuration
80110
3. **Server won't start**: Check that `uv` is installed and the path is correct
81-
4. **Import errors**: Ensure you're using `python -m parse_patrol` (module syntax) not direct file paths
111+
4. **Import errors**: Ensure you're using `uv run python -m parse_patrol` (module syntax) not direct file paths

0 commit comments

Comments
 (0)