Skip to content
ConnectAll sections

Connect

MCP

Connect is how things reach your backend. Your coding agent connects over MCP with a scoped key and builds through it. Your app connects through the REST API or the SDK, and tools such as psql can connect to PostgreSQL directly.

In the console: ConnectUpdated October 12, 2026

Why you need it

Backenly has no chat box for building. The agent you already use, such as Claude Code, Cursor or Codex, is how you build: it reads your live schema, makes changes through Backenly’s tools and shows you the results. Connect gives it the one command and the scoped key it needs. The same page holds what your frontend and other tools need: the API address, generated types and database credentials.

For example

  • You add Backenly to Claude Code with one command and start a new conversation.
  • A contractor’s agent gets a read-only key that can inspect the project and change nothing.
  • You generate TypeScript types for your tables so your frontend code matches the schema.
  • You export a full pg_dump to keep a copy of your data outside Backenly.

How it works

  1. Create a scoped key

    Connect → Agents creates a key for this one project. Choose read-only or read-write when you create it, because an agent cannot change its own key. A read-only key is served 16 tools instead of 23, with every write tool withheld.

  2. Install with one command

    Run the command for your agent before you open it: Claude Code, Cursor, Codex, Antigravity, or any other MCP client. Local runs the npm package on your machine; remote connects straight to Backenly with nothing to install.

  3. Start a new conversation

    Agents read their MCP settings when a conversation starts, so the tools appear in the next one. Ask for read_backend_state to confirm the connection.

  4. Connect your app

    The Direct tab has the REST base URL, TypeScript types and an OpenAPI spec, and the list of origins allowed to call from a browser. The Postgres tab has read-only and read-write PostgreSQL logins for psql, ORMs and BI tools.

Try it

Once the install command has run, start a new conversation with your agent and ask:

Ask your agent
Call Backenly’s read_backend_state tool and tell me what exists in this project.
Claude Code, remote
claude mcp add --transport http backenly https://backenly.com/api/mcp --header "x-api-key: <KEY>"

Good to know

  • Destructive operations, such as dropping a table, never run straight from an agent. They wait for a person in the Autonomy review queue.
  • After approval, the exact parked call runs without being reinterpreted. Poll check_approval until its status is final. If it fails, read resultSummary and check the current state before asking again, because a call can stop after applying part of its work.
  • A key is a credential. Keep it out of your repository. Revoke agent keys you stop using, and disconnect agents you signed in from the browser, on the Agents tab; your app’s keys are revoked in Settings.
  • pg_dump exports (full, schema only, or data only) restore on any PostgreSQL, so your data is never locked in.
  • A project with a database of its own is reached through Backenly’s connection pooler at <region>.db.backenly.com with sslmode=verify-full: port 5432 (session pooling) for migrations, psql and pg_dump, and port 6543 (transaction pooling) for application traffic and serverless functions. With Prisma, put the 6543 string in url and the 5432 string in directUrl. A read-write login’s password is shown once, when the login is made or rotated; a lost one is rotated.
  • A project still in its region’s shared database has no direct connection string: read with run_query, change rows through the REST API, change the schema with apply_migration, and take a pg_dump export from Connect → Postgres → Backups.