Local MCP servers with absolute paths with spaces do not work

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

If the command binary has a space in the name, it will fail to load. No amount of string escaping I’ve attempted seems to work. This problem exists on Windows, Mac, and Linux versions of cursor.

This is not an issue with VSCode, Claude Code, etc and seems unique to Cursor.

Steps to Reproduce

This doesn’t work:

    "HzOSDevMCP": {
      "name": "HzOSDevMCP",
      "command": "/Applications/Meta\\ Quest\\ Developer\\ Hub.app/Contents/Resources/bin/hzos-dev-mcp",
      "args": [
      ],
      "env": {
      }
    }

Not escaping the spaces also fails.

Horrible work around that does work is bouncing through sh -c or cmd.exe /c

    "HzOSDevMCP": {
      "name": "HzOSDevMCP",
      "command": "sh",
      "args": [
        "-c",
        "/Applications/Meta\\ Quest\\ Developer\\ Hub.app/Contents/Resources/bin/hzos-dev-mcp"
      ],
      "env": {
      }
    }

Expected Behavior

Spaces in the command should work. No workaround escaping paths in the command seem to work. The shell command split parsing logic is probably broken in cursor.

Operating System

Windows 10/11
MacOS
Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.49
VSCode Version: 1.105.1
Commit: 21a2ed198584d56a91c0b996d1a09c93f8538440
Date: 2025-12-05T07:49:06.016Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey @Zac_Bowling

You’re right: when no args are supplied, Cursor falls back to legacy command parsing that doesn’t handle spaces well. Let me dig into it.

It seems the problem is worse on Windows too because no incantation of an install link works for Windows no mater how I escape it if there is a space. It looks like args get reinterpreted back and forth. Cursor, both with the web link bouncer and the direct deeplink will strip off most of my escaping at different stages of the flow. I can’t find any solution that works.

This deeplink was created with the website:

And this one manually:

https://cursor.com/en-US/install-mcp?name=HzOSDevMCP&config=eyJuYW1lIjoiSHpPU0Rldk1DUCIsImNvbW1hbmQiOiJjbWQiLCJhcmdzIjpbIi9jIiwiQzpcXFByb2dyYW1cXCBGaWxlc1xcTWV0YVxcIFF1ZXN0XFwgRGV2ZWxvcGVyXFwgSHViXFxyZXNvdXJjZXNcXGJpblxcaHpvcy1kZXYtbWNwLmV4ZSJdLCJlbnYiOnt9fQ==

What is displayed on the website isn’t what is encoded.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.