Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model’s context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Prompt Caching CalculatorEstimate savings from prompt caching.Tool

MCP server · Code and developer tools

Semgrep MCP server

Lets an assistant scan code for security issues with Semgrep, write custom rules and pull findings from Semgrep AppSec Platform.

Maintainer
Semgrep (official)
Licence
LGPL-2.1-or-later
Runs
Locally (semgrep)
Sign-in
Optional token
Last activity
2026-10-07

Overview

What it does

The Semgrep MCP server now ships inside the Semgrep CLI as the semgrep mcp subcommand. The old standalone semgrep/mcp repository and its semgrep-mcp package are deprecated and archived. Once the CLI is installed, the server runs over stdio by default, or over Streamable HTTP on 127.0.0.1:8000 with -t streamable-http. The semgrep/semgrep Docker image can run it too.

Use it when you want an assistant to check the code it has just written for security problems before you commit. It can scan files with Semgrep’s rules or a custom rule, check dependencies, show a file’s abstract syntax tree and explain the rule schema. With a SEMGREP_APP_TOKEN it can also fetch findings from Semgrep AppSec Platform. For Claude Code and Cursor, Semgrep recommends its Semgrep Guardian plugin, which bundles the MCP server with hooks and skills and installs the CLI for you.

Tools

What the assistant can do

  • Scan code files for security issues (semgrep_scan)
  • Scan with a custom Semgrep rule
  • Scan dependencies for supply chain issues
  • Fetch findings from Semgrep AppSec Platform (semgrep_findings)
  • Show the abstract syntax tree of a file
  • List supported languages and the rule schema
  • Prompt for writing a custom rule

Install

Install Semgrep MCP server in your app

You need:

  • The Semgrep CLI (for example brew install semgrep); the PyPI package needs Python 3.10 or newer
  • Optional: a Semgrep AppSec Platform account and SEMGREP_APP_TOKEN for findings

Run in your project. --scope local keeps the servers private to you in this project; use user for every project.

Terminal
claude mcp add --scope local semgrep -- semgrep mcp
Native Windows (PowerShell)
claude mcp add --scope local semgrep -- semgrep mcp

Want it alongside other servers? Open Semgrep MCP server in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.

Before you install

  • Local scan tools read files from the paths the assistant passes, so they can reach any file your user account can read.
  • SEMGREP_APP_TOKEN gives access to your organisation’s findings on Semgrep AppSec Platform. Keep it in an environment variable, not in a shared config file.
  • Streamable HTTP mode opens a local port (8000 by default). Keep it bound to 127.0.0.1.
  • A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.

Why it’s listed

Why we list it

A deterministic, well-known static analysis engine that assistants can call to check their own code, maintained inside Semgrep’s main CLI.

Related

All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?