Windows上配置Claude MCP完整指南
大多数MCP教程假设你用Mac。Windows有自己的坑。
Claude MCP Setup on Windows 2026: Complete Guide with Working Configs
Windows users hit three MCP problems that Mac users never see: npx path issues, missing Node.js, and the wrong config file location. This guide solves all three.
Step 1: Install Node.js (Required for npx-based servers)
Download the LTS installer from nodejs.org. Verify:
node --version
npx --version
Most MCP servers from the official collection run via npx, so Node is mandatory.
Step 2: Find the Right Config File
On Windows, the config lives at %APPDATA%/Claude/claude_desktop_config.json - typically C:/Users/YOURNAME/AppData/Roaming/Claude/claude_desktop_config.json
Step 3: The Windows-Specific Quirk
Mac uses "command": "npx". Windows needs cmd /c:
{
"mcpServers": {
"filesystem": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-filesystem", "C:/Users/YOURNAME/Documents"]
}
}
}
Note: on Windows the args use the actual path with forward slashes or escaped backslashes.
Step 4: Restart and Verify
- Fully quit Claude Desktop (check the system tray icon - it keeps running!)
- Relaunch
- Look for the hammer/tool icon in the chat box
- Ask: "what tools do you have available?"
Troubleshooting Table
| Symptom | Cause | Fix |
|---|---|---|
| Tool never appears | Claude not fully restarted | Kill from system tray, restart |
| Error npx is not recognized | Node not in PATH | Reinstall Node with default options |
| Server crashes instantly | Wrong path separators | Use forward slashes in JSON |
| Config ignored | Wrong file location | Check %APPDATA%/Claude/ |
| Firewall prompt | npx downloads packages | Click Allow |
FAQ
Do I need WSL? Not for basic MCP servers. Native Windows works for filesystem, fetch, GitHub, and most servers. Docker-based servers want WSL2 or Docker Desktop.
Can I use Python MCP servers on Windows? Yes - set "command": "python" with the script path in args.
How do I see server logs on Windows? Claude Desktop logs to %APPDATA%/Claude/logs/ - check mcp log files for connection errors.
