---
name: iblai-connect-qualys
description: "Read and write Qualys VMDR data through the Qualys VM and PA API (v2.0, newer versions per endpoint) and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with Qualys VMDR data, or to set up a Qualys VMDR MCP connection on ibl.ai."
metadata:
  kind: guide
---

# Qualys VMDR connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/qualys — not part of the iblai/base repository. Checked against Qualys, Inc.'s documentation on October 20, 2026; test it against your own Qualys VMDR setup before you rely on it.

Qualys VMDR scans hosts for vulnerabilities and tracks each detection's status (New, Active, Fixed, Reopened) with a Qualys Detection Score. A subscription holds hosts, detections, scans and their results.

## Auth & conventions

- **API:** Qualys VM and PA API (v2.0, newer versions per endpoint) (REST-style (XML responses)). Calls such as /api/2.0/fo/asset/host/vm/detection/?action=list (newer versions up to 5.0), /api/2.0/fo/asset/host/?action=list and /api/2.0/fo/scan/?action=list or launch. Responses are XML.
- **Base URL:** https://{qualys_base_url}/api/2.0/fo/ (e.g. https://qualysapi.qualys.com for US Platform 1)
- **Access:** Issued by your administrator. Calls use a user account in the customer's Qualys subscription, on that subscription's platform URL; the account's permissions limit which hosts and scans it can see.
- **Auth:** HTTP basic authentication; Session login (cookie); JWT bearer token. Basic auth sends credentials over HTTPS with each call; session auth logs in once and reuses the session cookie. Every v2 call must include an X-Requested-With header.
- **Limits:** Per Qualys's API limits guide, each subscription has a concurrency and rate limit per API (Standard: 2 concurrent, 300 calls per hour); over either returns an error. Support can change the limits.
- Keep Qualys VMDR credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Host detections** — /api/2.0/fo/asset/host/vm/detection/?action=list: latest vulnerability status and QDS per host.
- **Hosts** — /api/2.0/fo/asset/host/?action=list, 1,000 hosts per page by default (truncation_limit).
- **VM scans** — /api/2.0/fo/scan/?action=list; scans from the past 30 days by default.

## Writes

- **Launch a VM scan** — POST /api/2.0/fo/scan/?action=launch; asynchronous, returns a scan reference.

## Expose it to an ibl.ai agent (MCP)

Qualys, Inc. did not publish an MCP server of its own when this skill was checked. Host a small MCP server that wraps the calls above, then register it below.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/base --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - For an API key or service credential use `auth_type=token` with `auth_scope=platform` for one key across the organization, or scope it to a single agent for one key per agent.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "List hosts with Active severity-5 detections, highest QDS first"
- "Which vulnerabilities reopened on servers this month?"
- "Summarize last week's VM scans and any that failed"
- "Draft a patch report of the top 10 QIDs by affected host count"

## Guardrails

- Vulnerability detections list exactly where an organization can be attacked. Use a least-privilege API user, keep data inside the organization and log every agent query.
- Request the narrowest Qualys VMDR scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Respect the documented limits above: page through results and back off on rate-limit responses instead of retrying in a loop.

## References

- Get started with VM and PA APIs: https://docs.qualys.com/en/vm/qweb-all-api/get_started/get_started.htm
- Host Detection List API: https://docs.qualys.com/en/vm/qweb-all-api/mergedProjects/qapi-assets/host_lists/host_detection.htm
- Qualys API limits (PDF): https://cdn2.qualys.com/docs/qualys-api-limits.pdf
- This connector on ibl.ai: https://ibl.ai/developer/connectors/qualys
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
