Semgrep MCP (beta)

Security for the agentic era

Cursor

  1. brew install semgrep or pip install semgrep. Run semgrep --version to make sure it's installed correctly and the version is 1.138.0 or higher.
  2. semgrep login && semgrep install-semgrep-pro
  3. Add Semgrep MCP server to Cursor
  4. Run the /semgrep/setup_semgrep_mcp command from an AI Chat to have Cursor guide you through some initial setup.

    Hint

    Don't copy and paste the command. Instead, type / and you should see a list of slash commands.

    Cursor slash commands

Claude Code

  1. brew install semgrep or pip install semgrep. Run semgrep --version to make sure it's installed correctly and the version is 1.138.0 or higher.
  2. semgrep login && semgrep install-semgrep-pro
  3. claude mcp add --scope user semgrep semgrep mcp
Additional Details
  • This is actively supported but should be considered beta software. It's still experimental and may break or change at any time.
  • We previously recommended a remote MCP server. If you are currently using it, please replace it with the local one described above. We are working to re-launch the remote MCP server with additional features including OAuth.
  • Please report any issues to the GitHub repository.
  • Please see the README for more details.