- Claude Code: hooks and plugins
- Codex: MCP
- Cursor: hooks and MCP
- GitHub Copilot (Visual Studio, JetBrains, Xcode, Eclipse): MCP
- VS Code: MCP
- Windsurf: Cascade hooks
Prerequisites
- Python 3.10 or later (the Semgrep CLI requires it at runtime regardless of how it was installed)
- Homebrew,
pipx, oruvto install Semgrep - A Semgrep account
Install the Semgrep CLI
These steps are the same regardless of which IDE you use.1
Install Semgrep using Homebrew, pipx, or uv:
2
Verify that you’ve installed the latest version of Semgrep:
3
Sign in to your Semgrep account and install the Semgrep Pro engine:
semgrep login launches a browser window. You can also use the activation link printed in the terminal.Connect to your IDE
- Claude Code
- Codex
- Cursor
- GitHub Copilot
- VS Code
- Windsurf
- Other IDEs
1
Start a new Claude Code instance in the terminal:
2
Open the plugin manager:
3
Go to Discover, search for Semgrep, and click Install.
4
Set up the Guardian:
Scan your code
1
Open up your IDE’s AI chat window.
2
Ensure that you’re in the correct context to use Semgrep.
3
Prompt your IDE to scan with Semgrep.
Additional resources
- Semgrep’s
#mcpSlack community - The Semgrep MCP server repo on GitHub