Windows上配置Claude MCP完整指南

2026-08-01 约 5 分钟阅读

大多数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

  1. Fully quit Claude Desktop (check the system tray icon - it keeps running!)
  2. Relaunch
  3. Look for the hammer/tool icon in the chat box
  4. 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.

相关文章
2026-06-29
高收益主线龙头策略——不花钱的数据,也能抓到龙头
2026-06-29
你笔记本里,藏着一个AI
2026-07-14
免费AI编程助手 2026 配置指南:VS Code 5分钟装 Continue、Copilot、Windsurf

💬 评论 (0)

暂无评论,来说两句吧~

登录后评论