qualys-pci-mcp
Provides tools to query the Qualys PCI Merchant API, enabling listing in-scope assets, checking per-host PCI compliance status, retrieving vulnerability detections, and managing scan history and reports.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@qualys-pci-mcp Which hosts are failing PCI right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
qualys-pci-mcp
A read-only MCP server for the Qualys PCI Merchant API. It lets an LLM assistant answer questions about your PCI compliance posture, so that weekly compliance chores stop being a manual trawl through the Qualys console.
Description
This project exposes the PCI Merchant API's read endpoints as MCP tools, so you can ask questions in plain language instead:
"Which hosts are failing PCI right now?"
"List the confirmed-high findings that aren't already accepted false positives."
Related MCP server: Qualys MCP Server
AI Disclosure
This project is very much vibe-coded in anger, to solve particular needs. As always, inspect the source code.
Requirements
Python 3.11+
A Qualys PCI merchant account with API access
Installation
Not published to PyPI yet, so install from a clone:
git clone https://github.com/RobotDisco/qualys-pci-mcp && cd qualys-pci-mcp
uv tool install .Or run it straight from the checkout without installing:
uv sync && uv run qualys-pci-mcpThen register it with your MCP client. For Claude Desktop on MacOS, place it in
~/Library/Application Support/Claude/claude_desktop_config.json.
{
"mcpServers": {
"qualys-pci": {
"command": "/Users/you/.local/bin/qualys-pci-mcp",
"env": {
"QUALYS_PCI_USERNAME": "your-pci-username",
"QUALYS_PCI_PASSWORD": "your-pci-password"
}
}
}
}Configuration
Variable | Required | Default |
| yes | — |
| yes | — |
| no |
|
| no |
|
Missing or partial credentials fail at startup, not mid-request — so you find out when you launch, not halfway through a compliance report.
Usage
As an MCP server
Once registered, ask your assistant directly:
Which hosts are currently failing PCI?
Tools
Tool | What it returns |
| Declared in-scope IPs, DNS hostnames, and virtual hosts |
| Per-host PCI Pass/Fail — the main way to iterate hostnames |
| Vulnerability detections, compact rows |
| One detection in full |
| Scan history and per-scan metadata |
| Saves a scan's PDF report; returns the path. Usually 404s — reports must be generated in the Qualys console first, and generation is a write operation this server does not perform |
Support
Open an issue on the repository. When reporting an API problem, please include the endpoint, the parameters you used, and the HTTP status — never your credentials, and note that Qualys error bodies can echo request parameters.
Contributing
Contributions welcome. Before opening a PR:
Read
CLAUDE.md. Its invariants are not style preferences — two of them (never retry a 401, never write to stdout) prevent a locked audit account and a silently corrupted MCP stream respectively.Read the relevant ADR. If your change contradicts one, that's fine, but it needs a superseding ADR rather than an edit to the existing one.
just checkmust pass — lint, formatting,mypy --strict, and tests. CI runs the same recipe.justrecipes are listed withjust; see thejustfileif you would rather run the underlying commands directly.Never add an endpoint path that hasn't been verified against live documentation. Guessed paths are the single most likely source of confidently-broken code in this codebase.
docs/reference/pci-api.mdrecords which paths are verified, which are documentation-only, and which documented details turned out to be wrong.
Acknowledgements
The API reference was reconstructed from Qualys's published documentation at
docs.qualys.com/en/pci/api/. Qualys is a trademark of Qualys, Inc.; this project is unaffiliated.
License
Chosen over MIT for its explicit patent grant and contributor terms, which matter for a tool that wraps a commercial vendor's API, and over GPLv3 because MCP's process boundary means copyleft could not reach the integrations it would most plausibly be intended to govern.
Available Tools
7 toolspci_compliance_summaryARead-only
Per-host PCI Pass/Fail status. The primary way to iterate hostnames.
Args: offset: 1-based record offset. 0 is invalid. limit: Rows per page, 1-1000. dns: Filter to a single hostname. compliance_status: Filter by "Pass" or "Fail". fetch_all: Walk every page rather than returning one.
There is deliberately no ip filter: Qualys ignores the documented spelling
and no working one has been confirmed, so an ip argument would appear to
narrow the results while returning every row.
Returns total_count so growth in scope is always visible.
Inputs: dns, limit, offset, fetch_all, +1 more. Returns: object
pci_download_scan_reportARead-only
Download a scan's report PDF and return the path it was saved to.
Args:
scan_id: The scan's scan_id from pci_list_scans.
PDF is the only format Qualys offers here. The bytes are written to disk and only a path is returned -- a PDF is not usable as tool output.
A 404 is the normal case, not a failure. Reports must be generated in the Qualys console first, and generation is a write operation this server does not perform. A 404 means only "no report has been generated for this scan yet". It does not mean the scan is missing, and it is not a compliance finding -- do not report it as one.
Inputs: scan_id (required). Returns: object
pci_get_scanARead-only
Detail for one scan.
Args:
scan_id: The scan's scan_id from pci_list_scans.
active_hosts is an aggregate count. The API exposes no per-host
alive/dead breakdown, so none is reported.
Inputs: scan_id (required). Returns: object
pci_get_vulnARead-only
Full detail for one vulnerability finding, including prose fields.
Args:
detection_id: The finding's id from pci_list_vulns -- not its qid.
Inputs: detection_id (required). Returns: object
pci_list_assetsARead-only
List declared in-scope PCI assets.
Args: asset_type: ALL, IP, DNS, or VIRTUALHOST.
This is declared scope -- configuration, not observation. It says nothing about whether a host responded to a scan.
Inputs: asset_type. Returns: object
pci_list_scansARead-only
List PCI scans, newest first.
Args: offset: 1-based record offset. limit: Rows per page, 1-1000.
Inputs: limit, offset. Returns: object
pci_list_vulnsARead-only
List vulnerability findings as compact rows.
Args: offset: 1-based record offset. limit: Rows per page, 1-1000. ip: Filter by IP, CIDR, or range. dns: Filter by hostname. qid: Filter by Qualys ID. title: Keyword search on the finding title. severity: Any of CONFIRMED_HIGH, CONFIRMED_MED, CONFIRMED_LOW, POTENTIAL_HIGH, POTENTIAL_MED, POTENTIAL_LOW. false_positive: Any of Requested, Rejected, Expired. pci_fail_vulns: True to return only findings that fail PCI. fetch_all: Walk every page rather than returning one.
Prose fields are deliberately absent; call pci_get_vuln for one finding's threat, impact, and solution text.
Inputs: ip, dns, qid, limit, +6 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct resource and action: assets, compliance summary, vulnerabilities (list/detail), scans (list/detail), and report download. No two tools overlap in purpose, and the descriptions clarify any potential confusion between list and get variants.
All tools follow a consistent 'pci_<verb>_<noun>' pattern with clear verbs: list, get, download. Plural nouns for list operations and singular for get operations are conventional and predictable.
Seven tools is well within the typical 3-15 range and each tool addresses a necessary aspect of the PCI compliance workflow: asset scope, compliance status, vulnerability findings, scan management, and report retrieval. No tool feels redundant or missing.
The tool set covers the primary read-only workflows for Qualys PCI compliance: listing assets, viewing compliance status, enumerating and detailing vulnerabilities, listing and detailing scans, and downloading scan reports. Minor gaps exist, such as no ability to initiate scans or generate reports in Qualys, but the server explicitly notes these are write operations outside its scope.
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Hosted MCP server exposing US hospital procedure cost data to AI assistants
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA remote MCP server that exposes mock application security testing data (applications, scans, issues) for LLM clients to query security posture using natural language.-
- AlicenseNot gradedqualityDmaintenanceMCP server enabling AI assistants to interact with the Qualys vulnerability management platform. Supports investigation, risk assessment, compliance, remediation, security overview, and report management.22 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for full Qualys portal management — expose VMDR, Policy Compliance, WAS, Cloud Agent, Container Security, TotalCloud, Patch Management, CSAM/GAV, EASM and administration to any MCP‑capable client.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for Tenable Vulnerability Management and the Tenable One platform, enabling LLMs to query assets, vulnerabilities, scans, exposure metrics, attack paths, and more via natural language.2MIT