> ## 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 Cursor

> Install Semgrep Guardian in Cursor using hooks and MCP.

Integrate Semgrep Guardian with Cursor through [hooks](https://cursor.com/docs/hooks) and [MCP](https://cursor.com/docs/mcp).

## Prerequisites

* A Semgrep account
* [Semgrep CLI installed and signed in](/semgrep-guardian/install-cli)

## Setup

<Steps>
  <Step>
    [Install the Semgrep CLI](/semgrep-guardian/install-cli).
  </Step>

  <Step>
    Find Semgrep in the [Cursor Plugin Marketplace](https://cursor.com/marketplace/semgrep), or open **Cursor > ⌘⇧J > Plugins**. Search "Semgrep" and click **Add to Cursor**.
  </Step>

  <Step>
    Restart Cursor to apply configuration.
  </Step>

  <Step>
    In Cursor's chat, run the `/setup-semgrep-plugin` skill to finish wiring up the plugin.

    The plugin uses Cursor hooks (`afterFileEdit` and `stop`) to scan code as the agent writes it, and exposes Semgrep tools through Cursor MCP.
  </Step>
</Steps>

## What rules does this setup use?

This integration scans with the rules enabled for your Semgrep organization through your Policies. See [Rules and configuration](/semgrep-guardian/rules-and-configuration) for how this differs from the Claude Code remote plugin.

## Next steps

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