MCP Server — VetCoders/mcp-server-semgrep

MCP Server for Semgrep Integration - static code analysis with AI

Remote serverstreamable-httpPython

What is the MCP Server?

MCP Server for Semgrep Integration - static code analysis with AI

What it actually does

MCP Server Semgrep is a Model Context Protocol compliant server that integrates the powerful Semgrep static analysis tool with AI assistants like Anthropic Claude. It enables advanced code analysis, security vulnerability detection, and code quality improvements directly through a conversational interface.

  • Direct integration with the official MCP SDK
  • Simplified architecture with consolidated handlers
  • Clean ES Modules implementation
  • Efficient error handling and path validation for security
  • Interface and documentation in both English and Polish
  • Comprehensive unit tests

Configuration

  • Node.js v18+ - TypeScript (for development)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
scan_directoryScanning source code for potential issues
list_rulesDisplaying available rules and languages supported by Semgrep
analyze_resultsDetailed analysis of scan results
create_ruleCreating custom Semgrep rules
filter_resultsFiltering results by various criteria
export_resultsExporting results in various formats
compare_resultsComparing two sets of results (e.g., before and after changes)

How to install the MCP Server

{
  "mcpServers": {
    "semgrep-1": {
      "command": "npx",
      "args": ["-y", "mcp-server-semgrep"],
      "env": {
        "SEMGREP_APP_TOKEN": "your-value",
        "MCP_SERVER_SEMGREP_ALLOWED_ROOTS": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Node.js v18+ - TypeScript (for development)
VariableDescriptionRequired
SEMGREP_APP_TOKENCredential the server authenticates with.Yes
MCP_SERVER_SEMGREP_ALLOWED_ROOTSConfiguration value read at startup.Optional

Example prompts to try

  • “Use MCP to scan directory.”
  • “Use MCP to list rules.”
  • “Use MCP to analyze results.”

Frequently asked questions

MCP Server for Semgrep Integration - static code analysis with AI Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.