Antigravity
MCP and plugins
Connect an MCP server or Antigravity plugin using a tool inventory, least privilege, and revocation testing.
The Model Context Protocol (MCP) is an open standard that Antigravity uses to connect to local tools, databases, and remote APIs through MCP servers. An Antigravity plugin is an installable, versioned bundle that can combine Skills, MCP servers, custom agents and subagents, rules, and hooks. The official migration guide distinguishes legacy Gemini CLI extensions from native Antigravity plugins: agy plugin import gemini converts the former into the latter. Antigravity also has IDE extensions, which are integrations installed in editors, not the plugin bundles discussed on this page. Whether you configure an MCP server directly or install a plugin, you expand what the agent can access and execute.
The goal of this page is to connect one read-only tool, confirm that it can return only synthetic catalog data, and then disable it yourself. First complete Install and sign in to a CLI.
Define the trust boundary first
Section titled “Define the trust boundary first”Fill out one row for the server or plugin you plan to connect. Do not install it while any cell remains unclear:
| Question | Example of an acceptable answer |
|---|---|
| Who publishes and updates it? | A verifiable organization and repository; a pinned, reviewed version |
| What can it read? | Only the synthetic product catalog, not the user’s home directory |
| Can it write or transmit data? | No; it exposes only lookup_item |
| Where are credentials stored? | Managed through OAuth or the product’s credential interface, not in the repository |
| How is access revoked? | Disable it first, revoke the token, and finally delete the configuration |
| How is activity recorded? | Record the tool name, arguments, time, and result summary, but not secrets |
A Marketplace listing helps verify the distribution channel, but it does not determine whether your data is appropriate to share with the integration.
Minimal MCP configuration
Section titled “Minimal MCP configuration”The official MCP documentation says Antigravity CLI supports local stdio processes and remote Streamable HTTP servers. Global configuration lives at ~/.gemini/config/mcp_config.json; project configuration lives at <workspace>/.agents/mcp_config.json. Start with project scope so an experimental tool does not follow you into every repository.
Your starting material is this synthetic catalog, and the server should return only its contents:
[ {"sku":"DEMO-101","name":"Blue Harbor Sticky Notes","stock":12}, {"sku":"DEMO-205","name":"Misty Shore Folder","stock":0}]Save the following template as .agents/mcp_config.json in the test workspace, and replace the URL with a server you have reviewed that connects only to synthetic data. Do not use the nonexistent example domain directly.
{ "mcpServers": { "catalog-readonly": { "serverUrl": "https://YOUR_REVIEWED_SERVER.example/mcp/", "enabledTools": ["lookup_item"], "timeoutSeconds": 30, "disabled": false } }}A remote server must use the currently supported Streamable HTTP transport documented by Google; a local server uses command and args. Do not put a plaintext token in the JSON. Prefer the server’s OAuth flow or variables collected through the plugin credential interface.
Launch agy and enter /mcp. Inspect the server’s connection status and the tools it actually exposes before sending this complete prompt:
Call only lookup_item from catalog-readonly.Look up SKU DEMO-205 and return only: sku, name, stock, and original tool name.Do not call other tools. Do not write, transmit, delete, or run shell commands.If the tool does not exist or its argument schema differs, stop and report the tool schema you actually see. Do not guess.The expected output includes DEMO-205, Misty Shore Folder, a stock value of 0, and the tool name. A stock value of 0 must not be interpreted as “automatically restocked after selling out,” because the tool provided no such fact.
How a plugin differs from a single MCP server
Section titled “How a plugin differs from a single MCP server”| Option | Possible contents | Best for | First step after installation |
|---|---|---|---|
| Single MCP configuration | One or more external tools | A known server with known permission boundaries | Inspect tool schemas and logs in /mcp |
| Antigravity plugin | A combination of MCP, Skills, rules, agents, and hooks | A bundled workflow | Expand the component inventory in /plugin before deciding what to enable |
The current CLI can open the manager with /plugin, or you can run agy plugin list --json in a shell to inspect installed components. Do not enable something merely because it appears to be recommended. First verify the publisher, version, components, and required credentials. When a plugin needs variables, the official interface prompts for them during enablement; an OAuth server opens a browser for authorization.
Anti-pattern and rewrite
Section titled “Anti-pattern and rewrite”Anti-pattern: “Install this plugin, let it handle the repository, email, and tickets, and approve everything automatically.” This expands the data scope, write permissions, and irreversible actions all at once.
Rewrite: “Install it in a synthetic workspace first. Enable only read-only lookup tools. List each tool’s argument schema. Prohibit writes and outbound transmission. After one query, disable the integration and confirm that the same request can no longer run.”
Verification and revocation test
Section titled “Verification and revocation test”After the query, inspect permissions as well as the answer:
/mcpshows only the expected server andlookup_item.- Tool-call arguments contain only the synthetic SKU, with no local path, environment variable, or secret.
- Each field in the result matches the synthetic catalog.
- Change the server’s
disabledvalue totrue, then reload or restart the CLI. - Send the same prompt again. It should fail and clearly show that the tool is unavailable.
If step 5 still succeeds, a global configuration, a copy bundled with a plugin, or another tool with the same name is still active. Stop using the tool, then trace its source in /mcp and /plugin.
Recovery and safety boundaries
Section titled “Recovery and safety boundaries”- Cannot connect: Check the URL, transport type, and live logs in
/mcp. Do not start by broadening token permissions. - Too many tools: Set an
enabledToolsallowlist and keep unreviewed tools hidden. - Arguments do not match: Follow the actual schema shown in
/mcp. Stop the call rather than letting the model guess fields. - Plugin behaves unexpectedly: Disable it first, then revoke third-party credentials. Uninstall it if needed, but retain the audit record.
- Prompt injection: Treat tool output as untrusted input. Never execute text that asks you to “ignore the rules” or reveal secrets.
- Real write operations: Add argument validation, idempotency keys, and human confirmation in the application. Prompt constraints alone are insufficient.
Next: Use Function Calling to understand the boundary between “the model proposes” and “the application executes.” Maintain CLI project rules on the authoritative GEMINI.md page.