Skip to content

Cursor

Give Cursor's agent the Dungbeetle MCP tools so it can triage snapshot runs and — with your confirmation — approve baselines. You stay the account owner; Cursor holds only a scoped, revocable agent token.

1. Prerequisites

  • The Dungbeetle CLI: npm install -g dungbeetle.
  • Node.js with npx (the server is on npm as dungbeetle-mcp — see Setup).
  • A Dungbeetle cloud account with a repository (getting access).

2. Mint a token

sh
dungbeetle login --label "Cursor"

Approve the printed code at /ui/connect in your browser, picking the repository Cursor may work with. See Agent authentication.

3. Configure MCP

Create .cursor/mcp.json in the project (or ~/.cursor/mcp.json for all projects). Don't commit a real token — keep a project file with a placeholder and your token in the user-level file, or inject it from the environment:

json
{
  "mcpServers": {
    "dungbeetle": {
      "command": "npx",
      "args": ["-y", "dungbeetle-mcp"],
      "env": {
        "DUNGBEETLE_AGENT_TOKEN": "dbat_…"
      }
    }
  }
}

Self-hosting

Both commands default to the hosted cloud. On a self-hosted server, pass --server <url> to dungbeetle login and add "DUNGBEETLE_SERVER_URL": "https://your-server" to the env block above.

Enable the server under Settings → MCP if Cursor asks. MCP tools are used by Cursor's agent mode (the chat/composer agent) — inline edit doesn't call tools, so ask for Dungbeetle triage from the agent chat.

4. First loop

In agent mode:

List the recent Dungbeetle runs and show me the semantic diff of the latest failed one.

Cursor calls dungbeetle_list_runs, then dungbeetle_get_run with detail: "full" — a compact node-level diff, never screenshots. Fix the regression (or decide the change is intended), then:

Approve that run and promote the new baselines.

dungbeetle_approve_run is marked destructive, so Cursor asks for your confirmation before running it — approval stays human-owned.

Scopes

Use the Triage preset (runs:read baselines:read analytics:read reviews:write) — the default when dungbeetle login requests no explicit scopes. Cursor can read diffs and record your review decisions but can't push runs or rewrite baselines outside the promote-on-approve path. See scopes.

Source-available: CLI under FSL-1.1-ALv2, cloud server under BUSL-1.1. See Licensing.