Qualys Mcp

io.github.rijul170由 GitHub 账号 rijul170 发布v0.1.0更新于 Oct 24, 2026

Full Qualys portal management over MCP: VMDR, PC, WAS, Cloud Agent, Container Security & more

概览

AI 生成的概览

本地 MCP 服务器,将 Qualys 门户(VMDR、策略合规、WAS、云代理、容器安全等)以约 400 个工具暴露给 MCP 客户端。

可以做什么
  • 列出主机、主机检测结果与知识库条目
  • 启动扫描并查询漏洞、补丁与合规数据
  • 检索 WAS 发现项并查看容器镜像漏洞
  • 使用云代理、TotalCloud/CloudView、EASM、FIM、EDR、PCRS 等模块
  • 管理门户,破坏性操作默认不注册
适用场景
适合希望让助手直接查询或操作自有 Qualys 订阅的场景,例如漏洞分诊、合规检查或发起扫描,无需离开聊天客户端。每个 Qualys 控制台需要一个独立进程。
运行要求
以 Python 包(qualys-mcp-full)在本地通过 stdio 运行,README 也提供本地 HTTP 传输方式。需要 Qualys API 用户名与密码以及平台/POD 代码,通过 QUALYS_USERNAME、QUALYS_PASSWORD、QUALYS_PLATFORM(或显式 URL 覆盖)提供,Windows 上也可使用 DPAPI 加密凭据文件。需要访问 Qualys API 的网络。
安装前请注意
服务器持有 Qualys API 凭据,请妥善保护环境变量或加密文件,切勿粘贴到对话中。它可发起扫描等写入操作;破坏性工具(删除、清除、停用、卸载)仅在 QUALYS_ENABLE_DESTRUCTIVE=true 时注册,且每次调用仍需确认令牌。可选 QUALYS_MCP_API_KEY 用于保护 HTTP 传输。该项目为独立社区项目,与 Qualys 公司无关联。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Qualys Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Qualys MCP

A 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 (Claude, and other MCP hosts).

[CI] [Python] [License: MIT] [MCP] [Tools]

One process per Qualys console (run as many as you have subscriptions). Built on FastMCP, with a single client that speaks all three Qualys API families, a strict read / write / destructive safety model, and credentials that never touch chat or plaintext.


Highlights

  • Broad coverage — 59 auto‑discovered feature modules spanning the whole portal: VMDR, PC, WAS, Cloud Agent, Container Security, TotalCloud/CloudView, Patch Management, CSAM/GAV, EASM, FIM, EDR, PCRS, and administration.
  • ~400 tools — list_hosts, list_host_detections, launch_scan, search_was_findings, list_knowledgebase, get_cs_image_vulnerabilities, and hundreds more, each mapped 1:1 to a documented Qualys API operation.
  • Three API regimes, one client — the classic "FO" XML API, the QPS REST API, and the JWT‑authenticated Gateway are all handled behind self._fo / self._qps / self._gateway.
  • Safety tiers are load‑bearing — every tool is annotated read‑only, write, or destructive. Destructive tools (delete / purge / deactivate) are not even registered unless you opt in per console, and still require a per‑call confirmation token.
  • Lazy auth — no network calls at import or construction; --check runs fully offline with no credentials.
  • Secrets stay secret — on Windows, credentials live only in DPAPI‑encrypted blobs; on any OS you can supply them via environment variables. Nothing is ever written to the repo.

The three API regimes

RegimeBase pathAuthPayload
Classic "FO"/api/2.0/fo/, /msp/Basic + X-Requested-With headerform → XML
QPS REST/qps/rest/BasicXML <ServiceRequest> / JSON
Gatewaygateway.<pod>.apps.qualys.comBearer JWT (from /auth)JSON

Architecture

qualys_mcp/  server.py     FastMCP server; lazy auth; --check offline validation  registry.py   auto-discovers modules/*.py  client.py     one client, three API regimes (FO / QPS / Gateway-JWT)  config.py     per-console config + platform (POD) -> URL map  common/       auth (HTTP mw), errors, logging, rate_limit, utils, xml  modules/      base.py + one file per feature module (the bulk of the surface)

Adding a capability is just dropping a file in qualys_mcp/modules/ — see docs/MODULE_BUILD_GUIDE.md.

Quick start

1. Install

bash
python -m venv .venv# Windows:      .\.venv\Scripts\pip install -e .# macOS/Linux:  ./.venv/bin/pip install -e .

2. Offline sanity check (no credentials required)

bash
python -m qualys_mcp --check

Lists every discovered module with its tool count and exits — a good first smoke test.

3. Provide credentials

You need a Qualys API user and your platform/POD code (e.g. US1, US2, EU1; find it under your console URL or Help → About).

Any OS — environment variables:

bash
export QUALYS_USERNAME='api-user'export QUALYS_PASSWORD='api-pass'export QUALYS_PLATFORM='US2'          # or set QUALYS_API_URL / QUALYS_GATEWAY_URLpython -m qualys_mcp --transport streamable-http --host 127.0.0.1 --port 8781 --console-label consulting

Windows — DPAPI‑encrypted blobs (recommended for a persistent deployment):

powershell
# Encrypt once per console; the blob is user-scoped and stored under .secrets/.\encrypt-qualys-creds.ps1 -Console consulting -Platform US2.\encrypt-qualys-creds.ps1 -Console cloud      -Platform US2
# Launch one instance per console (:8781, :8782).\start-qualys-mcp.ps1#   ...opt into destructive tools for a console only when you mean it:.\start-qualys-mcp.ps1 -EnableDestructive cloud
# Optional: keep both alive across reboots via a Scheduled Task watchdog.\register-qualys-mcp-task.ps1

See .env.example for every QUALYS_* setting.

4. Point your MCP client at it

A ready‑to‑use .mcp.json is included for Claude Code:

json
{  "mcpServers": {    "qualys-consulting": { "type": "http", "url": "http://localhost:8781/mcp" },    "qualys-cloud":      { "type": "http", "url": "http://localhost:8782/mcp" }  }}

scripts/register_mcp_clients.py shows how to register the same local‑HTTP servers into several MCP clients at once.

Safety model

  • Tools are annotated read‑only, write, or destructive.
  • Destructive tools (delete, purge, deactivate, uninstall) are not registered unless the console runs with QUALYS_ENABLE_DESTRUCTIVE=true.
  • Even when enabled, each destructive tool requires a matching confirm=<id> argument before it will act — so a destructive call can never happen by accident from a single prompt.

Read docs/SAFETY_AUDIT.md for the full tiering.

Module & tool inventory

  • 59 modules auto‑discovered from qualys_mcp/modules/.
  • ~360 tools registered by default; ~400 with QUALYS_ENABLE_DESTRUCTIVE=true (the extra ~40 are the guarded destructive tools that otherwise stay hidden).
  • Spread across the three API regimes, with a handful of modules spanning two.

The full per‑module table (registry name, API family, tool counts, one‑line description) is in docs/MODULE_INDEX.md, and a complete endpoint → tool → action breakdown is in docs/ENDPOINTS_TOOLS_ACTIONS.md.

Configuration reference

VariablePurpose
QUALYS_USERNAME / QUALYS_PASSWORDAPI user credentials
QUALYS_PLATFORMPOD code (US1…KSA1) — auto‑fills API + Gateway URLs
QUALYS_API_URL / QUALYS_GATEWAY_URLExplicit overrides for unlisted PODs
QUALYS_CONSOLE_LABELNames the console in logs and the server name
QUALYS_ENABLE_DESTRUCTIVEtrue to register the destructive tier
QUALYS_MCP_MODULESComma‑separated allowlist to scope a console to its licensed modules
QUALYS_MCP_API_KEYOptional shared secret for the HTTP transport

Development

bash
pip install -e ".[dev]"python -m qualys_mcp --check   # offline validationpytest                          # unit tests (no network)ruff check .                    # lint

Contributions welcome — see CONTRIBUTING.md.

Disclaimer

This is an independent, community project. It is not affiliated with, endorsed by, or supported by Qualys, Inc. "Qualys" and product names are trademarks of their respective owners. Use against your own subscriptions in accordance with your Qualys license and API terms. The software is provided "as is" (see LICENSE); you are responsible for what you run against your environment — especially the destructive tier.

Star history

[Star History Chart]

License

MIT © 2026 Rijul Sharma

来源:README.md,提交 edee0e1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分