Skip to content

Connect Antigravity to Backenly

Antigravity’s agent reaches Backenly through one block in mcp_config.json. It then builds and runs a Backenly project: tables, auth, storage and functions, with anything destructive held for you.

One block in mcp_config.json. Then restart.

  • Remote

    Nothing to install. Antigravity names the endpoint serverUrl, not url, so a block copied from Cursor never connects.

    mcp_config.json
    {
      "mcpServers": {
        "backenly": {
          "serverUrl": "https://backenly.com/api/mcp",
          "headers": {
            "x-api-key": "<scoped-key>"
          }
        }
      }
    }
  • Local, over stdio

    Runs the @backenly/mcp-server package through npx, on Node.js 20 or later. On a self-hosted Backenly, the args end with --endpoint and your instance’s address.

    mcp_config.json
    {
      "mcpServers": {
        "backenly": {
          "command": "npx",
          "args": [
            "-y", "@backenly/mcp-server",
            "--project", "<id>",
            "--key", "<scoped-key>"
          ]
        }
      }
    }

Open the file from the Agent panel: ⋯ → MCP Servers → Manage MCP Servers → View raw config. Save it, then restart Antigravity. Your project’s Connect page, under Agents, prints both blocks with the project id and key filled in.

Teach the agent Backenly. Even before the tools load.

  • Instructions on connect

    The server sends them when the connection opens: read the backend’s state before changing anything, say which project it is connected to, and never put the mcp_live_ key in app code.

  • The docs in one call

    fetch_docs returns Backenly’s agent guide in full, at most 40,000 characters, or one topic of it, such as fetch_docs { topic: "database" }.

  • The agent guide

    backenly.com/skill.md is the guide Backenly writes for agents: which tool does what, the order that works, the error codes to branch on, and which key an app needs. Point the agent at it, or keep a copy in the repository.

Before the tools load

Antigravity reads its MCP servers when a session starts. Until the Backenly tools appear, the agent can run every one of them from the terminal, with the same key and the same approval rules.

bash
npx -y @backenly/cli@latest link --project <id> --key <scoped-key>
npx -y @backenly/cli@latest call read_backend_state
npx -y @backenly/cli@latest chat "add a likes counter to posts"

link keeps the key in .backenly/config.json and, if the repository has a .gitignore, adds .backenly/ to it.

Questions about Antigravity

Anything else, ask the people who built it.

Antigravity’s config has no url field for a remote server: it reads serverUrl. A block written for Cursor, with url, never connects in Antigravity. The local block over stdio is the same in both.

Give Antigravity a backend

One free project, no credit card. Paste one block and restart.