Chapter 5 of 15 7 min beginner

Connect Cursor

mcp.json, stdio, troubleshooting

Verified against a working setup on 2026-08-10

Cursor reads MCP servers from a JSON file and exposes them to its Agent mode. The setup is short; the failure modes are specific enough to be worth knowing in advance.

Where the config lives

ScopeFileUse when
Global~/.cursor/mcp.jsonOne Unity setup across all your projects.
Project.cursor/mcp.jsonPer-repo, shareable with your team.
Global is usually right for Unity MCP. The server connects to whichever Editor is running, so a per-project file mostly duplicates the same entry.

The config

Cursor uses mcpServers as the top-level key, the same shape as Claude Desktop.

json
{
  "mcpServers": {
    "unity-mcp": {
      "command": "C:\\Users\\you\\.unity\\relay\\relay_win.exe",
      "args": ["--mcp"],
      "env": {}
    }
  }
}

Turning it on

  1. 1
    Write the file

    Create ~/.cursor/mcp.json if it does not exist, or add your entry to the existing mcpServers object.

  2. 2
    Open Cursor Settings → MCP

    Your server should be listed. A green indicator means the process started.

  3. 3
    Enable the server if it is off

    Cursor sometimes adds new servers in a disabled state. The toggle is easy to miss.

  4. 4
    Use Agent mode, not Ask mode

    Tools are only available to the agent. In Ask mode the model can talk about Unity but cannot call anything.

  5. 5
    Verify against the real project

    Ask something only your open Editor could answer.

    text
    List the GameObjects in my currently open Unity scene.
The single most common Cursor complaint — "the server is green but there are no tools" — is almost always Ask mode instead of Agent mode. Check that before touching the config.

Cursor-specific gotchas

SymptomCauseFix
Green, but no toolsAsk modeSwitch to Agent mode.
Server not listed at allMalformed JSONCheck backslashes and trailing commas.
Listed but greyed outDisabled by defaultToggle it on in Settings → MCP.
Tools fail every timeUnity is closedOpen the Editor and retry.
Worked, then stoppedEditor recompilingWait for the compile to finish.
That last one catches people out. While Unity recompiles scripts it stops answering, so tool calls fail for a few seconds after every code edit — including edits the model just made. Retrying usually just works.

What to take away

  • Global config lives at ~/.cursor/mcp.json.
  • Cursor uses the mcpServers key, like Claude Desktop.
  • Tools only exist in Agent mode.
  • New servers can arrive disabled — check the toggle.
  • Calls fail while Unity is recompiling; retry.