Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Description
When working on a project opened in WSL Remote (vscode-remote://wsl+ubuntu/…), MCP works in Cursor IDE, but breaks after using the Cursor Agents window on the same workspace.
Both the IDE and the Agents window open the project in WSL Remote mode — not as a native Windows folder (\wsl$... or D:...).
After switching IDE ↔ Agents window, the agent can no longer call MCP tools. Settings → MCP still shows the server as Connected, but tool calls fail or return empty results.
This does not appear to be a misconfigured mcp.json. It looks like per-workspace MCP/session state gets corrupted when switching between the two Cursor UIs on the same remote workspace.
Environment
- OS: Windows (host) + WSL Ubuntu (remote)
- Cursor: Windows app, workspace opened via WSL Remote
- Workspace URI: vscode-remote://wsl+ubuntu/home//…/project
- MCP server: codegraph (installed on WSL only, not on Windows PATH)
- MCP config: .cursor/mcp.json in project (or ~/.cursor/mcp.json on WSL)
Example MCP config:
{
“mcpServers”: {
“codegraph”: {
“type”: “stdio”,
“command”: “codegraph”,
“args”: [“serve”, “–mcp”, “–path”, “${workspaceFolder}”]
}
}
}
Actual Behavior
- MCP tool calls fail after switching IDE ↔ Agents window
- Settings → MCP still shows the server as Connected
- Agent cannot use MCP tools (fail silently or return empty)
- Issue persists across window reloads
Steps to Reproduce
- Put a project in WSL Ubuntu (e.g. /home//workspace/my-project)
- Install an MCP server on WSL only (e.g. codegraph on Linux PATH)
- Open the project in Cursor IDE via WSL Remote → confirm MCP works (agent can call tools)
- Open the same project in the Cursor Agents window (still WSL Remote, same URI)
- Use the Agents window for a session
- Return to Cursor IDE on the same workspace
- Try to use the agent with MCP tools again
Expected Behavior
- MCP should keep working across IDE and Agents window when both use the same WSL Remote workspace
- Or Cursor should show a clear warning if switching UIs can break MCP state
Operating System
Windows 10/11
Version Information
IDE version v3.7.12
Additional Information
Workarounds Attempted
Does NOT fix the issue:
Deleting only WSL project cache:
rm -rf ~/.cursor/projects//
- Cursor recreates this folder on reopen
- MCP remains broken
- State also lives in Windows-side storage:
C:\Users<user>\AppData\Roaming\Cursor\User\workspaceStorage<hash>\
Does fix the issue (verified):
-
Add .cursor/mcp.json in the project repo
→ Forces MCP to re-bind for that workspace on the WSL remote host -
Delete both cache locations (with Cursor fully closed):
- WSL: ~/.cursor/projects//
- Windows: C:\Users<user>\AppData\Roaming\Cursor\User\workspaceStorage<hash>
This also removes chat history for that workspace
-
Rename the project folder
→ Creates a new workspace identity → MCP works again
Additional Context
State appears split across multiple locations:
- ~/.cursor/projects// (WSL) → MCP descriptors, agent cache, terminals (recreated on open)
- workspaceStorage// (Windows) → workspace identity, chat history, MCP UI state
- ~/.cursor/mcp.json (WSL) → user-level MCP config
- C:\Users<user>.cursor\mcp.json (Windows) → global MCP config (may be empty {})
Terminology clarification:
This is not about “Windows Agent vs Linux Agent.” Both Cursor IDE and the Cursor Agents window open the project in WSL Remote. The bug is triggered by switching between these two UIs on the same remote workspace.
Why .cursor/mcp.json in the repo helps:
Even when both UIs use WSL Remote, switching between IDE and Agents window seems to corrupt the per-workspace MCP binding. Project-level mcp.json forces re-registration on the WSL remote host where the MCP binary exists.
Feature Requests
- Warning when switching between IDE and Agents window on the same WSL Remote workspace if MCP state may be affected
- One-click reset for stale MCP/workspace state (both projects/ and workspaceStorage/)
- Documentation on how MCP binding works across IDE vs Agents window when both use WSL Remote
- Option to pin MCP execution to the remote host for WSL workspaces
Optional info to add
- Cursor version: Help → About
- WSL distro/version: wsl -l -v
- Screenshot: Settings → MCP showing Connected while tools fail
- Screenshot: Agents window also showing WSL Remote in status bar
- MCP errors from Help → Toggle Developer Tools → Console
Does this stop you from using Cursor
No - Cursor works, but with this issue