Skip to main content
To roll out Semgrep Guardian organization-wide, standardize the installation process so that the plugin is automatically installed by the developer’s agent, rather than relying on each developer to install it manually. For individual developer setup, see the Guardian quick start.

Option 1: Use your agent’s built-in enterprise controls

Many coding agents let you pin an approved marketplace or plugin for your whole team. This is the simplest way to enable Guardian across your organization or make it required.
1

Enable the plugin in your managed settings

Modify your Claude marketplace settings to include Semgrep in your enabled plugins list:
2

Confirm the plugin is connected

Run claude mcp get plugin:semgrep:guardian and confirm it reports as connected.
Guardian is published to the Claude official marketplace (claude-plugins-official), so the payload only needs to enable the plugin. There’s no separate marketplace to declare. See Require marketplaces for your team for more information.

Option 2: Deploy through a mobile device management (MDM) platform

Deploy via your MDM platform to scope rollout by a device group. These templates configure Claude Code only. To roll out Guardian to Cursor, use Option 1.
These are community-maintained templates and may be unsupported or incorrect. You are responsible for verifying the configuration before deploying it to a fleet.
Deploy a Custom Settings payload with preference domain com.anthropic.claudecode through a Configuration Profile.
1

Create the property list

Save the following as com.anthropic.claudecode.plist.
com.anthropic.claudecode.plist
2

Upload it as a Custom Settings payload

Follow Jamf’s guide, Deploying Custom Computer Configuration Profiles Using the Application and Custom Settings Payload, using the preference domain com.anthropic.claudecode and the property list above as the uploaded file.
3

Scope the profile

Scope the Configuration Profile to your target device group.
Tips
  • Test the rollout on a single machine before pushing to the whole fleet.
  • After deploying, confirm that Guardian loaded by running claude mcp get plugin:semgrep:guardian and confirming it reports as connected.
  • Users still need to log in to Semgrep once Guardian is installed. See Authentication for how sign-in works, and Connect to your IDE for setup steps.

Authentication

How you sign in depends on which IDE you use. Claude Code is the recommended setup.
Each developer completes a one-time browser login when they first use the plugin. Semgrep refreshes access tokens automatically, so developers rarely need to sign in again. Claude Code uses Semgrep’s hosted remote server and authenticates through OAuth, so developers don’t need to install or run the Semgrep CLI.

Credentials in Claude Code

OAuth credentials are written to ~/.semgrep/guardian.yml when you sign in through the remote Claude Code plugin.At startup, Guardian fetches its default authentication method from Semgrep’s remote server. OAuth is currently the default for users who are not yet signed in. This setting is global and not configurable per user.If OAuth credentials are present in guardian.yml, Guardian uses them instead of any API token in ~/.semgrep/settings.yml.If you are switching from a local CLI setup to the remote Claude Code plugin, an existing OAuth session in guardian.yml takes precedence over CLI credentials in settings.yml. If scans run under a different account than you expect, check which file contains active credentials. Use semgrep logout to remove CLI credentials from settings.yml.To sign in with the legacy API-token method in Claude Code, ask the Guardian MCP to log in to Semgrep using the legacy method.

Shared read-only tokens (Enterprise only)

Admins can create read-only tokens from within the Semgrep app. Sign in and go to Settings > Tokens, then set the token scope to read-only. See Access tokens for more information. Note that with a shared token, Semgrep cannot attribute activity to an individual developer, so per-user metrics are limited. Contact Semgrep if you have questions about which approach fits your organization.

Get help with a custom rollout

Contact Semgrep or send a message to the #mcp channel on Slack if you would like help building something custom for your MDM or agent fleet.