The Semgrep MCP Server repository provides an interface to Semgrep through the Model Context Protocol, enabling code scanning, custom rule creation, and vulnerability analysis for LLMs, AI Agents, and coding tools.
The Semgrep MCP Server is a tool that uses Semgrep to scan code for vulnerabilities. It leverages the Model Context Protocol (MCP) for integration with LLMs, AI Agents, and coding tools like Cursor.
Key Features:
semgrep_scan
for code snippets and scan_directory
for directory-wide scans.list_rules
to view available Semgrep rules and create_rule
to define custom rules.analyze_results
for severity counts, filter_results
for refining results, export_results
for various formats, and compare_results
for issue tracking.Installation:
pip install semgrep
.docker build -t mcp-server .
or use the pre-built image from ghcr.io/semgrep/mcp:latest
.Usage:
uv run mcp run server.py -t sse
.docker run -p 8000:8000 mcp-server
.http://127.0.0.1:8000/sse
.semgrep/mcp
March 17, 2025
March 28, 2025
Python