Skip to content
LyraShield AIOpen beta

Updated

Antigravity

Antigravity is Google's successor to Gemini CLI. It stores MCP configuration in a shared file at ~/.gemini/config/mcp_config.json that serves the Antigravity IDE, the agy CLI, and Antigravity 2.0. A project-scoped alternative lives at .agents/mcp_config.json.

Migrating from Gemini CLI? Antigravity replaces Gemini CLI and uses the same ~/.gemini/ config directory. If you already have LyraShield configured for Gemini CLI, the same entry works in Antigravity. See the Gemini CLI guide for the legacy setup.

Install with the CLI (fastest)

Run npx lyrashield install antigravity from your project root. It detects Antigravity, writes the correct config automatically, and never inlines your API key into a file you might commit. Add --dry-run first to preview the change with no write, or run npx lyrashield doctor afterward to confirm it's configured correctly.

npx lyrashield install antigravity

Prefer to see exactly what gets written, or set it up without Node.js? Configure it by hand below.

Local stdio setup

Add the following to ~/.gemini/config/mcp_config.json. Create the file if it does not exist. For project-scoped config, use .agents/mcp_config.json instead.

Add the following to ~/.gemini/config/mcp_config.json. Recommended: run npx lyrashield login --oauth once; the local MCP server reads the selected workspace credential from ~/.lyrashield/credentials.json.

{
  "mcpServers": {
    "lyrashield": {
      "command": "npx",
      "args": [
        "-y",
        "@lyrashield/mcp"
      ],
      "env": {
        "LYRASHIELD_API_URL": "https://app.lyrashieldai.com"
      }
    }
  }
}
One-line install: the CLI writes exactly the configuration above.
npx lyrashield install antigravity

Important gotchas

  • Antigravity uses `serverUrl`, not `url`, for HTTP servers — `url` is rejected.
  • One shared config at ~/.gemini/config/mcp_config.json serves the IDE, the agy CLI, and 2.0; the workspace .agents/mcp_config.json scopes to one project.
  • Shared skills live in ~/.gemini/skills; project rules go in GEMINI.md (project) or AGENTS.md (global).

Remote endpoint

For Antigravity cloud environments that cannot run local processes, use serverUrl instead of command + args to connect to the remote Streamable-HTTP endpoint.

Gotcha — use serverUrl, not url: Antigravity uses serverUrl for HTTP-based MCP servers. The url field is rejected.
Skills and rules: Shared skills live in ~/.gemini/skills; project rules go in GEMINI.md (project) or AGENTS.md (global).

Add the following to ~/.gemini/config/mcp_config.json. Replace <LYRASHIELD_API_KEY> with your workspace API key.

{
  "mcpServers": {
    "lyrashield": {
      "serverUrl": "https://app.lyrashieldai.com/api/mcp",
      "headers": {
        "Authorization": "Bearer <LYRASHIELD_API_KEY>"
      }
    }
  }
}
Read-only vs. read-and-write: Remote mutating tools (scan triggers, finding submissions, report creation) require an explicit OAuth write scope or write-capable API key, plus a human out-of-band approval. Read-only inspection tools work with any key.

Verify the connection

Restart Antigravity and ask: "What LyraShield tools do you have access to?" to confirm the server is connected.

Requirements: Node.js 20+ and a LyraShield workspace API key. The@lyrashield/mcp package is published on npm, sonpx -y @lyrashield/mcp resolves directly.