MCP Server Semgrep
Servidor MCP Semgrep
IMPULSADO POR:
Acerca del proyecto
Este proyecto se inspiró inicialmente en la robustez de la herramienta Semgrep, The Replit Team y su Agent V2, así como en la implementación de stefanskiasan/semgrep-mcp-server, pero ha evolucionado con cambios arquitectónicos significativos para una instalación y mantenimiento más sencillos y mejorados.
El Servidor MCP Semgrep es un servidor compatible con el Protocolo de Contexto de Modelo (MCP) que integra la potente herramienta de análisis estático Semgrep con asistentes de IA como Anthropic Claude. Permite un análisis de código avanzado, detección de vulnerabilidades de seguridad y mejoras en la calidad del código directamente a través de una interfaz conversacional.
Related MCP server: AWS Security MCP
Beneficios de la integración
Para desarrolladores y equipos de desarrollo:
Análisis holístico del código fuente - detección de problemas en todo el proyecto, no solo en archivos individuales
Detección proactiva de errores - identificación de problemas potenciales antes de que se conviertan en errores críticos
Mejora continua de la calidad del código - el escaneo y la refactorización regulares conducen a mejoras graduales en la base de código
Consistencia estilística - identificación y corrección de inconsistencias en el código, tales como:
Capas z-index arbitrarias en CSS
Convenciones de nomenclatura inconsistentes
Duplicación de código
"Números mágicos" en lugar de constantes con nombre
Para la seguridad:
Verificación automatizada de código para vulnerabilidades conocidas - escaneo en busca de patrones de problemas de seguridad conocidos
Reglas de seguridad personalizadas - creación de reglas específicas para el proyecto
Educación del equipo - enseñanza de prácticas de programación segura mediante la detección de problemas potenciales
Para el mantenimiento y desarrollo de proyectos:
Documentación "viva" - la IA puede explicar por qué un fragmento de código es problemático y cómo solucionarlo
Reducción de la deuda técnica - detección y corrección sistemática de áreas problemáticas
Mejora de las revisiones de código - la detección automática de problemas comunes permite centrarse en asuntos más complejos
Características clave
Integración directa con el SDK oficial de MCP
Arquitectura simplificada con controladores consolidados
Implementación limpia de módulos ES
Manejo eficiente de errores y validación de rutas por seguridad
Interfaz y documentación tanto en inglés como en polaco
Pruebas unitarias integrales
Documentación extensa
Compatibilidad multiplataforma (Windows, macOS, Linux)
Detección y gestión flexible de la instalación de Semgrep
Funciones
El Servidor MCP Semgrep proporciona las siguientes herramientas:
scan_directory: Escaneo del código fuente en busca de problemas potenciales
list_rules: Visualización de las reglas disponibles y los lenguajes compatibles con Semgrep
analyze_results: Análisis detallado de los resultados del escaneo
create_rule: Creación de reglas personalizadas de Semgrep
filter_results: Filtrado de resultados según varios criterios
export_results: Exportación de resultados en varios formatos
compare_results: Comparación de dos conjuntos de resultados (p. ej., antes y después de los cambios)
Casos de uso comunes
Análisis de seguridad del código antes del despliegue
Detección de errores de programación comunes
Aplicación de estándares de codificación dentro de un equipo
Refactorización y mejora de la calidad del código existente
Identificación de inconsistencias en estilos y estructura del código (p. ej., CSS, organización de componentes)
Educación de los desarrolladores sobre las mejores prácticas
Verificación de la corrección de las correcciones (comparando escaneos antes/después)
Instalación
Requisitos previos
Node.js v18+
TypeScript (para desarrollo)
Opción 1: Instalar desde Smithery.ai (Recomendado)
La forma más fácil de instalar y usar el Servidor MCP Semgrep es a través de Smithery.ai:
Siga las instrucciones de instalación para añadirlo a sus clientes compatibles con MCP
Configure cualquier ajuste opcional, como el token de API de Semgrep y las raíces de espacio de trabajo permitidas
Este es el método recomendado para Claude Desktop y otros clientes MCP, ya que gestiona todas las dependencias y la configuración automáticamente.
Opción 2: Instalar desde el registro NPM
# Using npm
npm install -g mcp-server-semgrep
# Using pnpm
pnpm add -g mcp-server-semgrep
# Using yarn
yarn global add mcp-server-semgrepEl paquete también está disponible en otros registros:
Opción 3: Instalar desde GitHub
# Using npm
npm install -g git+https://github.com/VetCoders/mcp-server-semgrep.git
# Using pnpm
pnpm add -g git+https://github.com/VetCoders/mcp-server-semgrep.git
# Using yarn
yarn global add git+https://github.com/VetCoders/mcp-server-semgrep.gitOpción 4: Configuración de desarrollo local
Clone el repositorio:
git clone https://github.com/VetCoders/mcp-server-semgrep.git
cd mcp-server-semgrepInstale las dependencias (compatible con todos los gestores de paquetes principales):
# Using pnpm (recommended)
pnpm install
# Using npm
npm install
# Using yarn
yarn installConstruya el proyecto:
# Using pnpm
pnpm run build
# Using npm
npm run build
# Using yarn
yarn buildNota: El proceso de instalación comprobará automáticamente la disponibilidad de Semgrep. Si no se encuentra Semgrep, recibirá instrucciones sobre cómo instalarlo.
Contrato de raíz de espacio de trabajo
Este servidor solo lee y escribe archivos dentro de las raíces de espacio de trabajo explícitamente permitidas.
Por defecto, la raíz permitida es el directorio de trabajo del proceso (
process.cwd()).Para Claude Desktop, Smithery o cualquier lanzador que no inicie el servidor dentro de la raíz de su proyecto, establezca
MCP_SERVER_SEMGREP_ALLOWED_ROOTSen uno o más directorios absolutos.Utilice el delimitador de rutas de su plataforma para múltiples raíces:
:en macOS/Linux,;en Windows.
Modos de autenticación
Este servidor no implementa su propia gestión de cuentas de Semgrep. Utiliza la CLI de semgrep instalada y depende del comportamiento de autenticación normal de Semgrep.
Las ejecuciones en terminal local y desarrollo local a menudo pueden usar una sesión de
semgrep loginexistente de la cuenta del sistema operativo actual.Los lanzamientos gestionados como Claude Desktop, Smithery, contenedores o CI deberían preferir un
SEMGREP_APP_TOKENexplícito para un comportamiento determinista.SEMGREP_APP_TOKENsigue siendo la opción más segura cuando necesita una configuración portátil entre máquinas o ejecutores.
Opciones de instalación de Semgrep
Semgrep se puede instalar de varias maneras:
A través de gestores de paquetes:
# Using pnpm pnpm add -g semgrep # Using npm npm install -g semgrep # Using yarn yarn global add semgrepPython pip:
pip install semgrepHomebrew (macOS):
brew install semgrepLinux:
sudo apt-get install semgrep # or curl -sSL https://install.semgrep.dev | shWindows:
pip install semgrep
Integración con Claude Desktop
Hay dos formas de integrar el Servidor MCP Semgrep con Claude Desktop:
Método 1: Instalar a través de Smithery.ai (Recomendado)
Haga clic en "Install in Claude Desktop"
Siga las instrucciones en pantalla
Método 2: Configuración manual
Instale Claude Desktop
Actualice el archivo de configuración de Claude Desktop (
claude_desktop_config.json) y añada esto a su sección de servidores.
Para lanzamientos locales iniciados bajo una cuenta de usuario que ya está autenticada con semgrep login, la CLI de Semgrep puede ser capaz de reutilizar ese inicio de sesión. Para entornos gestionados por escritorio o compartidos, seguimos recomendando establecer SEMGREP_APP_TOKEN explícitamente:
{
"mcpServers": {
"semgrep": {
"command": "node",
"args": [
"/your_path/mcp-server-semgrep/build/index.js"
],
"env": {
"SEMGREP_APP_TOKEN": "your_semgrep_app_token",
"MCP_SERVER_SEMGREP_ALLOWED_ROOTS": "/Users/you/projects"
}
}
}
}Inicie Claude Desktop y comience a hacer preguntas sobre el análisis de código.
Si desea escanear más de un espacio de trabajo, establezca MCP_SERVER_SEMGREP_ALLOWED_ROOTS en una lista de rutas absolutas delimitada por la plataforma.
Ejemplos de uso
Escaneo de proyectos
Could you scan my source code in the /projects/my-application directory for potential security issues? That directory is already included in MCP_SERVER_SEMGREP_ALLOWED_ROOTS.Análisis de consistencia de estilo
Analyze the z-index values in the project's CSS files and identify inconsistencies and potential layer conflicts.Creación de una regla personalizada
Create a Semgrep rule that detects improper use of input sanitization functions.Filtrado de resultados
Show me only scan results related to SQL injection vulnerabilities.Identificación de patrones problemáticos
Find all "magic numbers" in the code and suggest replacing them with named constants.Creación de reglas personalizadas
Puede crear reglas personalizadas para las necesidades específicas de su proyecto. Aquí hay ejemplos de reglas que puede crear:
Regla para detectar z-indices inconsistentes:
rules:
- id: inconsistent-z-index
pattern: z-index: $Z
message: "Z-index $Z may not comply with the project's layering system"
languages: [css, scss]
severity: WARNINGRegla para detectar importaciones obsoletas:
rules:
- id: deprecated-import
pattern: import $X from 'old-library'
message: "You're using a deprecated library. Consider using 'new-library'"
languages: [javascript, typescript]
severity: WARNINGDesarrollo
Pruebas
pnpm testEstructura del proyecto
├── src/
│ └── index.ts # Main entry point and all handler implementations
├── scripts/
│ └── check-semgrep.js # Semgrep detection and installation helper
├── build/ # Compiled JavaScript (after build)
└── tests/ # Unit testsDocumentación adicional
Se puede encontrar información detallada sobre el uso de la herramienta en:
USAGE.md - Instrucciones de uso detalladas
examples/ - Ejemplos de reglas de Semgrep divertidas y prácticas - "The Hall of Code Horrors"
Licencia
Este proyecto está bajo la Licencia MIT - consulte el archivo LICENSE para obtener más detalles.
Desarrollado por
Maciej Gad - un veterinario que no podía encontrar
bashhace medio añoKlaudiusz - el ser etéreo individual, y una instancia separada de Claude Sonnet 3.5-3.7 de Anthropic viviendo en algún lugar de los bucles de la GPU en California, EE. UU.
El viaje de novato en CLI a desarrollador de herramientas MCP
🤖 Desarrollado con la ayuda definitiva de Claude Code y MCP Tools
Agradecimientos
stefanskiasan por la inspiración original
Anthropic por Claude y el protocolo MCP
Semgrep por su excelente herramienta de análisis estático
Available Tools
7 toolsanalyze_resultsC
Analyzes scan results
| Name | Required | Description | Default |
|---|---|---|---|
| results_file | Yes | Absolute path to JSON results file (must be within an allowed workspace root) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility for behavioral disclosure. It only says 'Analyzes', implying a read operation, but does not state if results are modified, returned, or stored. No information about side effects, authorization needs, or output format is given.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise but lacks structuring. It does not provide additional sections or details to aid understanding. The brevity is acceptable but not optimally informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema and the presence of sibling tools, the description is incomplete. It does not explain what the analysis returns or how it differs from compare_results or filter_results. The tool's functionality remains unclear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides a complete description for the single parameter (results_file) with context about allowed paths. Since schema coverage is 100%, the description's lack of parameter information is acceptable per guidelines. However, it adds no extra meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Analyzes scan results', which is a verb+resource, but it is vague. It does not specify what kind of analysis is performed (e.g., statistical, pattern detection, summary) and fails to distinguish from sibling tools like compare_results, filter_results, and export_results.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives. No context, prerequisites, or exclusions are provided, leaving the agent without criteria for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compare_resultsC
Compares two scan results
| Name | Required | Description | Default |
|---|---|---|---|
| old_results | Yes | Absolute path to older JSON results file | |
| new_results | Yes | Absolute path to newer JSON results file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description is minimal ('Compares two scan results') and provides no behavioral details beyond the name. With no annotations, it fails to disclose whether the tool is read-only, its side effects, return behavior, or required permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no extra words, making it concise. However, it could be restructured to front-load more critical information without increasing length significantly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema and only two string parameters, the description does not explain what the comparison produces (e.g., diff output, boolean, list of changes). This leaves the agent unsure of the return value and behavior, making it incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters are described in the input schema ('Absolute path to older JSON results file' and 'Absolute path to newer JSON results file'), achieving 100% schema coverage. The description adds no additional meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Compares two scan results' uses a verb ('compares') and resource ('scan results'), clearly indicating the tool's function. It is distinct from siblings like 'analyze_results' and 'filter_results', but lacks specificity on what the comparison entails (e.g., differences, similarities).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as 'analyze_results' or 'filter_results'. There is no mention of prerequisites, when-not-to-use, or explicit context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_ruleC
Creates a new Semgrep rule
| Name | Required | Description | Default |
|---|---|---|---|
| output_path | Yes | Absolute path for output rule file | |
| pattern | Yes | Search pattern for the rule | |
| language | Yes | Target language for the rule | |
| message | Yes | Message to display when rule matches | |
| severity | No | Rule severity (ERROR, WARNING, INFO) | WARNING |
| id | No | Rule identifier | custom_rule |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only states 'Creates a new Semgrep rule' with no information about side effects (e.g., overwriting existing files), permissions, or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise but lacks structure. It front-loads the action but provides no additional detail, making it barely adequate.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool creates a file (output_path required) and has no output schema, the description should explain return behavior (e.g., success indication) or file naming. It does not, leaving significant gaps for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 100% coverage with clear parameter descriptions. The tool description adds no additional meaning beyond the schema, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Creates' and resource 'a new Semgrep rule', making the core action clear. It naturally distinguishes from siblings which focus on analysis, comparison, and listing, not creation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description does not indicate prerequisites (e.g., rule syntax knowledge) or situations where other tools might be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
export_resultsC
Exports scan results in various formats
| Name | Required | Description | Default |
|---|---|---|---|
| results_file | Yes | Absolute path to JSON results file | |
| output_file | Yes | Absolute path to output file | |
| format | No | Output format (json, sarif, text) | text |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It fails to mention whether the tool overwrites existing files, requires network access, or produces any side effects. The agent cannot infer safety or error conditions from the description alone.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise but lacks structure. It does not front-load critical information like required parameters or output behavior. The brevity is acceptable but not optimal for usability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description should indicate what the tool returns (e.g., success message, file path). It also does not mention error handling or performance implications. The tool is simple, but the description remains incomplete for fully autonomous invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 3 parameters are described in the schema with high coverage (100%). The description adds no extra context beyond 'exports scan results in various formats'—it does not elaborate on parameter constraints like valid file paths or format specifics. Baseline 3 is appropriate since schema does the work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Exports scan results in various formats' clearly indicates the action (export) and resource (scan results) and mentions format variability. However, it does not differentiate from sibling tools like analyze_results or compare_results, which might also output results. The description could be more specific about the exact nature of the export.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, such as analyze_results or filter_results. There are no mentions of prerequisites or context in which export is appropriate. The agent is left without decision support.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
filter_resultsC
Filters scan results by various criteria
| Name | Required | Description | Default |
|---|---|---|---|
| results_file | Yes | Absolute path to JSON results file | |
| severity | No | Filter by severity (ERROR, WARNING, INFO) | |
| rule_id | No | Filter by rule ID | |
| path_pattern | No | Filter by file path pattern (regex) | |
| language | No | Filter by programming language | |
| message_pattern | No | Filter by message content (regex) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the full burden. It does not disclose whether the tool modifies the original file, requires authentication, or has side effects. The filtering behavior (e.g., AND vs OR logic) is not explained.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very short single sentence, efficient but lacking critical details. It is concise but not optimally informative for a 6-parameter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 6 parameters, no output schema, and no annotations, the description is incomplete. It does not explain return format, behavior when no matches, or how it differs from sibling tools like export_results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with parameter descriptions, so the description adds minimal value beyond the schema. It does not clarify how multiple filters interact, which leaves ambiguity for the agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states it filters scan results, which is clear but lacks specificity about the resource (e.g., scan results file) and does not differentiate from sibling tools like analyze_results or compare_results.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., analyze_results for aggregation, compare_results for comparison). No when-not-to-use or prerequisites mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_rulesB
Lists available Semgrep rules
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | Programming language for rules (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description lacks any behavioral details such as authentication needs, rate limits, or whether it returns full rule details or just names.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, concise and front-loaded with essential information. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and one optional parameter, the description provides minimal context. It doesn't clarify what information is returned (e.g., rule names only or full definitions).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description adds no extra meaning beyond the schema's parameter description. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'lists' and resource 'Semgrep rules', distinguishing it from siblings like 'create_rule' and 'scan_directory'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like 'filter_results' or 'analyze_results'. Does not specify when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_directoryB
Performs a Semgrep scan on a directory
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the directory to scan (must be within an allowed workspace root) | |
| config | No | Semgrep configuration (e.g. "auto" or absolute path to rule file) | auto |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only states the action without disclosing side effects, permissions, or output behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence is concise but lacks structure or front-loading of key details. Could be expanded to include usage context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and no annotations; description does not explain return values, side effects, or prerequisites, making it incomplete for a scan tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%; both 'path' and 'config' are described in the schema. Description adds no extra meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb+resource: 'Performs a Semgrep scan on a directory' distinguishes from siblings like analyze_results or list_rules.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives (e.g., analyze_results) or any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
- First observed
analyze_results - First observed
compare_results - First observed
create_rule - First observed
export_results - First observed
filter_results - First observed
list_rules - First observed
scan_directory
TDQS
Scored across 7 tools
Each tool targets a distinct aspect of Semgrep workflow: scanning, rule management, result analysis, filtering, export, and comparison. No overlapping purposes that would confuse an agent.
All tools follow the consistent verb_noun pattern (scan_directory, list_rules, create_rule, etc.), making the API predictable and easy to navigate.
Seven tools is a well-scoped set for a Semgrep server, covering core operations without bloat or excessive granularity.
The surface covers scanning, rule listing/creation, and result handling (analyze, filter, export, compare). Missing update/delete for rules and detailed rule inspection, but core workflows are complete.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
A Model Context Protocol server for Wix AI tools
The OpenZeppelin Solidity Contracts MCP server integrates OpenZeppelin's security and style rules into AI-driven development workflows, enabling AI assistants to generate safe, correct, and production-ready smart contracts. It automatically validates generated code against OpenZeppelin standards (including imports, modifiers, naming conventions, and security checks) and supports various contract types including ERC-20, ERC-721, ERC-1155, Stablecoins, RWA, Governor, and Account contracts through prompt-driven workflows.
Related MCP Servers
AlicenseBqualityFmaintenanceAn MCP server that provides a comprehensive interface to Semgrep, enabling users to scan code for security vulnerabilities, create custom rules, and analyze scan results through the Model Context Protocol.6708 PyPI687MIT- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that connects AI assistants like Claude to AWS security services, allowing them to autonomously query, inspect, and analyze AWS infrastructure for security issues and misconfigurations.84Apache 2.0

CodeAlive MCPofficial
AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.90MIT- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that analyzes application codebases with real-time file watching, providing AI assistants like Claude with deep insights into project structure, code patterns, and architecture.MIT