Skip to content

The Backenly MCP server

Your coding agent builds and runs a backend through it: PostgreSQL, REST APIs, auth, storage, realtime and functions in a Backenly project. Reads are open, schema changes are checked and verified, and anything destructive waits for you.

Claude Code
claude mcp add --transport http backenly https://backenly.com/api/mcp --header "x-api-key: <scoped-key>"

Connect your agent. One key, one project.

The key comes from your project’s Connect page, under Agents, and you can revoke it there. That page prints each block below with your project id and key filled in.

Claude Code

Remote, with a key

Nothing to install. Run it in a terminal before you start the conversation: an MCP host reads its servers when a session starts.

bash
claude mcp add --transport http backenly https://backenly.com/api/mcp --header "x-api-key: <scoped-key>"

Claude Code

Remote, with a browser sign-in

No key. Run /mcp, pick backenly and choose Authenticate. You approve the connection on backenly.com and choose the project there; read-only is an option on that screen.

bash
claude mcp add --transport http backenly https://backenly.com/api/mcp

Claude Code

Local, over stdio

The @backenly/mcp-server npm package (Node.js 20 or later). It serves the same tools, instructions and results as the remote endpoint.

bash
claude mcp add backenly -- npx -y @backenly/mcp-server --project <id> --key <scoped-key>

Codex

Local, over stdio

For the remote endpoint, Codex takes the key only through ~/.codex/config.toml: a [mcp_servers.backenly] table with the url and http_headers.

bash
codex mcp add backenly -- npx -y @backenly/mcp-server --project <id> --key <scoped-key>

Cursor

~/.cursor/mcp.json

The user config, not the project’s, so the key is never committed beside the app.

json
{
  "mcpServers": {
    "backenly": {
      "url": "https://backenly.com/api/mcp",
      "headers": { "x-api-key": "<scoped-key>" }
    }
  }
}

Cline

cline_mcp_settings.json

The remote entry must set "type": "streamableHttp", or Cline falls back to SSE and the endpoint answers 405.

json
{
  "mcpServers": {
    "backenly": {
      "type": "streamableHttp",
      "url": "https://backenly.com/api/mcp",
      "headers": { "x-api-key": "<scoped-key>" }
    }
  }
}

Registered a server mid-conversation? Its tools appear in the next one. Until then, every tool is callable from the shell with the same key and the same rules: npx -y @backenly/cli@latest call read_backend_state.

23 tools, grouped by job. 16 on a read-only key.

A read-only key or sign-in keeps the read tools and narrows each section tool to its read actions.

The tools the Backenly MCP server advertises, by what they are for
What it is forToolsWhat they do
Read what existsread_backend_state, get_table_schema, run_query, generate_types, fetch_docs, check_approvalThe backend’s state, section by section; one table in full, with what its constraints reject; read-only SQL as the project’s SELECT-only role; TypeScript types, a typed client or OpenAPI from the live catalog.
Change the schemaapply_migration, set_rls, branchSQL in, checked typed actions out, applied as one governed change. Row-level security as exact SQL predicates, installed as written and read back. Preview branches that merge back once a person approves.
Write rowsdb_insert, db_update, db_deleteRow writes for seeding and repair. An update or a delete needs a non-empty filter.
Run each part of the backendauth, storage, functions, realtime, integrations, monitoring, autonomy, webhooks, deploy, connectOne tool per console section, each with an action: sign-in providers and users, buckets and files, server functions and schedules, live updates, provider keys, metrics and logs, the maintenance loop, signed webhooks, deploys, and keys and connections.
Ask in plain languagebackend_chatBackenly’s own engine plans a change from a description. It is the one tool that draws AI credits; the typed tools above never do.

What waits for you. Destructive calls are parked, not run.

Dropping or emptying a table, dropping a column and discarding a branch go through backend_chat, which parks them the same way. apply_migration refuses DROP statements outright and says so.

Section actions that need a person

  • authremove_oauth_provider, block_user, remove_smtp
  • storagedelete_file, delete_bucket
  • functionsdelete, delete_schedule
  • realtimedisable
  • integrationsdisconnect
  • webhooksdelete
  • deploydeploy, rollback, revert_change
  • connectrevoke_api_key, delete_env, disconnect_frontend

How an approval runs

  1. The call is parked, not run

    The response carries an approval object with its id. Nothing in the backend changes.

  2. You see exactly what it would do

    It waits on the project’s Autonomy page under “Waiting on you”, with its impact: how many live rows, and whether the data is recoverable.

  3. A person decides

    Approve or reject it there. The agent’s key can request and poll; it cannot approve.

  4. The approved call runs as it was made

    Verbatim, with no model re-reading it. The agent polls check_approval until it reports executed, rejected, expired, failed or partial.

Where it stops. Limits an agent cannot change.

One project per connection

Every key and sign-in is bound to one project, so a leaked credential reaches that project and nothing else. connect { action: "whoami" } says which one. Projects are created in the dashboard.

A Backenly project, not any database

It operates the PostgreSQL schema Backenly runs for the project. It is not a client for a database Backenly does not manage, though you can read that schema directly with a connection string.

Agents cannot widen their own access

MCP keys are issued in the dashboard, and read-only is chosen there. The runtime API your app calls refuses an MCP key (MCP_KEY_IN_APP), and a service-role key is never issued to an agent.

Questions about the MCP server

Anything else, ask the people who built it.

No. The server operates a Backenly project, on Backenly Cloud or your own self-hosted Backenly, and each project has its own PostgreSQL schema that Backenly manages. You can still reach that database directly, with a read-only connection string on demand or a read-write one a person arms, and export it with pg_dump. It is not a general MCP client for a database Backenly does not run.

Give your agent a backend

One free project, no credit card. The endpoint is https://backenly.com/api/mcp.