Skip to main content
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.

Prerequisites

Setup

1
In Antigravity, click … at the top of the agent side panel and select MCP Servers.
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.
3
Add the Semgrep server under mcpServers:
The server uses the credentials that semgrep login stores, so you don’t need to add a token to this file.
4
Save the file.
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 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.

Next steps

For more information, see the following pages: