MCP server · Developer tools
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.
Install Semgrep MCP
semgrep mcp
{
"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
| Name | Required | What it is for |
|---|---|---|
SEMGREP_APP_TOKEN | Optional | Optional 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
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 MCP servers
- Sentry MCPInspect errors, traces and issues, then perform scoped issue triage through Sentry's official MCP service.
- GitReference MCP server for reading, searching and changing a local Git repository — status, diffs, log, commits, branches and checkouts.
- GitHub MCP ServerGitHub's official MCP server: repositories, issues, pull requests, code search and Actions as tools — hosted remotely or run locally in Docker.