MCP Server Race Condition Causes Infinite Process Spawning on Windows (Cursor 2.0.34)

In case it helps, I got a temporary hack to work using a simple PowerShell wrapper script.

npx-wrapper.ps1

param(
    [Parameter(ValueFromRemainingArguments = $true)]
    [string] $Args
)

& npx @Args

exit $LASTEXITCODE

Then configure the npx MCP server like this:

“obsidian-volta”: {
“command”: “pwsh”,
“args”: [
“-NoLogo”,
“-NoProfile”,
“-ExecutionPolicy”,
“Bypass”,
“-File”,
“C:\path\to\npx-wrapper.ps1”,
“-y”,
“mcp-obsidian”,
“C:\Obsidian\MainVault”
]
}

1 Like