Metadata-Version: 2.4
Name: mcp-cve-watch
Version: 0.1.0
Summary: Continuous CVE intelligence for your MCP servers' runtime dependencies
Author: hao li
License: MIT
Project-URL: Homepage, https://github.com/hahahahahahahahah6/mcp-cve-watch
Keywords: mcp,cve,security,vulnerability,osv,developer-tools,cli
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# mcp-cve-watch

Continuous **CVE intelligence** for your MCP servers' runtime dependencies.

MCP servers run real code — npm packages, PyPI packages, system daemons with
network access. A vulnerability in one of those dependencies is a vulnerability
in everything that server can touch. Public CVE disclosures against MCP
ecosystem packages are rising, and most MCP users never check: the server was
installed once, `npx` cached it, and nobody looked at it again.

mcp-cve-watch subscribes you to that feed. Point it at the dependency
manifests your MCP servers run on, and `watch` checks
[OSV.dev](https://osv.dev) (which aggregates CVE and GitHub Advisory data
across PyPI, npm, and more) for every pinned dependency. The first run records
a baseline; every later run alerts only on **new** CVEs — with severity
mapped from CVSS scores — so it works as a quiet cron job or a CI gate.

Zero dependencies. Python standard library only.

## Install

```bash
pip install mcp-cve-watch
# or with pipx:
pipx install mcp-cve-watch
```

Requires Python 3.9+. No other packages.

## Usage

**Check your MCP servers' dependencies** — pass the manifest files the
servers run on (`requirements.txt` pins for Python-based servers,
`package.json` for Node-based ones):

```bash
$ mcp-cve-watch watch ./mcp-servers/requirements.txt ./mcp-servers/package.json
checked 14 pinned dependencies at 2026-10-11 08:52 UTC

*** 2 NEW CVE(s) since last check ***

SEVERITY  SCORE  ID              PACKAGE     VERSION  SUMMARY
--------  -----  --------------  ----------  -------  ----------------------------------------
CRITICAL  9.8    CVE-2024-0001   some-lib    1.2.3    Remote code execution via crafted input...
HIGH      7.5    CVE-2024-0002   other-lib   4.5.6    Denial of service in parser...
```

Run it again tomorrow: if nothing new appeared, it just says so.

```bash
$ mcp-cve-watch watch ./mcp-servers/requirements.txt
checked 8 pinned dependencies at 2026-10-12 09:00 UTC
no new CVEs since last check
```

**Use it as a CI gate** — fail the build when a new high-or-worse CVE shows up:

```bash
mcp-cve-watch watch requirements.txt --fail-on high   # exits 3 on new HIGH/CRITICAL
```

**Print the full report** of everything the last run found:

```bash
$ mcp-cve-watch report --format markdown
mcp-cve-watch report (last check: 2026-10-11T08:52:11+00:00) — 2 finding(s)

| Severity | Score | ID | Package | Version | Summary |
|---|---|---|---|---|---|
| critical | 9.8 | CVE-2024-0001 | some-lib | 1.2.3 | Remote code execution via crafted input... |
```

Options worth knowing:

- `--severity high` — only record HIGH and above (default is `low`)
- `--include-dev` — also scan `devDependencies` in `package.json`
- `--format json` — machine-readable output for both `watch` alerts and `report`
- `--min-severity` on `report` — filter the printed report
- State lives in `~/.config/mcp-cve-watch/state.json`
  (`MCP_CVE_WATCH_DIR` or `--state-dir` overrides it)

**Cron example** — a daily check that emails you only when something is new:

```bash
0 9 * * * mcp-cve-watch watch ~/mcp-servers/requirements.txt --fail-on high --severity medium
```

## Differentiation

- **vs mcp-audit** — mcp-audit is a *point-in-time runtime audit*: it handshakes
  each MCP server once and reports what it sees right now (tool counts, schema
  cost, failures). mcp-cve-watch is a *continuous vulnerability-intelligence
  subscription*: it keeps a baseline of every known CVE on your servers'
  dependencies and alerts only on what's **new** since the last check. Run the
  audit when you install a server; run the watch every day after.
- **vs Dependabot / Renovate** — those watch the dependencies of *a GitHub
  repository*. mcp-cve-watch watches the dependencies of *your MCP servers at
  runtime* — the pinned `npx`/`uvx` packages actually executing on your
  machine, which often don't live in any repository Dependabot can see.

## How it works

1. Parses each manifest into pinned `(name, version, ecosystem)` triples
   (PyPI from `requirements.txt`, npm from `package.json`).
2. Sends one batched query to the OSV.dev API — no API key needed.
3. Maps CVSS scores to severity (≥9.0 critical, ≥7.0 high, ≥4.0 medium).
4. Diffs against the previous run's state and alerts only on new findings.

Only pinned versions (`==`, exact npm versions) can be checked against a CVE
feed — unpinned lines are skipped with a warning. Pin your MCP server deps.

## License

MIT — see [LICENSE](LICENSE).
