Skip to content

Installation

Saeed Yari edited this page Nov 28, 2026 · 1 revision

Installation

You need git and uv. uv installs Python 3.11 or newer for you if needed. Docker is optional.

1. Get the code

git clone https://github.com/itssaeedyari/mcp-server-pci-dss-compliance-assistant.git
cd mcp-server-pci-dss-compliance-assistant
uv sync --all-extras
uv run python scripts/preflight_check.py

The preflight check confirms your Python version, the folder layout, and that Git ignores the PCI SSC files you are about to add. At this point it warns that the PDF is missing. That is expected.

Clone with git rather than downloading a ZIP: the preflight check uses git to verify the ignore rules.

2. Download the standard

PCI SSC documents are copyrighted, so every user downloads their own copy. Open the PCI SSC Document Library, accept the license agreement, and save the files into data/raw/ with these exact names:

File Required? Where to find it
PCI-DSS-v4_0_1.pdf Yes Filter "PCI DSS", type "Standard", English PDF
Prioritized-Approach-Tool-For-PCI-DSS-v4_0_1.xlsx Optional: cross-checks the extraction Type "Supporting Document", Prioritized Approach Tool v4.0.1
PCI-DSS-v4-0-to-v4-0-1-Summary-of-Changes-r1.pdf Optional: reference only Type "Standard", Summary of Changes

Rename a file if the downloaded name differs. Run uv run python scripts/preflight_check.py again: it should now report 0 failed, 0 warning(s).

3. Build your local dataset

uv run python scripts/extract_pci.py       # about 15 s: parses the Requirement 1-12 tables from the PDF
uv run python scripts/enrich_pci.py        # adds metadata, cross-checks the workbook, writes a report
uv run python scripts/validate_dataset.py  # checks the result against data/processed/schema.json

Expected output: Extracted 249 controls, then [PASS] data/processed/pci_dss_v4_0_1.json: 249 records, 0 error(s). The report in data/processed/extraction_report.md lists controls per requirement, the workbook cross-check, and any parsing warnings.

4. Optional: semantic search

uv run python scripts/build_embeddings.py  # downloads a ~90 MB model once, about 30 s

This lets natural-language questions find the right controls even when the wording differs from the standard. Without it, search still works with keyword ranking (BM25). The server never downloads anything itself; this script is the only step that does.

5. Run it

uv run pci-dss-mcp

The server speaks MCP over stdin/stdout, so in a terminal it just waits for a client (Ctrl+C to stop). Next: Connecting Clients.

Updating

  • New version of this project: git pull, then uv sync --all-extras.
  • New PDF: rerun steps 3 and 4. If search reports "search_mode": "lexical" after a rebuild, rerun build_embeddings.py.

Docker

The image contains only the code. Complete steps 1-4 first, then:

docker build -t pci-dss-mcp .
docker run -i --rm --network none --read-only --tmpfs /tmp --cap-drop ALL --security-opt no-new-privileges \
  -v "$PWD/data/processed:/app/data/processed:ro" \
  -v /path/to/your/project:/workspace:ro \
  pci-dss-mcp

The container runs as the non-root user appuser, needs no network, and reads your dataset and project from read-only mounts. Ask for audit_directory on /workspace to scan the mounted project.

Clone this wiki locally