MCP stdio command with spaces in path broken on Windows (cmd splits at space); same mcp.json works in VS Code

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

On Windows, Cursor fails to start stdio MCP servers when mcp.json uses a command path that contains a space (common under C:\Users<First Last>...). The host appears to invoke cmd without quoting the executable, so the path is split at the first space (e.g. C:\Users\Jane is treated as the program). The same mcp.json configuration works in VS Code on the same machine.

Steps to Reproduce

On Windows, place (or point to) an MCP server executable under a user profile path that includes a space in the username segment, e.g. C:\Users\Jane Doe...\server.exe.
In global or project MCP config, set:
“command”: “C:\Users\Jane Doe\…\server.exe”
optional “args”, “env”.
Reload MCP / restart Cursor.
Open Output → MCP (or MCP logs) and observe the server failing to launch.

Expected Behavior

Cursor should start the stdio MCP process with the full executable path preserved as a single argument (proper quoting / CreateProcess-style argv), matching VS Code behavior, so MCP servers work when installed under normal Windows user folders with spaces.

Operating System

Windows 10/11

Version Information

Version: 3.3.30 (user setup)
VSCode Version: 1.105.1
Commit: 3dc559280adc5f931ade8e25c7b85393842acf30
Date: 2026-05-09T18:28:42.332Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Additional Information

The same mcp.json MCP server entry (identical command, args, and env) starts and runs correctly in VS Code on the same Windows machine. The failure is specific to Cursor’s MCP host / process launcher, not the server binary or the JSON config.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report. This is a known bug: when args is empty, Cursor splits command by spaces and breaks Windows paths like C:\Users\First Last\... or C:\Program Files\.... VS Code doesn’t use this code path, so it works there.

Workaround: wrap the launch with cmd /c and move the path into args, so the space-splitting doesn’t happen:

"mcpServers": {
  "my-server": {
    "command": "cmd",
    "args": ["/c", "C:\\Users\\Jane Doe\\...\\server.exe"],
    "env": {}
  }
}

If your server has its own args, add them after that in the args array.

I filed this internally as a separate issue with a link to this thread and the exact code location. I can’t share an ETA for a native fix yet. I’ll update you when I have news. Let me know if the cmd /c workaround works for you.