Home/Docs/Agents/Cursor

Connect Cursor to Planwright

Cursor supports MCP via a project-level configuration file. The recommended path is OAuth — your browser opens for GitHub login on first use, and your identity is the one that shows up in Planwright audit records. Service tokens are for CI and headless automation.

Setup

Create a .cursor/mcp.json file in your project root.

  1. 1Create a .cursor/ directory in your project root (if it doesn't exist).
  2. 2Create .cursor/mcp.json with the OAuth config below.
  3. 3Restart Cursor or reload the window.
  4. 4On first tool call, your browser opens for GitHub login.
  5. 5Planwright tools become available in Cursor's AI assistant.

Configuration

// OAuth — recommended (zero config)
{
  "mcpServers": {
    "planwright": {
      "transport": "sse",
      "url": "https://mcp.planwright.tools/sse"
    }
  }
}

// Service token — for CI, headless runs, or service accounts
// Generate a token at planwright.tools → Settings → MCP Token
{
  "mcpServers": {
    "planwright": {
      "transport": "sse",
      "url": "https://mcp.planwright.tools/sse",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

Verify the connection

After restarting Cursor:
1. Open the AI chat panel (Cmd+L / Ctrl+L).
2. Ask: "What Planwright objectives are scheduled?"
3. Cursor should use the planwright_set_repo and
   planwright_list_objectives tools to answer.

Troubleshooting

Cursor doesn't pick up the config

Make sure the file is at .cursor/mcp.json (not .cursor/config.json or similar). Cursor only reads this specific path.

Permission errors on tool calls

Cursor may prompt you to approve MCP tool calls. Accept the prompt to allow Planwright access.

OAuth doesn't open a browser

If your Cursor build doesn't yet support OAuth discovery, fall back to the service-token form. Generate a token at Settings → MCP Token and use the second config.