Skip to main content
Glama
pci-dss-mcp

pci-dss-mcp

by shyshlakov

pci-dss-mcp

Go決済サービスコードベース向けの静的解析MCPサーバー。Go決済サービスのコードベースで検出されたすべてのPCI DSS v4.0.1違反は、コードがリリースされる前に特定の要件番号にマッピングされます。

Go Report Card License: MIT OpenSSF Scorecard MCP Registry pci-dss-mcp MCP server


機能

pci-dss-mcpは、Go決済サービスのコードベースに対して12個のスキャナー、オーケストレーター、およびAIトリアージエンジンを実行するstdio MCPサーバーです。各検出結果には、特定のPCI DSS v4.0.1の項目にマッピングされた requirement_id が含まれています。ルールと要件の標準的な対応表については docs/requirement-mapping.md を、実際の出力例については testdata/vulnerable-payment-service/EXPECTED-FINDINGS.md を参照してください。

pci-dss-mcpで現在検出可能なもの

  • ログ / エラー / パニックシンクへのHTTPフレームワーク入力フロー。 Tier 1フレームワーク(gin, chi, gorilla/mux, net/http (Go 1.22+), echo v4, fiber v2)およびTier 1ロガー(log/slog, logrus, zap, zerolog, logr, klog, hclog)はv0.7で提供されます。Tier 2(kratos, apex/log, charmbracelet/log)はv0.8で対応予定です。Tier 3(fasthttp, beego, iris, httprouter, プロジェクト内部)は、リリース後にPhase 25 YAMLを介してユーザーが設定可能です。詳細は docs/http_input_taint.md を参照してください。

pci-dss-mcpが「ではない」もの

  • 広範なSASTの代替ではありません。 OWASP Top-10や言語非依存の脆弱性については、Semgrep、CodeQL、またはgosecを使用してください。

  • LLMベースのコードレビューの代替ではありません。 pci-dss-mcpは決済特有の問題をPCI DSS要件IDにマッピングします。LLMエージェントは推論を通じて広範なバグを検出します。これら2つのレイヤーは相互に補完します。

  • Go非依存ではありません。 Go特有のASTパターンと汚染フロー追跡こそが、この精度の高さの理由です。

  • QSAの代替ではありません。 静的解析はPCI DSS v4.0.1要件の約6%をカバーします。残りの部分については、認定セキュリティ評価者(QSA)による承認が必要です。

Related MCP server: secureaudit-mcp

インストール

Goインストール(推奨)

Go 1.25+ が必要です:

go install github.com/shyshlakov/pci-dss-mcp@latest

バイナリは $(go env GOPATH)/bin/pci-dss-mcp に配置されます。PATHの解決、macOSの codesign 起源修正、cosign検証、およびMCPクライアントのJSON設定については docs/install-from-source.md を参照してください。

Docker(代替)

docker pull ghcr.io/shyshlakov/pci-dss-mcp:v0.6.2

CIパイプライン、ローカルでGoを開発しないQSA監査人、またはホストにGoツールチェーンがない環境で役立ちます。

MCPレジストリ

registry.modelcontextprotocol.io に io.github.shyshlakov/pci-dss-mcp としてリストされています。タグが作成されるたびに自動公開されます。

使用方法

MCPクライアントの設定(Claude Desktopの claude_desktop_config.json、Cursorの .cursor/mcp.json、またはClaude Codeの claude mcp add)に追加します:

{
  "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= と dst= は同じ絶対パスをミラーリングするため、コンテナはホストと同じパスでコードを参照します。プロンプトは変換なしで通常のホストパスを渡します。go install 版およびクライアントごとの例については docs/usage.md を参照してください。

MCPクライアントに貼り付ける2つのプロンプト:

  1. Run pci-dss-mcp triage on /Users/you/payments-service. Use min_severity=MEDIUM and group findings by PCI DSS requirement.

  2. Generate a PCI DSS compliance report for /Users/you/payments-service in JSON format. Show requirement-level pass/fail status and severity counts.

ツール

ツール

目的

ドキュメント

triage_findings

すべてのスキャナー + AI分類 + ファイル:行のコンテキストを一度に実行

docs/triage_findings.md

generate_compliance_report

要件ごとの合格/不合格レポート(全スキャナーのオーケストレーター)

docs/generate_compliance_report.md

scan_pan_data

PAN/SADの保存とログ記録 (3.3.1, 3.4.1, 3.5.1)

docs/scan_pan_data.md

check_encryption

弱いハッシュ化、ハードコードされたキー、プレーンHTTP (4.2.1, 6.2.4)

docs/check_encryption.md

check_tls_config

安全でないTLS設定 (4.2.1)

docs/check_tls_config.md

check_secrets_in_configs

設定ファイル内の認証情報 (8.6.2)

docs/check_secrets_in_configs.md

check_error_handling

機密コンテキストを漏洩するエラーレスポンス (6.2.4)

docs/check_error_handling.md

check_auth_strength

ハードコードされたパスワード、弱いポリシー、MFAの欠如、Webhook署名 (8.3.1, 8.3.6, 8.4.2, 8.6.2)

docs/check_auth_strength.md

audit_log_coverage

決済フローにおける監査ログの欠如 (10.2.1)

docs/audit_log_coverage.md

check_data_retention

TTLの欠如、機密データの保存、ゼロ化の欠如 (3.2.1, 3.3.1)

docs/check_data_retention.md

check_payment_page_scripts

決済ページにおけるCSP/SRI/nonceの欠如 (6.4.3, 11.6.1)

docs/check_payment_page_scripts.md

check_dependencies

OSVを介した脆弱なGo依存関係 (6.3.3); govulncheckスタイルのプライバシー: モジュール名はOSV.devに送信されません。詳細は docs/check_dependencies.md を参照。update_vulnerability_db もカバーします。

docs/check_dependencies.md

generate_sbom

go.mod/go.sum からのCycloneDX 1.6 SBOM (6.3.2)

docs/generate_sbom.md

explain_requirement

IDによるPCI DSS v4.0.1要件の検索

docs/explain_requirement.md

すべてのツールは型定義された OutputSchema を宣言します。カタログインデックスと移行履歴については docs/tools.md を参照してください。

ドキュメント

ステータス

活発に開発中、v1.0未満。ROADMAP.md および CHANGELOG.md を参照してください。

ライセンス

MIT。 LICENSE を参照してください。


pci-dss-mcpは静的解析ツールです。認定セキュリティ評価者(QSA)を置き換えることはできません。その出力をコンプライアンスプロセスへの入力として使用し、それ自体をコンプライアンスと見なさないでください。

Available Tools

15 tools
audit_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

    A4.6/5.0

    Scored across 15 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      An 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).
      4
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Agent-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.
      1
      8 npm
      2
      MIT