semgrep-mcp

Scan PHP code with Semgrep CLI and output findings in MCP JSON format.

80|6|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/yunmengya/PHP_AUDIT_SKILLS --skill semgrep-mcp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semgrep-mcp
Source: https://github.com/yunmengya/PHP_AUDIT_SKILLS/tree/main/semgrep-mcp
Command: npx skills add https://github.com/yunmengya/PHP_AUDIT_SKILLS --skill semgrep-mcp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the process of scanning PHP codebases for security vulnerabilities and code quality issues using the Semgrep static analysis tool. It leverages a comprehensive set of rules to identify potential risks and provides normalized output for easier integration into CI/CD pipelines.

Core Features & Use Cases

  • Automated Security Scanning: Utilizes Semgrep CLI to scan PHP projects against a curated set of rules.
  • Rule Management: Supports using default rules (r/all), community rules (p/trailofbits), and custom local rules.
  • Normalized Output: Generates results in MCP (Machine-Readable Code Pattern) JSON format for seamless integration.
  • Use Case: Integrate this Skill into your development workflow to automatically detect common PHP vulnerabilities like SQL injection, RCE, and XSS during code commits or pull requests.

Quick Start

Use the semgrep-mcp skill to scan the PHP project located at /path/to/your/php_project.

Frequently Asked Questions about semgrep-mcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan PHP code for security vulnerabilities using Semgrep?

Scanning PHP code for security vulnerabilities with Semgrep applies registry and local rules to identify risks like SQL injection and XSS, outputting findings in normalized MCP JSON format for automated workflow integration.

What is normalized MCP JSON output for static analysis?

Normalized MCP JSON output is a Machine-Readable Code Pattern format that standardizes Semgrep security findings, facilitating seamless integration of vulnerability detection results into automated development workflows and CI/CD pipelines.

Can I use custom local rules for PHP security scanning or am I limited to default rules?

You are not limited to default rules; PHP security scanning supports using default rules (`r/all`), community rules (`p/trailofbits`), and custom local rules, alongside rule synchronization for comprehensive vulnerability detection.

How do I integrate static analysis into my PHP development workflow to catch code quality issues?

Integrating static analysis into a PHP development workflow automates Semgrep scans during code commits or pull requests, detecting security vulnerabilities and code quality issues before deployment to ensure codebase integrity.

What types of PHP vulnerabilities can Semgrep static analysis detect?

Semgrep static analysis detects common PHP vulnerabilities including SQL injection, Remote Code Execution (RCE), and Cross-Site Scripting (XSS), along with broader code quality issues using curated security rules.

Does Semgrep scanning require any external dependencies to run PHP security checks?

No external dependencies are required to run PHP security checks; the Semgrep scanning Skill operates independently using its internal scripts and assets to execute rule synchronization and vulnerability detection.