Documentation 40

Tutorial · Antigravity · 10 min

Use SandboxAPIs in Antigravity.

Add the hosted SandboxAPIs server to Antigravity with one config entry and nothing installed, have its agent call orient, then point it at a pinned host and watch what a read and a write return. Nothing it reads can change under it, and nothing it tries to write can land.

01Add the server by URL
02Call orient
03Read a pinned host, then try a write

01 / Install

One entry. Nothing to install.

The server runs at https://api.sandboxapis.dev/mcp over Streamable HTTP, the same ten tools as the npm package. Antigravity reads its MCP servers from a JSON file, and a remote one needs only its URL:

In Antigravity, add it to ~/.gemini/config/mcp_config.json for every workspace, or .agents/mcp_config.json for one project. Antigravity names a remote server by serverUrl; it does not read url:

mcp_config.json
{
  "mcpServers": {
    "sandboxapis": {
      "serverUrl": "https://api.sandboxapis.dev/mcp"
    }
  }
}

That runs on the anonymous budget with no further setup. To sign in instead, use https://api.sandboxapis.dev/mcp/auth, which refuses a call with no credential so that Antigravity starts the sign-in, and choose Authenticate next to the server in Antigravity's settings. Our authorization server takes dynamic client registration, so the entry needs no oauth block:

mcp_config.json
{
  "mcpServers": {
    "sandboxapis": {
      "serverUrl": "https://api.sandboxapis.dev/mcp/auth"
    }
  }
}

Prefer a local process to https://api.sandboxapis.dev/mcp? The npm package goes in the same file, with your key as SANDBOXAPIS_API_KEY in its env (leave the env out to run anonymously):

mcp_config.json
{
  "mcpServers": {
    "sandboxapis": {
      "command": "npx",
      "args": [
        "-y",
        "@sandboxapis/mcp"
      ],
      "env": {
        "SANDBOXAPIS_API_KEY": "sk_live_…"
      }
    }
  }
}

After editing the file, reload the server from Antigravity's MCP manager (/mcp in the CLI, the refresh button under Settings, Customizations, Installed MCP Servers in the app), or restart Antigravity.

02 / First prompt

Ask it to orient.

Open the agent and paste this:

prompt
Call orient, then check_budget. Tell me which services you can reach, whether a key is set, and how many requests are left this hour.

orient answers with every service's base URL, the olympus-labs data set and its teams, ready-to-run entry points, how to pin a snapshot, where the coverage manifest lives, and an access block saying whether a key was read. check_budget reads the real hourly window without spending any of it. The MCP page shows a recorded orient result in full.

Antigravity runs a tool it has not been told to trust in Ask mode, so expect to approve each call the first time. Its permissions docs show how to allow every tool on the server at once with mcp(sandboxapis/*).

03 / A pinned host

One request against a host that never moves.

The live hosts roll their data forward daily, which is right for a demo and wrong for anything you will compare against twice. A pinned host answers the same bytes on every run. The newest pinned GitHub host is gh-2026-03-g12.snap.sandboxapis.dev; get_snapshot returns the same hostname from inside a session. Ask the agent to use it:

prompt
Use get_snapshot to find a pinned GitHub host, then run this with curl and summarise the repository it returns. Say which host answered and whether it is pinned or live:
curl -s "https://gh-2026-03-g12.snap.sandboxapis.dev/repos/olympus-labs/parthenon"

That request is GitHub's own repository endpoint on a replica, so a client that talks to gh.sandboxapis.dev today takes the pinned host as its base URL and runs unchanged. The tools answer from the live hosts on the hosted URL. To pin the tools themselves, run the npm package instead and give it SANDBOXAPIS_BASE_URL_GITHUB:

~/.gemini/config/mcp_config.json
{
  "mcpServers": {
    "sandboxapis": {
      "command": "npx",
      "args": [
        "-y",
        "@sandboxapis/mcp"
      ],
      "env": {
        "SANDBOXAPIS_API_KEY": "sk_live_…",
        "SANDBOXAPIS_BASE_URL_GITHUB": "https://gh-2026-03-g12.snap.sandboxapis.dev"
      }
    }
  }
}

Every service has its own SANDBOXAPIS_BASE_URL_* variable, so an agent can be pinned on the services a test cares about and left live everywhere else. Versioning and pinning explains the registry.

04 / Your key

Raise the budget.

With no credential the server runs on the anonymous budget, 60 req/hour, shared by every caller on your address. A free key raises it to 600 req/hour on your own account. On the hosted URL the key is a header in the server entry:

~/.gemini/config/mcp_config.json
{
  "mcpServers": {
    "sandboxapis": {
      "serverUrl": "https://api.sandboxapis.dev/mcp",
      "headers": {
        "Authorization": "Bearer sk_live_…"
      }
    }
  }
}

Or keep the key out of the file and sign in: set serverUrl to https://api.sandboxapis.dev/mcp/auth and choose Authenticate next to the server. On the approval page you pick one of your keys, the connection draws on its budget, and you can revoke it from the dashboard. With the npm package the key is SANDBOXAPIS_API_KEY in the env block above. Reload the server after any edit; orient's access block then says whether the key was read.

05 / When the agent writes

A write is refused, legibly.

Ask the agent to change something:

prompt
Now open an issue on that repository on the same pinned host. Report exactly what the host answered, status and body.

Whatever tool it reaches for, the request that leaves Antigravity amounts to this:

terminal
curl -s -X POST "https://gh-2026-03-g12.snap.sandboxapis.dev/repos/olympus-labs/parthenon/issues" -H 'content-type: application/json' -d '{"title":"test"}'

Every host is read-only. The answer is GitHub's own error status and body, with a plain message saying the data set is read-only and naming the request that was refused, so a client raises the exception it would normally raise. The GitHub guide prints that response in full. The skill tells the agent not to retry it and not to look for another endpoint to make the same change. The one exception, scratch writes for GitHub issues and comments, Jira comments and transitions, and Slack messages, is off until you turn it on for a key, and keys and rate limits describes exactly what it permits.

06 / What Antigravity does and does not do

Read before you file a bug.

  • The plugin is not on the Antigravity Marketplace yet. Listing goes through Google's interest form. Until it is listed, the clone and local install above is the install, and this page will say so when that changes.
  • The skill is advisory. It is text the model reads, not a hook that blocks a call. An agent can still skip check_budget and hit the hourly ceiling; when it does, the refusal carries an upgrade field rather than a surprise, and the budget resets within the hour.
  • Nothing on this page was captured from an Antigravity session. The config keys, file paths, plugin layout and sign-in flow are from Antigravity's own documentation, read 2026-10-22. If Antigravity's behaviour differs from what is written here, say so and this page will change.

Next

Where to go from here.

The three agent tutorials, Pinned GitHub, Pinned Jira and Pinned Slack, read one incident across three services with a script in place of an agent platform, which is where to go when you want the assertion in CI rather than in a chat. MCP setup covers the server for every other client.

All tutorials · The eval pack · Keys and rate limits · Versioning and pinning · Coverage manifest