Claude Windows MCP Setup | Steps for config.json and OneDrive Issues

Are you stuck with "failed" or "disconnected" errors while trying to add an MCP server to Claude on Windows? The Windows-specific pitfalls are concentrated in four areas: PowerShell execution policy, path notation in config.json, path mismatches under OneDrive, and fully quitting the app after changing settings. This article walks you through the steps to get MCP to show "running" as quickly as possible.

AI Chat Article Summarypowered by Claude
結論powered by Claude

The prerequisites for adding MCP to Claude on Windows are three things: the Claude Desktop app, a Pro plan or higher, and Node.js. The Free plan cannot use Cowork or MCP, and without Node.js the official npx-based MCP servers will not start. Feature availability by plan can change, so check the Anthropic official pricing page for the latest information (as of May 2026) before subscribing. If PowerShell's execution policy is left at Restricted, npm install will be blocked, making a change to RemoteSigned effectively mandatory.

Configuration is done by going to Menu → File → Settings → Developer → Edit Settings to open claude_desktop_config.json directly. The biggest differences from Mac are that Windows path separators must be escaped as \\, and paths containing spaces or Japanese characters must be wrapped in double quotes.

The two main stumbling blocks are the OneDrive path mismatch and settings not taking effect. When your Desktop or Documents folders are synced under OneDrive, %USERPROFILE%\Desktop can diverge from the actual path, causing the filesystem MCP to fail to connect. After changing settings, just closing the window is not enough — you must fully quit from the system tray and restart the app.

目次 (12)

Prerequisites for Adding MCP to Claude on Windows — Desktop vs. Code Have Different Routes

When people say "add MCP to Claude on Windows," there are two different targets. One is Claude Desktop, which is chat-centric, and the other is Claude Code (CLI), which is terminal-centric. MCP works with both, but the setup method and difficulty are completely different source.

On the Claude Desktop side, you open a JSON file via the GUI and add entries by hand — most Windows users will take this route. On the Claude Code side, claude mcp add <name> <command> completes in a single CLI line, so developers may find it faster source. This article focuses on Claude Desktop and briefly covers the shortest route for Claude Code at the end.

As a prerequisite, you need a Pro plan or higher (as of May 2026). The Free plan does not unlock MCP integration or Cowork — the features are not available at the authentication stage source. Plan feature availability is subject to change, so always check the official Anthropic pricing page for the latest information before subscribing. For plan differences see Claude Pricing Plans: Complete Guide, and for an overview of MCP see What Is Claude MCP | Feature List and 5-Step Connection Guide.

Prerequisites — Installing Node.js and Changing the PowerShell Execution Policy

Before running MCP on Windows, make sure to complete the following two steps.

  1. Install the Node.js LTS version — Download the installer from the official site and install with default settings. Many of the official MCP reference implementations launch as npx @modelcontextprotocol/server-*, so Node.js and npm must be in your PATH.
  2. Change the PowerShell execution policy to RemoteSigned — With the default value of Restricted, scripts are blocked when running npm install or npx. Open PowerShell as Administrator and run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned source.

To verify, open a new PowerShell window and run node -v and npm -v. If both return version numbers, you are good to go. If you see 'node' is not recognized, the PATH has not been updated yet — try reopening the window, or restart the OS as a last resort. Installing Git for Windows at this stage is also helpful, as it makes investigating OneDrive path issues with commands like Get-Item easier later.

4 Steps to Enable MCP in Claude Desktop

Once Claude Desktop is running, follow these steps to reach the settings screen.

Step 1: Open the Settings Screen

Click the hamburger menu (three lines) in the upper left of the window and select File → Settings. The menu structure differs from the Mac version, so pay attention to the File menu location if you are following English-language instructions.

Step 2: Open the JSON Editor in the Developer Tab

In the settings modal's left sidebar, select the Developer tab, then click the Edit Settings button in the Local MCP Servers section. Clicking it opens Explorer and shows the location where claude_desktop_config.json is stored (usually %APPDATA%\Claude\) source.

Step 3: Edit claude_desktop_config.json

Open the file in a text editor (VS Code recommended) and add the server definition directly under the mcpServers key. A minimal example looks like this:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\<username>\\Documents"
      ]
    }
  }
}

The Windows-specific things to watch out for are escaping path separators as \\ and wrapping paths that contain spaces or Japanese characters in double quotes. A single \ is interpreted as an escape character by the JSON parser, causing an Invalid character load failure source.

Step 4: Fully Quit Claude Desktop and Restart

Clicking × in the upper right of the window leaves Claude Desktop running in the background. Right-click the icon in the system tray (bottom right of the screen) → Quit, or end Claude.exe in Task Manager, then restart the app. Without this step, JSON edits are not applied, leading to the mistaken belief that "it's set up but not working" source.

Writing claude_desktop_config.json — Path and Escape Pitfalls

There are three recurring landmines when writing claude_desktop_config.json on Windows.

  1. Not escaping the path separator \ — Writing C:\Users\... in JSON makes \U an invalid sequence, causing a parse error. Replace with \\ or use forward-slash notation like C:/Users/....
  2. Writing environment variables like %USERPROFILE% directly — Environment variables are not expanded inside args. Write the full path, or expand them explicitly using the env key.
  3. Using npx instead of npx.cmd in the commandnpx works from PowerShell, but in some cases Claude Desktop's internal execution requires the .cmd extension. If it fails, switching to "command": "npx.cmd" is the standard workaround source.

When adding multiple MCP servers, you list keys directly under mcpServers. The server name (e.g., filesystem, github, notion) appears in the tool list in Claude's chat interface, so use an alphanumeric name that you can easily recognize.

A complete claude_desktop_config.json with both filesystem and github looks like this:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\<username>\\Documents"
      ]
    },
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
      }
    }
  }
}

The most important point when adding a second or subsequent entry is comma placement. Place a comma , immediately after the closing brace } of the filesystem definition, and do not place a comma after the closing } of the last entry (github). JSON fails to load with the Invalid character error this article repeatedly warns about if a trailing comma is left after the last element. If you add three or more entries, always follow the rule: commas after every definition except the last one.

OneDrive Path Issues — Verify the Real Path Before Passing It

The biggest stumbling block for Windows MCP users is the OneDrive-synced Desktop and Documents problem. If you have a Microsoft 365 subscription, your Desktop, Documents, and Pictures folders are synced under OneDrive by default, and the actual path may have been replaced with C:\Users\<name>\OneDrive\Desktop.

In this case, passing C:\Users\<name>\Desktop to the filesystem MCP results in Claude seeing nothing, because the actual folder is elsewhere. The connection itself may drop with failed or disconnected source.

To work around this, open your Desktop in Explorer, then click the address bar and copy the real path shown into your config. Alternatively, run the following command in PowerShell to instantly retrieve the redirect destination from the registry:

Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' | Select-Object Desktop, Personal

If the Desktop / Personal (Documents) values in the output point to C:\Users\<name>\OneDrive\..., that is the real path you should pass to the config. Copying the command directly also avoids the problem of long registry paths wrapping in the body text and introducing line breaks during copy-paste.

If you cannot disable OneDrive sync on a company-issued PC, the safest approach is to set the root passed to MCP to a dedicated folder like C:\mcp-workspace. This isolates Claude's working area from OneDrive and reduces the risk of confidential files being accessed unintentionally.

Verifying Operation and Fixing "Settings Not Taking Effect"

After restarting Claude Desktop, a tool icon (plug-shaped) should appear in the lower left of the chat input area, listing the MCP server names and available tools. If you added filesystem, you should see read_file, write_file, list_directory, and similar tools.

If the tool icon does not appear, or a server name shows disconnected, follow these diagnostic steps in order:

  1. Check logs in the Developer tab of Settingsmcp-server-<name>.log files are generated under %APPDATA%\Claude\logs\. ENOENT means a path problem, EACCES means a permissions problem, and MODULE_NOT_FOUND means the npm package has not been fetched.

  2. Try launching the server standalone with npx — Run the following command directly in PowerShell to get the error message. Stack traces that are swallowed when going through Claude will be visible here.

    npx -y @modelcontextprotocol/server-filesystem "C:\path"
    
  3. Run the JSON through JSON Lint — Missing commas, extra commas, or mixed tab characters are common causes, and auto-formatting in your editor will catch them immediately.

  4. Check for Claude Desktop lingering in the background — Verify in Task Manager that Claude.exe is not still running. If it is, right-click → End Task, then restart source.

Deleting the %APPDATA%\Claude folder itself to reset everything except login information resolves about 80% of cases where you are stuck due to a misconfiguration. Be sure to back up your settings JSON before doing this.

Using MCP with Claude Code — Done in One CLI Line

On the Claude Code (terminal) side, MCP is added with a CLI command rather than by editing a JSON file.

claude mcp add filesystem npx -- -y @modelcontextprotocol/server-filesystem "C:\path"
claude mcp list
claude mcp remove filesystem

Everything after -- in add is treated as command-line arguments for the MCP server, and paths containing spaces pass through cleanly with double quotes source. It supports three methods — stdio, SSE, and Streamable HTTP: stdio is for local processes, and SSE and Streamable HTTP are for remote MCP servers.

In environments where you use both Desktop and Code, note that MCP scopes are separate. claude_desktop_config.json for Desktop and the Code configuration are not synchronized, so if you want to use MCP in both, you must register it in both. For installing Claude Code itself on Windows, see Claude Code on Windows | Setup via WSL, WinGet, and 3 Routes.

Summary — Windows MCP Comes Down to 4 Points: Node + PowerShell + Path + Full Quit

Adding MCP to Claude on Windows ultimately comes down to four things: install Node.js, relax the PowerShell execution policy, escape paths in claude_desktop_config.json, and fully quit from the system tray after making changes. When Mac instructions don't work on Windows, the cause is almost always one of these four. The OneDrive redirect and "just closed the window" problems catch even experienced users, so make a habit of verifying the real path and quitting via Task Manager from the start — it will save a lot of time later. For a list of supported MCP servers and a guide to building your own, see What Is Claude MCP | Feature List and 5-Step Connection Guide.

参考になったら ♡
Clauder Navi 編集部
@clauder_navi

Anthropic の Claude / Claude Code を中心に、日本のエンジニア向けに最新動向と実務 を毎日発信。 運営方針 は メディアについて をご覧ください。