A comprehensive toolkit for installing and configuring Model Context Protocol (MCP) servers with Claude Desktop on Windows systems.
This repository contains scripts, configurations, and documentation to help Windows users successfully install and use Model Context Protocol (MCP) servers with Claude Desktop. It focuses on overcoming the common issues that prevent MCP connections on Windows, particularly problems with npx
commands, path resolution, and multiple Node.js installations.
- Diagnostic tools to identify Node.js installations
- Installation scripts that avoid common pitfalls
- Configuration templates with absolute paths
- Troubleshooting guides for "Could not attach to MCP server" errors
- Solutions for NVM and Node.js path issues
- Clone this repository
- Run
find-nodejs.bat
to identify your Node.js installations - Run
cleanup-nodejs.bat
if you have multiple installations - Run
install-mcp.bat
to install the MCP server of your choice - Follow the configuration instructions displayed
The most common issue on Windows is MCP servers failing to connect when using npx
commands in claude_desktop_config.json
. This is due to how Claude Desktop launches subprocesses on Windows.
Solution: Use direct node
execution with absolute paths, like:
{
"mcpServers": {
"server-name": {
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": [
"C:\\Users\\Username\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-name\\dist\\index.js",
"parameter1", "parameter2"
],
"env": {
"APPDATA": "C:\\Users\\Username\\AppData\\Roaming\\",
"PATH": "C:\\Program Files\\nodejs",
"NODE_PATH": "C:\\Users\\Username\\AppData\\Roaming\\npm\\node_modules"
}
}
}
}
Having multiple Node.js installations (especially with NVM) causes path resolution issues.
Solution: Use the standard Node.js installation in the default location and specify absolute paths.
Simply closing and reopening Claude Desktop often doesn't fully reload configurations.
Solution: End all Claude Desktop processes in Task Manager before restarting.
find-nodejs.bat
- Identifies all Node.js installations on your systemcleanup-nodejs.bat
- Cleans npm cache and fixes common installation issuesinstall-mcp.bat
- Installs MCP servers globally with proper pathsrun-server.bat
- Runs MCP servers for testing outside Claude Desktop
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License
- Model Context Protocol team
- Contributors to the MCP servers GitHub issue #40