vuln-mcp
A local MCP server for published vulnerability advisories, fixes, and secure development guidance. It contacts advisory publishers, never the device or website being reviewed. Publisher accounts and API keys are not required.
Tools
| Tool | Use |
|---|---|
search(query, asset?, cursor?) |
Find advisories by device, OS, component, PURL, commit, ID, or text. |
get_advisory(id) |
Read an advisory with publisher evidence, version constraints, and fixes. |
audit_sbom(bom) |
Review an inline CycloneDX inventory against the local OSV index. |
search_guides(query?, topic?, offset?, limit?) |
Browse topics or find guides and ASVS requirements. |
get_guide(id) |
Read an English manual or a versioned verification requirement. |
To start a security review without knowing a keyword, call search_guides() with no arguments. It returns topics, starter guides, and a suggested next call. For a specific question, try search_guides(query="parameterized queries"), then use the returned ID with get_guide. The offline catalogue contains 17 practical manuals and 345 requirements from OWASP ASVS 5.0.0. The original standard is licensed under CC BY-SA 4.0; see src/vuln_mcp/knowledge/NOTICE for attribution and distribution details.
The same content is available through resources/list and resources/read. The manuals live under vuln://guides/, with an index at vuln://guides/index. vuln://knowledge/topics is the topic map. Read a particular ASVS requirement with a URI such as vuln://asvs/V1.2.4. Requirements do not occupy 345 separate entries in the resource list. Each practical guide describes a risk, a code or configuration review, a local check, and a fix, with a reference to OWASP, CWE, or MDN.
MCPHub may prefix tool names, for example vuln-search_guides and vuln-get_guide. These tools work even in clients without a Resources tab. After updating a Docker image, start a container from the new image and reconnect or refresh the server in the hub. Pulling an image does not update an existing process. To troubleshoot a missing resource list, compare the direct stdio resources/list response with the capabilities exposed to your hub group.
Inventory review
audit_sbom accepts CycloneDX 1.4 through 1.7 JSON, not a file path or URL. It matches up to 256 components (including nested components) by versioned PURL against the local OSV snapshot. It never sends the inventory to publishers.
{"bom":{"bomFormat":"CycloneDX","specVersion":"1.6","components":[{"type":"library","name":"example-web","purl":"pkg:npm/example-web@1.0.0"}]}}
VEX statements from the supplied document are scoped to bom-ref and labeled supplied_bom; they do not override independent publisher evidence. Unsupported ranges or missing versions do not establish that a component is safe. An empty result is not a clean bill of health.
Exploitation evidence
Every hit carries two fields for planning an attempt. The MCP never executes anything and never contacts the target; it supplies the artifact, the preconditions, and the observable that separates success from a blind response.
exploit_refs lists published artifacts, ordered exploit_db then metasploit_module then poc_repo then detection_template, deduplicated, capped at 20:
| Type | Source |
|---|---|
exploit_db |
Exploit-DB, with edb_id, exploit_type, platform, verified, tags. Remote and verified entries rank first. |
metasploit_module |
Module path, platform and publisher rank from the Metasploit metadata. A lower rank number is a stronger reliability claim, so excellent modules lead and manual or ungraded ones trail. |
poc_repo |
Public proof-of-concept repositories referenced for that CVE. |
detection_template |
ProjectDiscovery nuclei template and its protocol, for establishing presence before selecting an artifact. |
exploitation reports published preconditions from the record itself: automatable and technical_impact from CISA SSVC, cvss_av, cvss_pr and cvss_ui from the CVSS vector, and component_role (application, operating_system, hardware) from the CPE part. Absent keys mean the publisher said nothing.
None of this confirms the queried build. A detection template hit is not a working exploit; a referenced repository is not tested code; automatable: yes says nothing about reachability from your position. Confirm the version constraint first, then the artifact, then the observable.
The Metasploit mapping comes from an 11 MB publisher index. A cold process reports initializing for that source on the first search and downloads it in the background with its own budget, retrying throttled proxies; the next search uses it. Every warm lookup still revalidates the index with a conditional request, so a changed or removed module appears immediately.
Run
Use Python 3.12+ with SQLite FTS5, uv, and a local disk. From the project directory:
uv sync --locked
uv run --locked vuln-mcp
The second command waits for MCP messages on stdin. In an MCP host, use uv as the command and run, --project, the absolute project path, --locked, vuln-mcp as its arguments. Pass settings in the host's env or set MCP_ENV_FILE to the absolute path of a private dotenv file. Process environment variables take precedence. See .env.example.
| Setting | Meaning |
|---|---|
MCP_DATA_DIR |
Private index directory. Defaults to the user's application data directory for vuln-mcp. Only one process may own a directory; network filesystems are unsupported. |
MCP_LIVE_ROUTE |
proxy by default; direct explicitly allows live requests without a proxy. A proxy failure never enables direct access. |
MCP_PROXY_URLS |
JSON array of trusted http://, https://, socks5://, or socks5h:// proxies. An empty pool disables live access in proxy mode. |
MCP_PROXY_LIST_URL |
Alternative to a static list. Direct HTTP(S) GET returning UTF-8 text, one complete proxy URL per line. Used only in proxy mode. |
MCP_PROXY_LIST_TOKEN |
Bearer token used only for fetching the proxy list. Use HTTPS or a trusted isolated network: HTTP does not encrypt the token. |
MCP_PROXY_LIST_REFRESH_MINUTES |
Refresh interval, an integer from 0 to 1440; default 15. Zero means fetch only at startup. |
MCP_PROXY_LIST_LIMIT |
How many trailing entries of the fetched list to keep, an integer from 1 to 1024; default 100. The kept proxies are used round-robin. |
MCP_LIVE_TIMEOUT_SECONDS |
Ceiling for one live attempt, from 1 to 60; default 9.5. It covers the proxy connection as well. A search waits this long plus 0.5 s for rendering. |
MCP_HTTP_MAX_RETRIES |
Retries after the initial attempt, from 0 to 8; default 3. Changing proxies does not reset the budget. |
For a proxy list provider, set the URL and token and leave MCP_PROXY_URLS unset or []. An example URL is https://proxy-service.example/v1/proxies?proxy_type=http&format=proxy-url-list-txt. Docker supports a private --env-file. Lists are capped at 1 MiB of text; blank lines are ignored, the last MCP_PROXY_LIST_LIMIT entries are kept and used round-robin. Several accounts on one gateway are distinct routes even though they share a host and port. An empty or invalid response preserves the previous pool. If there has been no successful refresh, the local index remains available but live requests cannot use a direct fallback.
Advisory search
Example: search("6ES7823-0FE30-1AA0", asset={"version":"1.3.0"}), followed by get_advisory("SSA-563922"). To continue a search, send the same query and asset facts with the previous page's next_cursor.
Bulk downloads and scheduled updates go directly to the publisher, independently of agent queries. Full CVE List and OSV archives require several gigabytes, plus space for SQLite and staging. Updates run while the server is running. Microsoft CSAF documents are cached privately and are not redistributed as a mirror.
Interactive searches combine local evidence with applicable live APIs, even when a result is cached. Records are joined by verified issue IDs, not similar titles. Separate CVEs in one advisory retain their own affected products and fixes. Check partial and per-source status to distinguish an unavailable source from a successful empty result. unknown does not mean not_affected.
Publisher Retry-After limits are shared between the index and live routes. Network failures may select the next healthy proxy; changing IP does not bypass publisher limits. HTTP_PROXY, HTTPS_PROXY, and NO_PROXY do not determine application routing. Both SOCKS5 schemes pass the destination hostname to the proxy in the locked HTTPX backend. HTTPS proxies and origin certificates are verified separately. Plain HTTP and SOCKS5 do not encrypt credentials on the proxy hop.
Docker and CI
docker run --rm -i --pull=always -e MCP_LIVE_ROUTE=direct -v vuln-mcp-data:/data git.eeee.moe/omar/vuln-mcp:latest
No local build or registry login is needed for the public image. Pin a release using the full main-branch commit SHA or an image digest. Use -i without -t for stdio; do not publish a port. The container runs as 10001:10001, so give that user write access to /data for a bind mount. Pass proxy credentials through the environment, never in the Dockerfile or repository.
uv sync --locked --group dev
uv run --locked pytest --cov --cov-report=term --cov-report=xml:coverage.xml
Gitea tests Python 3.12 and 3.13 and publishes a coverage XML report for each version. After both pass, CI builds the image and exercises its stdio entrypoint and guide discovery with networking disabled. Only pushes to main publish the tested image to git.eeee.moe/omar/vuln-mcp; pull requests do not publish. The release job requires the VULN_MCP_REGISTRY_TOKEN Actions secret with the package owner's write:package scope. The ubuntu-latest runner needs Docker/BuildKit and Python 3.11+ for the probe.
Sources
- CVE Program, OSV, NVD, and CIRCL provide core advisory data. OSV records retain their publishers' terms. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- CISA KEV, FIRST EPSS, Google Project Zero, and CISA SSVC describe different prioritization signals. EPSS probability and percentile are distinct. Public demonstration (
public_poc) and observed exploitation (observed_in_wild) are distinct;none_reportedrefers only to a specific assessment at its recorded date. - Zero Day Initiative and CERT/CC support native
ZDI-andVU#IDs. The historical CERT archive ends in June 2020. Later notes can be checked by known VU or CVE through the public VINCE API. No-store responses are not persisted; text search alone cannot discover every current VINCE note. - Siemens ProductCERT, Microsoft MSRC, Palo Alto Networks, Schneider Electric, FortiGuard PSIRT, Android Security Bulletins, Apache HTTP Server, and Red Hat CSAF/VEX supply product-specific evidence. Examples of native IDs include
PAN-SA-,SEVD-,SESB-,FG-IR-, datedASB-bulletins, andRHSA-. Fix recommendations apply to their stated product and release branch. An Android bulletin patch level does not prove a particular OEM build includes the fix. - The Exploit-DB integration stores explicit CVE publication dates, not executable content.
vuln://catalogs/exploitdbreports distinct CVEs fromfiles_exploits.csvand only the aggregate row count for the separatefiles_shellcodes.csv. Neither establishes device applicability. Publisher advisory PDFs and explicitly labeled fix-commit patches may be linked; attachments are not downloaded. - The separate VulnCheck KEV catalog requires a Community account and is not queried. Its absence must not be interpreted as negative evidence.