pci-dss-mcp
pci-dss-mcp
Servidor MCP de análisis estático para bases de código de servicios de pago en Go. Cada violación detectada de PCI DSS v4.0.1 en una base de código de servicio de pago en Go se asigna al número de requisito específico antes de que el código se despliegue.
Qué hace
pci-dss-mcp es un servidor MCP stdio que ejecuta 12 escáneres, un orquestador y un motor de triaje de IA sobre una base de código de servicio de pago en Go. Cada hallazgo lleva un requirement_id asignado a un elemento específico de PCI DSS v4.0.1; consulte docs/requirement-mapping.md para ver la tabla canónica de reglas a requisitos y testdata/vulnerable-payment-service/EXPECTED-FINDINGS.md para ver resultados reales de referencia.
Qué detecta pci-dss-mcp actualmente
Flujo de entrada del framework HTTP hacia sumideros de registro / error / pánico. Los frameworks de Nivel 1 (gin, chi, gorilla/mux, net/http (Go 1.22+), echo v4, fiber v2) y los registradores de Nivel 1 (log/slog, logrus, zap, zerolog, logr, klog, hclog) se incluyen en la v0.7. El Nivel 2 (kratos, apex/log, charmbracelet/log) llega en la v0.8. El Nivel 3 (fasthttp, beego, iris, httprouter, interno del proyecto) es configurable por el usuario mediante YAML de Fase 25 una vez lanzado. Consulte docs/http_input_taint.md.
Qué NO es pci-dss-mcp
No es un reemplazo para SAST amplio. Utilice Semgrep, CodeQL o gosec para el OWASP Top-10 y vulnerabilidades agnósticas al lenguaje.
No es un reemplazo para la revisión de código basada en LLM. pci-dss-mcp asigna problemas específicos de pago a IDs de requisitos de PCI DSS; los agentes LLM detectan errores generales mediante razonamiento. Ambas capas se complementan.
No es agnóstico a Go. Los patrones AST específicos de Go y el rastreo de flujo de contaminación son lo que hace posible la precisión.
No es un reemplazo para un QSA. El análisis estático cubre aproximadamente el 6% de los requisitos de PCI DSS v4.0.1. Un Evaluador de Seguridad Calificado (QSA) debe aprobar el resto.
Related MCP server: secureaudit-mcp
Instalación
Instalación en Go (principal)
Requiere Go 1.25+:
go install github.com/shyshlakov/pci-dss-mcp@latestEl binario se ubica en $(go env GOPATH)/bin/pci-dss-mcp. Consulte docs/install-from-source.md para la resolución de PATH, la corrección de procedencia codesign en macOS, la verificación con cosign y la configuración JSON del cliente MCP.
Docker (alternativa)
docker pull ghcr.io/shyshlakov/pci-dss-mcp:v0.6.2Útil para pipelines de CI, auditores QSA que no desarrollan en Go localmente o cualquier entorno sin una cadena de herramientas Go en el host.
Registro MCP
Listado como io.github.shyshlakov/pci-dss-mcp en registry.modelcontextprotocol.io. Publicado automáticamente en cada etiqueta.
Uso
Agréguelo a la configuración de su cliente MCP (Claude Desktop claude_desktop_config.json, Cursor .cursor/mcp.json o claude mcp add para Claude Code):
{
"mcpServers": {
"pci-dss-mcp": {
"command": "docker",
"args": ["run", "-i", "--rm",
"--mount", "type=bind,src=/Users/you/go/src,dst=/Users/you/go/src,readonly",
"ghcr.io/shyshlakov/pci-dss-mcp:v0.6.2"]
}
}
}src= y dst= reflejan la misma ruta absoluta para que el contenedor vea su código en la misma ruta que utiliza su host; los prompts pasan la ruta normal del host sin traducción. Para la variante go install y ejemplos por cliente, consulte docs/usage.md.
Dos prompts para pegar en su cliente MCP:
Run pci-dss-mcp triage on /Users/you/payments-service. Use min_severity=MEDIUM and group findings by PCI DSS requirement.Generate a PCI DSS compliance report for /Users/you/payments-service in JSON format. Show requirement-level pass/fail status and severity counts.
Herramientas
Herramienta | Propósito | Docs |
| Todos los escáneres + clasificación por IA + contexto archivo:línea en una sola llamada | |
| Informe crudo de cumplimiento/incumplimiento de requisitos (orquestador sobre todos los escáneres) | |
| Almacenamiento y registro de PAN/SAD (3.3.1, 3.4.1, 3.5.1) | |
| Hashing débil, claves codificadas, HTTP plano (4.2.1, 6.2.4) | |
| Configuraciones TLS inseguras (4.2.1) | |
| Credenciales en archivos de configuración (8.6.2) | |
| Respuestas de error que filtran contexto sensible (6.2.4) | |
| Contraseñas codificadas, política débil, falta de MFA, firmas de webhook (8.3.1, 8.3.6, 8.4.2, 8.6.2) | |
| Falta de registros de auditoría en flujos de pago (10.2.1) | |
| Falta de TTL, almacenamiento sensible, falta de borrado (3.2.1, 3.3.1) | |
| Falta de CSP/SRI/nonce en páginas de pago (6.4.3, 11.6.1) | |
| Dependencias de Go vulnerables vía OSV (6.3.3); privacidad estilo govulncheck: no se envían nombres de módulos a OSV.dev. Consulte docs/check_dependencies.md. También cubre | |
| SBOM CycloneDX 1.6 desde go.mod/go.sum (6.3.2) | |
| Buscar un requisito de PCI DSS v4.0.1 por ID |
Todas las herramientas declaran un OutputSchema tipado. Consulte docs/tools.md para el índice del catálogo y el historial de migración.
Documentación
docs/usage.md, configuración del cliente, plantillas de prompt, supresión de hallazgos
docs/severity.md, modelo de severidad y mapeo de regla a severidad
docs/taint.md, valores predeterminados y toggles de análisis de contaminación
docs/scoping.md, exclusión de paquetes y alcance CDE
docs/comparison.md, pci-dss-mcp vs Semgrep / CodeQL / gosec / Snyk Code
docs/ci-cd.md, integración con GitHub Actions y GitLab CI
docs/pci-coverage.md, matriz de cobertura de requisitos de PCI DSS v4.0.1
docs/install-from-source.md, compilación desde fuente, verificación con cosign, recarga
docs/requirement-mapping.md, tabla canónica de rule_id a requirement_id
CONTRIBUTING.md, configuración de desarrollo, objetivos de fuzzing
ROADMAP.md, características planificadas
CHANGELOG.md, historial de versiones
Estado
Desarrollo activo, pre v1.0. Consulte ROADMAP.md y CHANGELOG.md.
Licencia
MIT, consulte LICENSE.
pci-dss-mcp es una herramienta de análisis estático. No puede reemplazar a un Evaluador de Seguridad Calificado. Utilice su salida como entrada para su proceso de cumplimiento, no como el cumplimiento en sí mismo.
Available Tools
15 toolsaudit_log_coverageA
Scan Go source files for payment handlers missing structured audit logging (PCI DSS 10.2.1). Detects: missing logging, unstructured-only logging (fmt/log), and reports handlers with structured logging. Framework-aware: supports net/http, gin, echo handler signatures. Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns / min_severity / rule_filter for a filtered flat response.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +4 more. Returns: object
check_auth_strengthA
Scan Go source files for weak authentication: hardcoded passwords (PCI DSS 8.3.1), password policy with minimum length below 12 (PCI DSS 8.3.6), and payment routes missing MFA middleware (PCI DSS 8.4.2). Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns / min_severity / rule_filter for a filtered flat response. Maps findings to PCI DSS 8.3.1, 8.3.6, 8.4.2.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +4 more. Returns: object
check_data_retentionA
Scan Go source and config files for unsafe data retention: Redis/DB storage of CVV/PAN without TTL (PCI DSS 3.2.1), config files missing TTL on sensitive keys (PCI DSS 3.3.1), and incorrect memory zeroing timing after authorization. Scans .go, .yaml, .json, .toml files. Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns / min_severity / rule_filter for a filtered flat response. Maps findings to PCI DSS 3.2.1, 3.3.1.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +4 more. Returns: object
check_dependenciesA
Scan go.mod dependencies for known vulnerabilities (PCI DSS 6.3.3). Bulk-downloads the public OSV Go vulnerability snapshot and intersects locally against go.mod, matching the govulncheck privacy model. No module names are sent to OSV.dev. Cache TTL: 24h fresh, 24h-7d revalidate via ETag, >7d force-refresh. Run update_vulnerability_db first to bootstrap the cache for air-gapped environments. Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 1 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use min_severity / rule_filter / positive limit for a filtered flat response. Maps findings to PCI DSS 6.3.3.
Inputs: path (required), mode, cursor, limit, +2 more. Returns: object
check_encryptionA
Scan Go source files for encryption violations: weak hash algorithms (md5/sha1) with context scoring, hardcoded encryption keys/IVs, and plain HTTP URLs. Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns / min_severity / rule_filter for a filtered flat response. Maps findings to PCI DSS 6.2.4, 4.2.1.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +4 more. Returns: object
check_error_handlingA
Scan Go source files for payment handler error disclosure: detects err.Error() in http.Error, fmt.Fprintf with error variables, w.Write with error bytes, and json.Encode of errors. Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns / min_severity / rule_filter for a filtered flat response. Maps findings to PCI DSS 6.2.4.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +4 more. Returns: object
check_payment_page_scriptsA
Scan Go source files and HTML templates for payment page script security violations (PCI DSS 6.4.3, 11.6.1). Detects: missing Content-Security-Policy headers in Go payment handlers, unsafe-inline/unsafe-eval in CSP, external scripts without SRI (integrity attribute) in HTML templates, inline scripts without nonce attribute. Framework-aware: supports net/http, gin, echo handler signatures. Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns / min_severity / rule_filter for a filtered flat response. Maps findings to PCI DSS 6.4.3, 11.6.1.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +4 more. Returns: object
check_secrets_in_configsA
Scan configuration files (.env, .yaml, .json, .toml) for hardcoded secrets: API keys, passwords, tokens, and connection strings with embedded credentials. Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns / min_severity / rule_filter for a filtered flat response. Maps findings to PCI DSS 8.6.2.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +4 more. Returns: object
check_tls_configA
Scan Go source files for TLS configuration violations: InsecureSkipVerify, weak MinVersion (below TLS 1.2), missing MinVersion, and prohibited cipher suites (RC4, 3DES, NULL). Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns / min_severity / rule_filter for a filtered flat response. Maps findings to PCI DSS 4.2.1.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +4 more. Returns: object
explain_requirementA
Look up a PCI DSS v4.0.1 requirement by ID. Returns title, description, and testing procedure.
Inputs: requirement_id (required). Returns: requirement
generate_compliance_reportA
Raw PCI DSS v4.0.1 compliance report without AI triage — intended for CI gates, audit artifacts, and requirement-level pass/fail lists. For interactive "scan this project" prompts call triage_findings instead. Default unfiltered call returns a compact summary (metadata, totals, requirement_statuses, top 20 findings per severity, cursor for follow-up). Supply min_severity / rule_filter / limit to get a paged flat list (60 per page with cursor), or cursor= to resume a prior session (10-minute TTL). min_severity / rule_filter drop the response to shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Taint analysis is ON by default; set include_taint=false for fast dev iteration.
Inputs: path (required), dep_scan_mode, include_tests, include_taint, +4 more. Returns: object
generate_sbomA
Generate a CycloneDX v1.6 SBOM for a Go project. Default behavior: writes sbom.json (or sbom.xml when format=xml) next to the scanned go.mod and returns metadata only (output_path, size_bytes, component_count, unknown_licenses). Override the destination with output_path (must be absolute). Pass inline=true to return the serialized SBOM in the MCP response instead (capped at 64 KB; returns SBOM_TOO_LARGE above that). Parses go.mod + go.sum offline against the local GOMODCACHE; cache-miss modules surface as UNKNOWN-LICENSE. Satisfies PCI DSS 6.3.2 (software inventory, mandatory since March 2025).
Inputs: path (required), format, output_path, inline, +2 more. Returns: mode, bom_format, spec_version, component_count, +9 more
scan_pan_dataA
Default: returns response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 3 per severity findings - plus a pagination.next_cursor for drill-down. Prefer this for mixed queries; min_severity / rule_filter drop to response_shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list. Use include_tests / exclude_patterns for a filtered flat response. Maps findings to PCI DSS 3.3.1, 3.4.1, 3.5.1.
Inputs: path (required), exclude_patterns, include_tests, include_untracked, +5 more. Returns: object
triage_findingsA
Run all PCI DSS v4.0.1 scanners + AI-assisted prioritization + file:line enrichment on a Go project in a single call. Default: response_shape "summary" with by_severity counts, a capped by_rule histogram (top 10 + more_rules), and top 1 per severity enriched finding, plus pagination.next_cursor for drill-down. min_severity / rule_filter drop the response to shape "flat" but still carry summary.by_severity + summary.by_rule for full-scan context. Follow the cursor for the full paginated list.
Inputs: path (required), dep_scan_mode, include_tests, include_taint, +4 more. Returns: object
update_vulnerability_dbA
Download fresh OSV Go vulnerability snapshot to local cache for offline scanning. Downloads from gs://osv-vulnerabilities/Go/all.zip (~7.5MB). This is the ONLY tool that makes network requests. Cache stored at PCI_MCP_CACHE_DIR or ~/.pci-dss-mcp/vuln-cache/ by default.
Inputs: output_path. Returns: cache_path, vuln_count, download_size_bytes, previous_cache_date, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct security check or utility: audit log coverage, authentication strength, data retention, dependencies, encryption, error handling, payment page scripts, secrets, TLS, requirement lookup, compliance report, SBOM, PAN data scan, triage, and vulnerability DB update. No two tools have overlapping purposes.
Tool names follow a clear verb_noun pattern (e.g., check_*, generate_*, explain_*, update_*, scan_*, triage_). All use consistent snake_case, and the verb clearly indicates the action. The slight deviation of 'audit_log_coverage' is minor and still descriptive.
15 tools is well-scoped for a PCI DSS compliance server. It covers a wide range of checks (authentication, encryption, secrets, etc.) plus utilities (SBOM, report, requirement lookup), without being excessive or too few.
The tool set comprehensively covers PCI DSS requirements relevant to Go source code and configuration, including authentication (8.3), data retention (3.2, 3.3), encryption (4.2, 6.2), error handling (6.2), TLS (4.2), secrets (8.6), dependencies (6.3), and software inventory (6.3). The triage and report tools tie everything together.
Maintenance
Related MCP Connectors
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
IaC, CI and dependency security review for coding agents: local scan CLI plus hosted OAuth MCP.
Static MCP server scan: injection, secrets, tool poisoning. SARIF + rules catalog.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceGo-based SBOM, vulnerability, and secret scanner with MCP support.3Apache 2.0
- AlicenseAqualityCmaintenanceAn AppSec-focused MCP server that performs static analysis scans on C/C++ source code for memory-safety vulnerabilities and parses compiled PE/ELF binary headers locally to audit active defensive compiler mitigations (ASLR, DEP/NX, PIE).41MIT
- AlicenseAqualityDmaintenanceAgent-native "safe to ship?" security gate for AI-generated code. Uses real parsers and inter-rocedural taint analysis (JS/TS, Python, Go) to flag the classes AI coding agents get wrong — secrets, SQL injection, SS, SSRF, path traversal, command injection, weak JWT/CORS — and ranks findings by confidence. Exposes a scan tool over MCP.18 npm2MIT
- AlicenseAqualityDmaintenanceA production-grade security auditing MCP server that wraps semgrep (SAST) and gitleaks (secret detection) to enable one-click code security scanning via MCP stdio protocol.1MIT