Install an MCP Server in Claude Code on Windows: CLI & Config Guide
Install an MCP server for Claude Code on Windows using the CLI or manual config editing. Covers where Claude Code stores MCP servers (~/.claude.json and .mcp.json), Windows path formatting, and PowerShell commands.
Last updated 27 September 2026
Open PowerShell and run claude mcp add --scope user memory -- npx -y @modelcontextprotocol/server-memory. Claude Code saves it in %USERPROFILE%\.claude.json. For a server the whole team shares, use --scope project, which writes .mcp.json in your project root. If npx isn't found, use its full path from where.exe npx.cmd.
Adding an MCP server to Claude Code on Windows works the same way as on a Mac. The two Windows details are where the config file lives and how to write a Windows path inside JSON.
Prerequisites
- Node.js from nodejs.org, for servers that run with npx
- Claude Code, installed from PowerShell:
irm https://claude.ai/install.ps1 | iex(orwinget install Anthropic.ClaudeCode)
Method 1: CLI
# Add a server for yourself, in every project
claude mcp add --scope user memory -- npx -y @modelcontextprotocol/server-memory
# List configured servers
claude mcp list
# Remove
claude mcp remove memory
If you leave out --scope, Claude Code uses the local scope: only you, only in the current project.
Method 2: Edit .mcp.json by Hand
For a project server, create .mcp.json in your project root:
# Open it in VS Code from PowerShell
code .mcp.json
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
Do not hand-edit %USERPROFILE%\.claude.json. Claude Code keeps its own state in that file. Use the CLI for user-scoped servers.
When npx Isn't in PATH
# PowerShell — find full path
(Get-Command npx.cmd).Source
# C:\Program Files\nodejs\npx.cmd
{
"mcpServers": {
"memory": {
"command": "C:\\Program Files\\nodejs\\npx.cmd",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
C:\Program Files becomes C:\\Program Files in your JSON config.
Verify
claude mcp list # lists configured servers
claude mcp get memory # shows one server and checks that it connects
claude # start a session
/mcp # inside Claude Code: shows each server and its status
Frequently Asked Questions
Where does Claude Code store MCP servers on Windows?
User and local servers are in %USERPROFILE%\.claude.json. Project servers are in .mcp.json in the project root. %USERPROFILE%\.claude\settings.json holds other settings, not the servers that claude mcp add writes.
npx not found in Claude Code on Windows — quick fix?
Run (Get-Command npx.cmd).Source in PowerShell to get the full path. Use that path as the "command" value, doubling all backslashes.
Can I run Claude Code in WSL?
Yes. Install and run it inside WSL. WSL has its own home folder, so it uses its own ~/.claude.json. WSL and native Windows Claude Code do not share MCP servers.
TrustedSkills Team
The TrustedSkills team maintains the TrustedSkills index of AI agent skills. The index records where each skill comes from and how to install it. It does not review or audit skill code.