MCP server · Developer tools

OfficialSource ValidatedLocal executionLGPL-2.1Updated August 2026

Semgrep MCP

Run Semgrep security scans through MCP so coding agents can analyze source code for vulnerabilities locally.

Quick verdict

It gives an MCP-capable coding agent direct access to Semgrep's deterministic source-code analysis rather than relying on the model alone to recognise insecure patterns.

  • MaintainerSemgrep (official)
  • Security scopeLocal execution
  • Transportsstdio, streamable-http
  • Install channelbinary
  • EvidenceSource Validated
  • LicenseLGPL-2.1 · Open source

Semgrep MCP exposes Semgrep's static-analysis capabilities to MCP clients through the Semgrep CLI's own mcp subcommand. It is a strong fit for coding-agent workflows where generated or modified code should be checked with deterministic security rules before it is accepted. The implementation lives in the main Semgrep CLI: the earlier standalone semgrep/mcp distribution's changelog records the move and directs users to run semgrep mcp instead, so that older repository is not the canonical source.

MCP security best practices

Install Semgrep MCP

semgrep mcp

Config entry (mcpServers)
{
  "mcpServers": {
    "semgrep": {
      "command": "semgrep",
      "args": ["mcp"]
    }
  }
}

Install the Semgrep CLI by a vendor-supported method, then run `semgrep mcp`. Docker and local Streamable HTTP are also documented upstream but are not the configuration published here.

Credentials

NameRequiredWhat it is for
SEMGREP_APP_TOKENOptionalOptional token for Semgrep AppSec Platform-backed functionality. Not required for local open-source scanning with your own rules.

Verified configurations

Not run by us yet. This profile is Source Validated: the install channel, config entry, credentials and license were checked against the source and upstream metadata, but no configuration has been installed, discovered and executed in a recorded environment. When one is, it appears here with the eight scope dimensions below.

Best for

Coding agents that need local static analysis and security checks as part of an AI-assisted development workflow.

Why use it

It gives an MCP-capable coding agent direct access to Semgrep's deterministic source-code analysis rather than relying on the model alone to recognise insecure patterns.

Tradeoffs

Runs local analysis and can inspect any source it is pointed at, so treat it as local execution rather than a read-only lookup. Some capabilities use network-backed Semgrep services or need an AppSec Platform token. Do not expose the Streamable HTTP interface beyond its intended consumer without a threat model. One upstream issue affects the generic scan path when no token is present, metrics are disabled and no configuration is supplied; scanning with an explicit rule is the reliable path.

Upstream state

repository active. Lifecycle is derived from a committed upstream snapshot at build time, never authored by hand.

Editorial review

Reviewed byOpenSourcesAI EditorialLast updatedAugust 2026SourcesSemgrep MCP implementation README (cli/src/semgrep/mcp) — usage, transports, AppSec Platform token; Semgrep source repository; semgrep/mcp CHANGELOG — records the move of the MCP server into the Semgrep CLI; Upstream issue: generic scan path with metrics off and no configuration

Grade B — Source Validated. Re-review is due by 2027-02-15. Config entries, credential names and package status can change upstream; verify against the source repository before granting an agent access.

Sources

Related guides

All MCP servers →