Claude Code and Cursor

Let Claude Code, Cursor and other coding agents work on your DontCode project directly: sign in from the terminal, query and update your database, run migrations, and manage files. All through the same v1 gateway.

6 min read
Coding agents

What this is

The dontcode package gives a coding agent your project as a set of tools, through a small local MCP server. It runs over stdio, so Claude Code or Cursor launches it for you; nothing is hosted on your side.

Every tool is a thin call onto the v1 gateway. The agent can only do what the gateway allows, and when you sign in through the browser, only what your role on the project allows.

New to DontCode? The full product documentation lives at dontcode.co/docs

Setup

Add the server to your agent. In Claude Code, put this in .mcp.json at your project root (or run claude mcp add); in Cursor, the same block goes in .cursor/mcp.json. No API key is needed here; you sign in through the browser on first use.

{
  "mcpServers": {
    "dontcode": {
      "command": "npx",
      "args": ["-y", "dontcode", "mcp"]
    }
  }
}

To point at a staging gateway, set DONTCODE_API_URL. For non-interactive use (CI, scripts), set DONTCODE_API_KEY to a dc_ project key and skip the browser sign-in entirely.

Signing in

The first time the agent needs access, ask it to sign in. It calls the auth_login tool, which prints a URL and a short code and opens your browser.

  1. The agent calls auth_login. A verification URL and a short code appear; the code is good for 10 minutes.
  2. You open the URL (already signed in to DontCode), confirm the code matches, and choose the project to connect: any project you are on the team of, Insight or Backend.
  3. You approve. The browser hands a short-lived, project-scoped token back to the terminal; the agent calls auth_wait to pick it up.
  4. The token is cached locally (in ~/.dontcode, or DONTCODE_CONFIG_DIR if set) and reused for its 12 hours, then you sign in again.

The token is bound to your user account on the server side, so it cannot be forged. The gateway checks your project role on every request, and revoking your membership revokes the token at once.

While an agent is signed in, the project’s Settings > Project lists it under Coding agents, with who it acts as and when it was last used. Revoke ends it: owners and admins can end any, everyone else their own.

Tools

ToolWhat it does
auth_login / auth_waitSign in through the browser and pick up the token.
auth_statusShow the current project, your role, and what you can do.
auth_logoutForget the cached token.
db_queryRead rows: find, findFirst, count, with where / select / orderBy / limit (up to 1000) / offset.
db_insertInsert one row.
db_updateUpdate rows matching a where clause.
db_deleteDelete rows matching a where clause.
db_migrateApply a migration (schema DDL and data statements), as `sql` or as `files`: paths applied one by one in the order given, stopping at the first that fails. Each is at most 200,000 characters.
storage_listList files in a bucket.
storage_get_urlGet a public URL for a file.
storage_temporary_urlGet a short-lived signed URL.
storage_uploadUpload text content to a path.
storage_removeDelete files.
storage_moveMove or rename a file.

Reads are marked read-only. Deletes, migrations and storage_remove are marked destructive, so the agent confirms with you before running them.

Roles and permissions

When you sign in by browser, the token carries your project role. The gateway enforces it per request, so the agent can never do more than you can.

RoleCan do
viewerRead data, list and read files.
editorEverything viewer can, plus insert, update, delete, and upload.
admin / ownerEverything editor can, plus schema migrations.

A dc_ project API key (the non-interactive path) is project-scoped with full access, the same as the rest of the v1 gateway.

On an Insight Project a migration only adds, whoever sends it: new tables, columns and indexes, never dropping, renaming or changing a column’s type, so every earlier version of the app keeps working and can be restored.

Good to know

  • The browser token lasts 12 hours and is stored only on your machine, never printed by the agent.
  • The MCP server talks only to the v1 gateway over HTTPS; it has no special access of its own.
  • A browser sign-in gets its own request budget inside the project, so a runaway agent loop cannot rate-limit your app’s users. Database calls still count against the project’s monthly database allowance, like any other v1 call.
  • Without an agent, npx dontcode login, npx dontcode status and npx dontcode logout do the same from a terminal; status shows which project and role a cached session has.
  • You can sign out anytime with the auth_logout tool or npx dontcode logout.