Skip to content

Connect Antigravity to LyraShield via MCP

A step by step workflow to configure LyraShield MCP in Google Antigravity using the CLI, verify the connection, run a scan and gate pull requests.

LyraShield MCP integration with Antigravity
On this page

Follow the current Antigravity integration guide: use its exact pinned CLI writer command when listed, or manually merge the server entry and preserve existing settings. Authenticate local stdio with CLI lyrashield@0.2.14 and MCP @lyrashield/mcp@0.2.12. Install skills only through a documented native path, then restart the client and verify an authenticated read-only call.

The vibe coding security guide separates generated code from the controls that enforce what it may do. Wiring LyraShield into Antigravity puts release assurance inside the agent session, so a scan runs before a change reaches a pull request rather than only after. The steps below assume you have Node installed and an active LyraShield account.

Step Command or file Purpose
Prerequisites Node 24 plus, git, LyraShield account Prepare the environment
Configure Current client guide Manually merge the documented server entry
Manual path ~/.gemini/config/mcp_config.json Fallback if CLI is unavailable
Verify npx -y lyrashield@0.2.14 doctor Check config and credentials
Inline check npx -y lyrashield@0.2.14 scan Run a scan from the session
CI gate .github/workflows/lyrashield.yml Diff aware gate on pull requests

1. Meet the prerequisites

Install Node 24 or later, which the Node.js release guide covers. Confirm git is configured for your repository. Create a LyraShield account at lyrashieldai.com if you do not have one, because the MCP server needs credentials to authenticate. Run npx -y lyrashield@0.2.14 login to store your credentials in ~/.lyrashield/credentials.json, which is not committed to version control.

If you are migrating from Gemini CLI, Antigravity reuses the same ~/.gemini/ path, so your existing MCP config carries forward. The install step below adds the LyraShield entry to that shared location. Keep your credentials file outside the working tree and never paste a token directly into a config file the agent can read.

2. Add the LyraShield MCP server

Follow the current antigravity integration guide and manually merge the server entry, preserving existing settings. Authenticate local stdio separately with npx -y lyrashield@0.2.14 login --oauth and use @lyrashield/mcp@0.2.12. Use pinned CLI commands for documented config or skill installs; marketplace plugins remain separately gated. Restart the client, confirm discovery, then call lyrashield_list_workspaces for authenticated read-only access. CLI doctor does not establish client authentication or scan completion. Manually merge the client-specific server entry described in the current guide: ~/.gemini/config/mcp_config.json for a shared scope or .agents/mcp_config.json for a project scope, both under a root mcpServers key. A remote server uses a serverUrl field and the url field is rejected. Skills live in ~/.gemini/skills and rules live in GEMINI.md or AGENTS.md. The Model Context Protocol specification defines the transport and tool exposure contract.

Add the entry manually and preserve existing client settings. For a remote server, set serverUrl to the LyraShield endpoint and include your Bearer token in the headers:

{
  "mcpServers": {
    "lyrashield": {
      "serverUrl": "https://app.lyrashieldai.com/api/mcp",
      "headers": { "Authorization": "Bearer lsk_YOUR_TOKEN" }
    }
  }
}

For a local stdio server, use the package directly:

{
  "mcpServers": {
    "lyrashield": {
      "command": "npx",
      "args": ["-y", "@lyrashield/mcp@0.2.12"]
    }
  }
}

3. Verify the connection

Restart the client and inspect the server and tools in its own MCP settings. Call lyrashield_list_workspaces and retain the authenticated read-only result. CLI npx -y lyrashield@0.2.14 doctor can inspect local credentials and setup, but does not prove that this client discovered tools or completed authentication. If discovery fails, check the client-specific path, root key, transport and selected workspace before requesting any recorded assessment. A configuration entry is not a scan receipt, and a successful read call is not evidence that the target application has been tested.

Restart your Antigravity session after editing the config file so the agent loads the new server entry. Confirm the LyraShield tools appear in the session. If the tools are missing, check the serverUrl spelling, the Bearer token and whether the config file is in the scope Antigravity reads. Discovery, authentication and assessment are separate checks. Reopen the client settings after changes, repeat a read-only call and preserve unresolved failures. Do not request a paid scan merely to troubleshoot configuration.

4. Run an inline security check

With the connection verified, run npx -y lyrashield@0.2.14 scan from your project root. The scan targets the repository, reviews the code for candidate issues and records evidence in a checksum-bound assurance record. Detected issues stay in a detected state until a fresh applicable retest confirms the behavior, so a finding is a prompt to investigate, not a verdict. Read each finding in the session, note the file and line and decide whether the candidate reflects a real weakness or a false positive that deserves a recorded dismissal. The assurance record holds both the confirmed issues and the dismissed ones, so a reviewer can see the full set of decisions, not just the open items.

Review the scan output in the session. If a candidate issue is real, a fix proposal is generated for review. Approval gated fix proposals require a human review before a patch reaches a pull request, so a fix is never automatic. As of August 2026, LyraShield v1 covers agentic pentest, software composition analysis, secrets scanning, a GitHub Action and SARIF output. Run the free AI app security checklist to see the full release review.

5. Gate pull requests with the GitHub Action

Add the LyraShield GitHub Action to your CI so every pull request is scanned. The action runs a diff aware gate, which means only changed code is scanned on each pull request, keeping the check fast enough to run on every push. Output is SARIF, which GitHub renders in the security tab. The GitHub Actions documentation covers workflow syntax and the GitHub SARIF integration explains how findings appear. Store the LyraShield token as a repository secret rather than a variable, so it stays encrypted and masked in logs. Set the diff aware flag to true so the action scans only the lines a pull request changes, which keeps the gate fast on large repositories and avoids re-scanning untouched code on every run.

Add a workflow file named lyrashield.yml under the .github/workflows directory:

name: LyraShield
on:
  pull_request:
    branches: [main]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: ecryptoguru/lyrashield-ai@v2
        with:
          fail_on_severity: HIGH

6. Add a rules snippet to GEMINI.md

Tell Antigravity to use LyraShield before proposing a fix. Add a line to GEMINI.md or AGENTS.md in your project root:

Run the LyraShield scan tool before proposing a fix. Do not apply a patch until a human reviews the fix proposal. Keep detected issues in a detected state until a fresh applicable retest confirms the behavior.

A rules file states intent. The approval gate enforces it. A prompt can be changed in a pull request or ignored under pressure, but a server side gate that blocks a patch until a human binds it to an approval cannot be talked past. That is the difference between stating a policy and holding one. Require a security owner for changes to agent configuration and include GEMINI.md and AGENTS.md in normal code review and branch protection. The Codex security workflow covers a related approach if your team uses multiple agents.

Why pair Antigravity with LyraShield

Antigravity accelerates implementation inside the agent session. LyraShield AI provides release assurance through a loop of target, review, evidence, fix, retest and report. The platform keeps detected candidates, retest outcomes and inconclusive results distinct. Each receipt is limited to its stated evidence and scope, and the assurance record preserves what was checked and the result. Approval gated fix proposals require review before a patch reaches a pull request, so a fix is never automatic.

As of August 2026, LyraShield v1 covers agentic pentest, software composition analysis, secrets scanning, a GitHub Action with a diff aware gate and SARIF output. Approval gated fix proposals are approval-gated fix proposals, not unattended fixes. The GitHub Action runs a diff aware gate so only changed code is scanned on each pull request. Create an account to start or run the free AI app security checklist first. The Gemini CLI security checklist covers that separately supported client.

Frequently asked

How do I add the LyraShield MCP server to Antigravity

Follow /docs/integrations/antigravity for manual setup. Use pinned CLI commands for documented config or skill installs; marketplace plugins remain separately gated. Use CLI 0.2.14 and MCP 0.2.12 for local stdio, then verify discovery and a read-only client call.

Does Antigravity support remote MCP servers

Yes. Antigravity accepts remote servers with a serverUrl field. The url field is rejected, so if you paste a manual config, use serverUrl for the remote endpoint.

How do I verify the LyraShield connection works

Confirm server and tool discovery inside the client, then call lyrashield_list_workspaces. CLI 0.2.14 doctor checks a separate local surface; it is not client authentication or scan evidence.

Can I gate pull requests with LyraShield in CI

Yes. Add the LyraShield GitHub Action to your workflow with the diff aware gate so only changed code is scanned on each pull request. Output is SARIF, which GitHub renders in the security tab.

Stay in the loop.

We store your email for product updates and scorecard notifications. No sharing, no marketing blasts.