Antigravity + xCloud

Back up and stage sites with Antigravity on xCloud

Backing up and staging sites with Antigravity means asking Google's agentic IDE to read your xCloud backup state, take a backup before a risky change and create a staging copy of a Git site, from the agent panel next to your code.

  • Skill: xcloud:sites
  • Toolsets: sites
  • Free with every xCloud account

YouRestore the shop site to last night's backup.

sites_backupsread-only

AgentThe newest completed backup is from 02:00 last night, stored locally. I cannot start a restore from here. In the dashboard go to Site, Site Backup, Previous Backups, Restore. Should I back up the current state first?

YouYes.

sites_backup

AgentBackup of the current state completed. Open the dashboard link and choose the 02:00 backup to restore.

. Keep a human in the loop: xCloud stops and asks before anything that creates, deploys, updates, reboots, deletes or buys.

Setup

How Do You Set Up Antigravity to Back up and stage sites on xCloud?

Connect Antigravity once; every job on this account uses the same connection. Then ask in plain words.

  1. Add xCloud in View raw config

    In the Antigravity IDE, click the three dots at the top of the agent side panel, choose MCP Servers, then Manage MCP Servers, then View raw config. Paste this into mcp_config.json and save. The field is serverUrl: it is the only remote URL property in Antigravity's documented configuration, so do not write url or httpUrl.

    JSON
    {
      "mcpServers": {
        "xcloud": {
          "serverUrl": "https://app.xcloud.host/mcp"
        }
      }
    }
  2. Sign in, then check the connection

    Open Agent settings (Cmd+, on Mac, Ctrl+, on Windows and Linux), go to Customizations and click Authenticate next to xcloud. Approve the teams and the access level in the browser, copy the authorization code it shows, paste it into the settings panel and click Submit. Then ask this in the agent panel.

    Prompt
    Who am I on xCloud?
  3. No browser sign-in? Use an API key

    Create a token with the mcp:invoke scope plus the read abilities for the areas it will use (read:servers and read:sites, with read:billing and read:addons for billing and add-on tools) and the matching write: abilities if it should change things in Settings, Developers, API Tokens and add it as a header. Replace YOUR_TOKEN with the token, which contains a pipe character, and never paste it into chat. Keep this file out of git.

    JSON
    {
      "mcpServers": {
        "xcloud": {
          "serverUrl": "https://app.xcloud.host/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_TOKEN"
          }
        }
      }
    }
  4. Check it worked

    Then ask Antigravity for the job itself, for example:

    Prompt
    Use xCloud to take a backup of the shop site before you change the deploy configuration, and wait until it has completed.

In practice

How Does Backups and staging Work from Antigravity?

In Antigravity you hand the agent a task in the side panel, and a backup request fits naturally at the start of one: before you let it rewrite the deploy configuration, ask it to take a backup of the shop site and wait for it to finish. The agent reaches xCloud through the serverUrl entry in mcp_config.json, finds the site by name or domain and reads its backup list, count and status before it does anything. It then picks sites_backup for a native site or sites_docker_backup for a Docker app, and for a Docker app it says first that the app stops briefly while its volumes are captured.

Nothing in xCloud asks you to confirm a backup, so what you see in the panel is the tool call and then the agent's sentence once the backup is completed or failed. Ask it to audit instead: check the backup settings on every site and list the ones with no schedule, and it returns a list with the last backup for each, which you can paste into a ticket. It cannot change a native site's schedule, retention or destination, and it cannot add a storage provider; those are dashboard settings, and the agent says where. A Docker app is the exception, where it can turn automatic backups on, set daily, weekly or monthly and set the days kept, after showing you the change.

Staging fits the way Antigravity handles longer tasks. Ask for a staging environment of the API site from a branch, approve the creation when the agent asks and it returns the staging URL, so you can point your tests at it. On the free plan xCloud refuses staging as a plan limit and the agent tells you so. A WordPress staging copy and every restore are dashboard steps, with the dashboard link supplied. Hosting Antigravity on an xCloud server is a different product; this page is about the agent managing your sites.

Antigravity specific: Antigravity's permission policy accepts patterns such as mcp(xcloud/sites_backups). For this job allow the read tools one at a time, sites_backups, sites_backupStatus, sites_backupCount and sites_backupSettings, and leave sites_backup and sites_docker_backup out. xCloud will not ask before a backup, and a wildcard like mcp(xcloud/*) would stop Antigravity asking too. Remember that the sign-in only finishes when you paste the authorization code into Settings, Customizations, otherwise none of these tools will answer.

What xCloud does for backups and staging

xCloud lets the agent read every site's backup state, start a backup on demand for native and Docker sites, and create a staging environment for Git sites. Restores, storage providers and WordPress staging stay in the dashboard, and the agent tells you the exact path when you ask for one.

  1. Find the site. The agent resolves the site by name or domain, restates which one it is about to act on, and reads whether it is a native site or a Docker app, because the two use different backup operations.
  2. Read the protection state. It reads the backup settings, status, count and recent backups. That answers whether the site has a schedule, when the last backup ran, whether it succeeded and where it is stored, before anything is changed.
  3. Back up now. A backup starts without an approval prompt. A native site takes a local backup by default or a remote one when a storage provider is connected. A Docker app is stopped briefly while its volumes are captured, so the agent says so before it backs up a production app.
  4. Wait for the result. xCloud queues the backup and returns straight away. The agent follows the backup task or row until it is terminal, then reports completed or failed instead of treating the queued response as done.
  5. Stage the change. For a Git site such as Laravel, Node.js, custom PHP or Lovable, the agent creates a staging environment from the branch you name, after you approve, and gives you its URL. A WordPress staging site is a dashboard step, and the agent gives you the path.
  6. Hand off restores and settings. If you ask to restore a backup, change a native site's schedule or add a storage provider, the agent explains that these are dashboard-only and gives the path and the site's dashboard link. It never improvises a workaround.

Reference

Backups and staging Settings and Limits on xCloud

The facts Antigravity works within when it backs up and stage sites. Where a row names the dashboard, that step stays yours to take there.

Setting or limitWhat applies
Native site backupOn demand through the API; the type is local (the default) or remote. A remote backup needs a storage provider with a working connection, otherwise xCloud refuses it with a 422 before anything is queued
Docker app backupOn demand through the API for Compose deploys and most one-click apps. The app is cold-stopped for a moment while volumes are captured. A remote copy goes to an S3-compatible or SFTP provider; Google Drive and pCloud are not supported for Docker apps
Reading backupsBackup list, count, status and settings are readable for every site. Docker apps also expose one backup's detail
Docker backup housekeepingThe agent can label a Docker backup with a note and delete one. Deleting is irreversible, so it names the exact backup by date and note first
Native schedule and retentionRead-only through the API. Change them in the dashboard under Site > Site Backup > Backup Settings
Docker backup settingsWritable through the API: automatic backup on or off, daily, weekly or monthly frequency, and the number of days to keep backups
RestoresDashboard-only for every site type: Site > Site Backup > Previous Backups > Restore. A backup can also be restored to another site from the same page
Storage providersDashboard-only, under Integrations > Storage Provider. Backup settings return a provider's identifier and status, never its credentials
Team-wide backup policyApplying one backup policy to many sites is dashboard-only, under Global Settings > Site Backup
Git stagingCreated through the API for Git sites on paid plans. On the free plan xCloud answers 403 because it is a plan limit, not a permission
WordPress stagingDashboard-only: xCloud answers 422 when the API is asked for it. Push and pull between staging and production also happen in the dashboard
SnapshotsSnapshots are listed per site. The server-wide snapshot list holds site snapshots, not a server image. Taking or restoring a snapshot, and a whole-server provider backup, stay in the dashboard

Rules Antigravity has to follow

  • A backup runs without an approval prompt, but the agent says when it briefly stops a Docker app and does not trigger one on a busy production app without telling you.
  • A queued backup is not a finished backup: the agent reports completed or failed only after it has read the result.
  • Restoring a backup, changing a native site's schedule, adding a storage provider and creating WordPress staging are dashboard steps; the agent gives you the path instead of guessing an operation.
  • Creating a staging environment stops for your approval, and deleting a backup names the exact backup first.
  • Before you push staging data to production in the dashboard, take a backup of the production site so you can recover if the push goes wrong.

Example prompts

What Can You Ask Antigravity to Do for Backups and staging?

Type these as written and swap in your own repository, site and server names. Reads and routine actions such as backups, cache purges, PageSpeed scans and vulnerability scans run straight away; creating, deploying, updating, rebooting, deleting, buying or starting a broken-link scan stops and asks first.

Prompt
Use xCloud to take a backup of the shop site before you change the deploy configuration, and wait until it has completed.
Prompt
Check the backup settings on every site and give me a list of the ones with no schedule, with the date of the last backup for each.
Prompt
I need to restore the shop site to last night's backup. Tell me which backup to pick and where to click.
Prompt
When was the last backup of the shop site, did it succeed, and where is it stored?
Prompt
Check the backup settings on every site and list the ones with no schedule.
Prompt
Take a backup of the n8n Docker app now, before I upgrade it, and tell me when it is done.
Prompt
Switch the n8n Docker app to a daily backup and keep backups for 14 days. Show me the change before you apply it.
Prompt
Create a staging environment for the API site from the feature/checkout branch and give me its URL.
Prompt
List the snapshots of the shop site and tell me which is newest.
Prompt
I need to restore the shop site to last night's backup. Tell me where to click.

Antigravity and Backups and staging: Frequently Asked Questions

What people ask before they let Antigravity back up and stage sites through xCloud.

Can Antigravity restore a backup for me?

No. A restore is a dashboard step for every site type, under Site, Site Backup, Previous Backups, Restore. The agent can list the backups, tell you which is newest and completed, take a backup of the current state first and give you the dashboard link.

Which Antigravity permission pattern should I use for backups?

Allow the read tools by name, for example mcp(xcloud/sites_backups), and leave the backup tools out so Antigravity asks before each one. xCloud runs a backup without a confirmation prompt, so a wildcard such as mcp(xcloud/*) would remove the last check.

Can an AI agent restore a backup for me?

No. Restoring a native or Docker backup is a dashboard step, under Site > Site Backup > Previous Backups > Restore. The agent can list the backups, tell you which one is newest and completed, and give you the site's dashboard link so you can start the restore yourself.

Does the agent ask before it takes a backup?

No. A backup is a routine action, so xCloud runs it without a confirmation prompt. For a Docker app the agent tells you first that the app stops briefly while its data is captured, and it reports the result only after the backup has finished.

Can the agent change my backup schedule?

For Docker apps, yes: it can turn automatic backups on or off, set daily, weekly or monthly, and set how many days backups are kept. For native sites the schedule, retention and destination are read-only through the API, so you change them in the dashboard under Site > Site Backup > Backup Settings.

Can the agent connect my S3 bucket or other storage?

No. Storage providers are added in the dashboard, under Integrations > Storage Provider, so credentials never pass through a chat. Once a provider exists, the agent can read which one a site's backup settings point at and use it for a remote backup.

Can the agent create a staging site for WordPress?

Not through the API. xCloud answers 422 for WordPress staging, so you create it in the dashboard from the site overview. For Laravel, Node.js, custom PHP and Lovable sites the agent can create a staging environment, which needs a paid plan.

Other agents

Backups and staging with Other Agents

The same job, the same xCloud tools, a guide for each client.

Run Your Hosting from Antigravity

xCloud MCP, the Agent Skills and the Public API are free with every account. Connect once and ask.