> ## Documentation Index
> Fetch the complete documentation index at: https://docs.semgrep.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Semgrep Guardian with Antigravity

> Add the Semgrep MCP server to Google Antigravity.

Integrate Semgrep Guardian with Google Antigravity through MCP. Antigravity uses your locally installed Semgrep CLI to run Semgrep on your machine. For more information, see [Antigravity documentation](https://antigravity.google/docs/mcp).

## Prerequisites

* A Semgrep account
* [Semgrep CLI installed and signed in](https://docs.semgrep.dev/semgrep-guardian/install-cli.md)

## Setup

**Step 1**

In Antigravity, click **…** at the top of the agent side panel and select **MCP Servers**.

**Step 2**

Click **Manage MCP Servers**, then click **View raw config** to open `mcp_config.json`.

The global configuration file is `~/.gemini/config/mcp_config.json`. To add the server to one workspace only, edit `WORKSPACE_ROOT/.agents/mcp_config.json` instead, where `WORKSPACE_ROOT` is your workspace's root folder.

**Step 3**

Add the Semgrep server under `mcpServers`:

```json theme={null}
{
  "mcpServers": {
    "semgrep": {
      "command": "semgrep",
      "args": ["mcp"]
    }
  }
}
```

The server uses the credentials that `semgrep login` stores, so you don't need to add a token to this file.

**Step 4**

Save the file.

**Step 5**

To confirm the setup, ask the agent to scan a file in your workspace with Semgrep. The agent calls the `semgrep_scan` tool and reports any findings.

Guardian doesn't support [hooks](https://docs.semgrep.dev/semgrep-guardian/overview.md) in Antigravity, so Semgrep tools run only when the agent calls them through MCP.

## Rules this setup uses

This integration has no Guardian-specific policy available. It pulls all rules enabled on the **Policies** page. To compare this with the recommended plugins, see [Rules and configuration](https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration.md).

## Next steps

For more information, see the following pages:

* [Enterprise deployment](https://docs.semgrep.dev/semgrep-guardian/enterprise-deployment.md) for authentication and organization-wide rollout
* [Semgrep Guardian overview](https://docs.semgrep.dev/semgrep-guardian/overview.md)
* [Rules and configuration](https://docs.semgrep.dev/semgrep-guardian/rules-and-configuration.md)
