Antigravity + xCloud
Secure sites and servers with Antigravity on xCloud
Securing sites and servers with Antigravity means asking Google's agentic IDE to read xCloud's vulnerability findings, firewall rules and Fail2Ban bans, with Antigravity's Ask mode and xCloud's confirmation both standing in front of any change.
- Skill: xcloud:servers
- Toolsets: vulnerabilities, servers, sites, wordpress-actions
- Free with every xCloud account
YouCheck the firewall and bans on Frankfurt. No changes.
servers_firewallRulesread-only
servers_fail2ban_banned-ipsread-only
AgentThere are 6 rules and SSH is allowed from anywhere, plus 11 banned addresses. A rule restricting SSH to your office IP would reduce exposure, but a wrong address locks you out. Want me to describe the exact rule first?
YouDescribe it, then wait.
. 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 Secure sites and servers on xCloud?
Connect Antigravity once; every job on this account uses the same connection. Then ask in plain words.
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.
{ "mcpServers": { "xcloud": { "serverUrl": "https://app.xcloud.host/mcp" } } }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.
Who am I on xCloud?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.
{ "mcpServers": { "xcloud": { "serverUrl": "https://app.xcloud.host/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } }Check it worked
Then ask Antigravity for the job itself, for example:
Use xCloud to list sites with critical or high vulnerabilities and explain which update fixes each one.
In practice
How Does Security Work from Antigravity?
Antigravity treats an MCP tool you have not configured as an Ask-mode tool, so the first time the agent wants to read the vulnerability rollup you see a prompt in the agent panel. For a security review that default is a feature. You type which sites have critical findings, the agent proposes calling vulnerabilities_index, you allow it, and the result comes back worst first with the plugin or theme each finding names. If you run reviews often, Antigravity's permission policy lets you allow tools with patterns such as mcp(xcloud/tool_name). Do that one read at a time, for sites_vulnerabilities_list, sites_vulnerabilities_count and servers_fail2ban_banned-ips, and leave the ban and rule tools to ask.
That gives you two layers in front of every change, and for firewall work the second layer matters. When the agent proposes servers_fail2ban_ban or servers_firewallRules_create, Antigravity asks to run the tool, and xCloud separately requires an explicit confirmation that names the server and the effect. The agent explains the SSH lockout risk before it touches a rule on port 22, and it does not delete the default SSH rule on its own. A rescan with sites_vulnerability-scan is a routine action and runs once you allow the call, but it finishes asynchronously, so the agent reads the count again afterwards instead of declaring the finding fixed.
Antigravity comes as an IDE, a command-line tool and the Antigravity 2.0 app, and all three read the same mcp_config.json format, so a security entry you set up once works from whichever surface you open. In the editor the agent already has your repository in view, which helps when a finding names a plugin that your own code wraps or extends. For the items that are not on the API, the AI bot blocker, the 8G firewall and per-site IP rules, the agent says they are dashboard switches and gives you the path. It can still read the 7G and 8G logs from the site's nginx access log to show what they block.
Antigravity specific: Use serverUrl in mcp_config.json, because it is Antigravity's documented remote property and an entry written with url or httpUrl, as other clients use, is not the form to rely on. The sign-in also ends with a pasted authorization code: copy the code from the browser tab and submit it under Settings, Customizations, or the security tools will not become available even though the entry exists. Allow read tools one by one in the permission policy. A wildcard such as mcp(xcloud/*) would also skip Antigravity's prompt for bans, rules and sudo-user changes, leaving xCloud's confirmation as the only check on your firewall.
What xCloud does for security
xCloud reads vulnerability findings for one site or across your whole team, starts rescans and ignores or restores a finding. On servers it manages firewall rules, Fail2Ban bans, the SSH restriction state and sudo users. Protections such as the AI bot blocker, the 7G and 8G firewall and per-site IP rules stay dashboard switches.
- Start with the team-wide rollup. For a fleet question the agent reads the vulnerability rollup across every site on the team in one call and sorts it worst first. For one site it reads the findings and the counts by severity instead.
- Rescan and triage findings. A rescan runs without a confirmation stop and finishes asynchronously, so the agent checks the count again afterwards. Findings carry a severity and a source, and severity is the triage key. A false positive can be ignored with a reason and restored later.
- Fix what the finding points to. Most findings are fixed by updating a plugin, a theme or WordPress core. The agent proposes the updates, takes a backup first if you want one, and waits for your approval, because updating plugins or themes always stops for confirmation.
- Review the server's perimeter. The agent reads firewall rules, the Fail2Ban banned IP list, the SSH restriction status and the sudo users. It can add or disable a rule, ban or unban an address and whitelist xCloud's own IPs after you confirm the server and the effect.
- Report what is dashboard-only. AI bot blocking, the 7G and 8G firewall and a single site's IP allow and block list are dashboard switches. The agent reads what it can, such as the 7G and 8G logs, and gives you the dashboard path and the site's dashboard link for the rest.
Reference
Security Settings and Limits on xCloud
The facts Antigravity works within when it secures sites and servers. Where a row names the dashboard, that step stays yours to take there.
| Setting or limit | What applies |
|---|---|
| Vulnerability findings | Per-site list and counts by severity (critical, high, medium, low), plus a team-wide rollup across every site you can reach |
| Rescans | Triggering a rescan is a routine action that runs without a confirmation stop. It is asynchronous, so the agent polls the count or the site events |
| Ignore and restore | A finding can be ignored with a reason and un-ignored later. Both are changes to the finding, not to the site |
| Firewall rules | List, create, enable, disable and delete server rules by name, protocol (tcp or udp), traffic (allow or deny), port and optional source IP |
| Fail2Ban | List banned IPs, ban one or more addresses and unban an address. Adding addresses to Fail2Ban's own ignore list is an SSH step described in the Fail2Ban guide |
| Whitelisting | xCloud's infrastructure IPs and the caller's IP can be whitelisted. The SSH restriction status says whether SSH is limited to trusted addresses |
| Sudo users | List, create or update, and delete OS-level privileged accounts. Private keys are never returned, and a temporary account is available for short jobs |
| 7G and 8G firewall | Switched on in the dashboard. Their logs are readable through the nginx log type of the site's access log read |
| AI bot blocker | A dashboard toggle: Site, Tools, Nginx and Security on Nginx, Tools, Security on OpenLiteSpeed |
| Per-site IP rules | Dashboard-only: Site, Tools, IP Management. The API lists a site's rules but does not change them; server-wide blocks are on the API |
| Automated security updates | xCloud installs security updates on servers it provisions, and Automatic Reboot restarts the server only when a reboot is required. Both are configured in the dashboard |
| Security headers | The API lists a site's custom Nginx configuration. Adding headers is a dashboard or SSH step, described in the security headers guide |
Rules Antigravity has to follow
- Firewall, Fail2Ban and sudo-user changes name the exact server and the effect before they run, and they wait for your yes. Locking out SSH is the risk the agent explains first.
- The agent never disables SSH or a database service to tidy up a ruleset, and it does not delete the default SSH rule on its own.
- Updating a plugin or theme to fix a finding stops for your approval, and the agent offers a backup first.
- Ignoring a finding needs a reason you give. The agent records it and tells you how to restore it.
- AI bot blocking, the 7G and 8G firewall, per-site IP rules and automated update settings are dashboard steps. The agent says so, gives the path and the dashboard link, and never claims it changed them.
- A temporary sudo user is for a specific job and is removed when the job ends.
Example prompts
What Can You Ask Antigravity to Do for Security?
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.
Use xCloud to list sites with critical or high vulnerabilities and explain which update fixes each one.Check the firewall rules and the Fail2Ban banned IPs on the Frankfurt server. Do not change anything.Rescan blog.example.com, wait for the scan to finish and compare the count with before.Show the vulnerability count for every site on this team, sorted worst first, and name the top three findings.Run a vulnerability scan on the shop site and tell me what it finds.List the findings on the blog site and ignore the false positive in the contact form plugin, with the reason.Update every plugin on the shop site, then run a vulnerability scan, and stop if anything is still open.List the firewall rules on the Frankfurt server and tell me whether SSH is restricted to trusted IPs.Show the IPs Fail2Ban has banned on the Frankfurt server, and unban 203.0.113.10.Whitelist the xCloud IPs on the Frankfurt server.Which sudo users exist on the Frankfurt server? Flag any that look temporary or unused.Antigravity and Security: Frequently Asked Questions
What people ask before they let Antigravity secure sites and servers through xCloud.
Will Antigravity ask before it bans an IP on my xCloud server?
Yes, twice. Antigravity runs MCP tools you have not allowed in Ask mode, and xCloud separately requires an explicit confirmation naming the server and the effect before it bans an address. Allow only read tools in your policy and both checks stay in place for changes.
Why does Antigravity show the xCloud security tools as unavailable after I add the config?
Check two things. The entry must use serverUrl, not url or httpUrl, and the OAuth sign-in must be completed: click Authenticate next to xcloud under Settings, Customizations and paste the authorization code from the browser. Then ask Who am I on xCloud to confirm the connection.
Can an agent show vulnerabilities across all my sites at once?
Yes. xCloud has a team-wide rollup that lists findings for every site you can reach, which the agent sorts worst first. For one site it reads the findings and the counts by severity, and it can start a rescan.
Can the agent ban an IP address on my server?
Yes. It can ban addresses in Fail2Ban, list the banned IPs and unban one, and it can create, disable and delete server firewall rules. It confirms the server and the effect first, so you do not lock yourself out.
Can the agent turn on the 8G firewall or the AI bot blocker?
No. Both are dashboard switches. The agent can read the 7G and 8G firewall logs through the site's nginx logs, and it tells you where the switches are: the site's Tools section. It does not claim to have changed them.
Can the agent block an IP for just one site?
Not from here. Per-site IP allow and block lists are managed in the dashboard under Site, Tools, IP Management, and the agent can only list what is there. Server-wide blocks, through firewall rules and Fail2Ban, are on the API.
Does the agent fix a vulnerability on its own?
No. It reports the finding and proposes the update that remediates it, usually a plugin, theme or core update. Updates always stop for your approval, and the agent can take a backup first and rescan afterwards to confirm the finding is gone.
Other agents
Security with Other Agents
The same job, the same xCloud tools, a guide for each client.
- Secure sites and servers with Claude CodeAnthropic's terminal coding agent. One claude mcp add command, plus the xCloud skills plugin with nine skills on top.
- Secure sites and servers with ClaudeAnthropic's chat assistant on the web and desktop. Add xCloud as a custom connector, no terminal needed.
- Secure sites and servers with Claude CoworkAnthropic's desktop agent for delegated work. Add the xCloud connector, then hand off hosting jobs.
- Secure sites and servers with CursorThe AI code editor. One mcp.json entry with the compact URL, because Cursor stops at 40 tools.
- Secure sites and servers with CodexOpenAI's coding agent for the terminal. A codex mcp add command or a config.toml entry, then codex mcp login.
- Secure sites and servers with OpenCodeThe open-source terminal coding agent. One remote MCP entry, then opencode mcp auth xcloud.
- Secure sites and servers with Hermes AgentNous Research's agent with memory and a built-in scheduler. An mcp_servers entry in config.yaml and one login.
- Secure sites and servers with OpenClawThe open-source agent runtime with chat apps and automations. ClawHub skill plus the MCP client.
- Secure sites and servers with WindsurfThe Cognition editor, now Devin Desktop. devin mcp add for the Devin Local agent, a serverUrl entry for legacy Cascade.
- Secure sites and servers with GitHub CopilotCopilot agent mode in VS Code. One .vscode/mcp.json entry, or the Agent Plugins package.
- Secure sites and servers with Gemini CLIGoogle's terminal agent. One gemini mcp add command, OAuth found automatically.
- Secure sites and servers with ChatGPTOpenAI's chat assistant. A developer-mode app with the xCloud MCP URL and OAuth.
- Secure sites and servers with ChatGPT dotsOpenAI's always-on agent in ChatGPT. Uses the xCloud MCP plugin you add in ChatGPT, with custom rules and scheduled tasks.
- Secure sites and servers with GrokxAI's terminal agent, Grok Build. One grok mcp add command or a config.toml entry.
- Secure sites and servers with Grok BotxAI's always-on Bots on a cloud computer. One Remote HTTPS MCP plugin, OAuth sign-in, routines on a schedule.
- Secure sites and servers with KiroAWS's agentic IDE. One url entry in .kiro/settings/mcp.json, plus the portable xCloud Agent Plugins package.
- Secure sites and servers with ZedThe Zed editor's Agent Panel. One context_servers entry in settings.json and a browser sign-in.
More Antigravity guides
- Antigravity and xCloud overview
- Deploy from Git with Antigravity
- Run Docker apps with Antigravity
- Install one-click apps with Antigravity
- Manage WordPress with Antigravity
- Back up and stage sites with Antigravity
- Manage SSL and domains with Antigravity
- Manage servers with Antigravity
- Troubleshoot a broken site with Antigravity
- Speed up a slow site with Antigravity
Run Your Hosting from Antigravity
xCloud MCP, the Agent Skills and the Public API are free with every account. Connect once and ask.