The Complete Guide to Setting Up MCP Servers on Windows (The Hard-Won Way)
A comprehensive guide documenting the actual process of getting MCP (Model Context Protocol) servers working with Claude Code on Windows, including all the pitfalls, dead-ends, and solutions discovered through real troubleshooting.
This repository documents the complete journey of setting up MCP servers on Windows, including:
- β What worked (the actual solution)
- β What didn't work (and why)
- π Common errors and how to fix them
- πͺ Windows-specific gotchas
- π Working examples you can copy/paste
Target Audience: Future AIs helping users set up MCP, and humans who want to understand MCP configuration.
- Create
.mcp.jsonin your project root (not.claude.json, notsettings.json) - Use
cmd /cwrapper for npx commands (Windows requirement) - Restart Claude Code from that project directory
- Approve servers when prompted
Working Example:
{
"mcpServers": {
"filesystem": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-filesystem", "D:/1337"]
}
}
}Key Points:
- β
Use
"command": "cmd"(NOT"npx") - β
First arg is
"/c" - β
Use forward slashes in paths:
"D:/1337"(NOT"D:\\1337") - β
File location: Project root
.mcp.json(NOT.claude/.mcp.json)
- What Are MCP Servers?
- Setup Guide - Step-by-step instructions
- Windows-Specific Issues - Platform gotchas
- Troubleshooting - Common problems & solutions
- Examples - Working configurations
- What We Learned - Key takeaways
MCP (Model Context Protocol) is Anthropic's standard for connecting Claude to external tools and data sources.
- π‘ Claude can only read files you explicitly mention
- π‘ No project-wide intelligence
- π‘ Can't access GitHub, databases, or external services
- π‘ Knowledge cutoff limitations
- β Claude autonomously explores your entire project
- β Analyzes codebases intelligently
- β Creates GitHub PRs, queries databases
- β Real-time web search
- β Browser automation
Example Use Cases:
- "Find all TODO comments across all projects" β Filesystem MCP
- "Create a GitHub PR for this fix" β GitHub MCP
- "What's the latest Electron security patch?" β Brave Search MCP
- "Take a screenshot of my app" β Puppeteer MCP
claude --mcp-config D:\1337\.claude\quick-start-mcp.jsonResult: Didn't work. Claude Code started but MCP servers never loaded.
Why it failed: The --mcp-config flag doesn't work reliably on Windows (as of v2.0.37).
Added mcpServers object to D:\1337\.claude\.claude.json:
{
"projects": {
"D:\\1337": {
"mcpServers": {
"filesystem": { ... }
}
}
}
}Result: Didn't work. Servers never loaded.
Why it failed: Claude Code doesn't read mcpServers from .claude.json anymore (changed in recent versions).
Tried adding mcpServers to .claude/settings.local.json:
{
"mcpServers": { ... }
}Result: Schema validation error!
Error message:
Settings validation failed:
- : Unrecognized field: mcpServers
Why it failed: mcpServers is NOT a valid field in settings.json schema.
Created D:\1337\.mcp.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "D:/1337"]
}
}
}Result: Claude Code found the file! But gave warnings:
[Warning] [filesystem] mcpServers.filesystem: Windows requires 'cmd /c' wrapper to execute npx
Progress: Claude Code detected the config, but couldn't start servers.
Fixed the config:
{
"mcpServers": {
"filesystem": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-filesystem", "D:/1337"]
}
}
}Result: π WORKED!
Claude Code showed approval dialog:
3 new MCP servers found in .mcp.json
Select any you wish to enable.
β― filesystem β
sequential-thinking β
puppeteer β
After pressing Enter:
Loading MCP servers...
β filesystem
β sequential-thinking
β puppeteer
MCP tools available: 15
Victory! π
-
File Location Matters
- β
.mcp.jsonin project root - β
.claude/.mcp.json - β
.claude.json - β
settings.json
- β
-
Windows Requires
cmd /cWrapper"command": "cmd", "args": ["/c", "npx", "-y", "..."]
-
Path Format
- β
Forward slashes:
"D:/1337" β οΈ Backslashes need escaping:"D:\\1337"(but forward slashes are easier)
- β
Forward slashes:
-
Version-Specific Behavior
- As of Claude Code v2.0.37, MCP configuration has moved away from
.claude.json - Older documentation may be outdated
- As of Claude Code v2.0.37, MCP configuration has moved away from
-
Diagnostic Tools
/doctorcommand shows MCP diagnostics/mcpcommand lists loaded servers- Both are essential for troubleshooting
- Setup Guide - Complete step-by-step setup instructions
- Windows-Specific Issues - Platform-specific gotchas and solutions
- Troubleshooting - Solutions to common problems
- Examples - Working configurations for popular MCP servers
| Server | Purpose | API Key Required? |
|---|---|---|
| filesystem | Project-wide file access | β No |
| sequential-thinking | Multi-step reasoning | β No |
| puppeteer | Browser automation | β No |
| github | Repository management | β Yes (PAT) |
| brave-search | Real-time web search | β Yes (API key) |
| postgresql | Database queries | β Yes (DB creds) |
| mongodb | MongoDB operations | β Yes (DB creds) |
| slack | Slack integration | β Yes (Bot token) |
See Examples for configuration details.
Solution: Check these in order:
- Is
.mcp.jsonin your project root? (Runls -lato verify) - Did you use
cmd /cwrapper? (Check with/doctor) - Did you restart Claude Code after creating the file?
- Are you in the correct directory when starting Claude?
Solution:
- Run
/mcpto see loaded servers and available tools - Try a simple test:
"List files in this directory" - Check if Node.js/npx is in PATH:
node --version
See Troubleshooting Guide for more.
Found a different solution? Hit another issue? Contributions welcome!
- Fork this repo
- Create a feature branch
- Document your findings
- Submit a PR
Especially valuable:
- Solutions for different Windows versions
- PowerShell-specific issues
- Alternative configurations that work
MIT License - See LICENSE file for details.
This guide was created through actual troubleshooting with Claude (Sonnet 4.5) helping a user set up MCP servers on Windows. Every "what didn't work" section represents a real attempt and debugging session.
Why document the failures? Because knowing what doesn't work is often more valuable than just knowing what does. It saves time and prevents others from going down the same dead-ends.
- Official MCP Docs: https://docs.claude.com/en/docs/claude-code/mcp
- Claude Code Issues: https://github.com/anthropics/claude-code/issues
- MCP Servers Repository: https://github.com/modelcontextprotocol/servers
# Check if MCP is working
/mcp
# Run diagnostics
/doctor
# Test MCP servers
"List all files in the project"
"Find all TODO comments"
"What JavaScript files exist?"
# Restart to reload config
Ctrl+C β cd D:\1337 β claudeLast Updated: November 14, 2025 Claude Code Version: 2.0.37 Platform: Windows 11
Made with β€οΈ by humans and AI working together