A plugin that runs in Claude Code, detecting and resolving the vulnerabilities, malicious packages, and hardcoded secrets your agent introduces before code even gets pushed.
Semgrep Guardian integrates natively with AI coding agents like Claude Code and Cursor to catch security issues before they ship. It bundles the Semgrep MCP server, and Hooks into a single install, and scans every file an agent generates using Semgrep Code, Supply Chain, and Secrets. When findings are detected, the agent is prompted to regenerate code until Semgrep returns clean results or you choose to dismiss them.
Note
This project is under active development. We would love your feedback. Join the #mcp community Slack channel!
Get started in under 2 minutes — follow these five steps inside Claude Code.
-
Start a Claude Code instance:
claude -
Open the plugin manager:
/plugin -
Go to Discover, search for Semgrep, and click Install.
-
Tell Claude to load the plugin:
/reload-plugins -
Ask Claude to login to Semgrep to kickoff onboarding:
login to semgrepThis calls into the Guardian MCP server. If Claude has trouble, run
/clearto restart Claude, or exit and reopen it manually.
The Semgrep Guardian is a plugin that installs directly into any AI coding agent. It bundles two components; an MCP server and hooks. We ensure every line of AI-generated code is scanned before it ever reaches a pull request. No more delaying PR's due to vulnerabilities generated by AI.
|
The agent asks Semgrep and Semgrep answers. The MCP server exposes tools to access Semgrep's findings so the agent can call them directly. |
Consistent scanning that your team can rely on. Hooks fire on every file write, ensuring a scan regardless of what the agent does. |
For specific guidance to roll out Semgrep Guardian via an MDM or via your agent's built-in enterprise security controls, view this detailed documentation to help your security team enforce the standardization of Guardian across all their developers. For more details, this is how you roll it out: Rolling out Semgrep Guardian.


