MCP approval could not work on Windows due to powershell returns list of paths not single path

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Well. Sometimes agent cli just does not approve MCP. It shows error message

-> mcp_name - error
Failed to load MCP ‘mcp_name’: MCP server “mcp_name” has not been approved

Related issue was MCP servers are not recognized with cursor-cli in a CI environment I used scripts from there to fix the issue. It seems the issue is that “cwd” returns list of paths but code expects single path.

Steps to Reproduce

  • Run windows OS
  • Create MCP config locally in project_dir\.cursor\mcp.json
  • Run agent cli
  • Go to /mcp list
  • Choose mcp for approval

In my case I use Win10 PowerShell7.0 and safishamsi/graphify MCP via local config:
{
“mcpServers”: {
“graphify”: {
“type”: “stdio”,
“command”: “uv”,
“args”: [
“run”,
“–isolated”,
“–no-project”,
“–python”,
“3.12”,
“–with”,
“graphifyy”,
“–with”,
“mcp”,
“python”,
“-m”,
“graphify.serve”,
“C:\Users\user\repos\whatever\graphify-out\graph.json”
]
}
}
}

Expected Behavior

It must approve MCP correctly

Operating System

Windows 10/11

Version Information

CLI Version: 2026.05.05-84a231c
Model: GPT-5.5 272K Medium
OS: win32 (x64)
Terminal: vscode
Shell: cmd
Last Request ID: 99526f6c-640e-4b87-8339-8400cdc5753f
User Email: [email protected]

For AI issues: which model did you use?

GPT-5.5

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. This is a known symptom, and for the CLI on Windows we’ve seen a few similar reports with per-project .cursor/mcp.json. The “powershell returns a list of paths” idea doesn’t fit, approval doesn’t call the shell, it uses pure Node path APIs. Most likely the root cause is inconsistent drive letter casing on Windows (c:\... vs C:\...) from process.cwd(), so the approval gets saved and read from different folders under ~/.cursor/projects/. No ETA yet, but I’ll log a Windows-specific repro on our side.

Workarounds for now:

  • Move the config to the global ~/.cursor/mcp.json (%USERPROFILE%\.cursor\mcp.json). Global MCPs are auto-approved and won’t prompt per workspace.
  • Run the CLI with --approve-mcps for interactive runs.
  • For headless or CI, use --force or --trust.

If you’re working from the project folder and don’t want a global config, try entering the directory in exactly the same way, with the same drive letter case, as when you first approved. That empirically helps until we ship a fix.

Let me know which workaround worked for you.

Hello

Got it.

I’ve tried both workarounda at the same time it deffinetely hepled. Even if I put mcp back to local project dir from global

Thank you for solution!

Have a great day!