OSV Advisories
v0.3.0Query OSV.dev for known vulnerabilities by package and version, and scan lockfiles in batch.
Looks up known vulnerabilities in the OSV.dev database by package name, version and ecosystem, and scans lockfiles. The only host it ever contacts is api.osv.dev over HTTPS, with a 15 s timeout per request and an 8 MB cap per response. Part of dev-mcp-servers. Stdio transport only; the server never opens a port. Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):
Summary extracted from the README.
osv-advisories MCP server
Looks up known vulnerabilities in the OSV.dev database by package name, version and ecosystem, and scans lockfiles. The only host it ever contacts is api.osv.dev over HTTPS, with a 15 s timeout per request and an 8 MB cap per response.
Part of dev-mcp-servers. Stdio transport only; the server never opens a port.
Tools
| Tool | Input | What it returns |
|---|---|---|
query_package |
ecosystem, name, version? |
Full advisories for one package: ids, aliases (CVE), summary, severity, affected ranges, fixed versions, references. POST /v1/query, up to five pages. |
query_batch |
packages[] (up to 1000) |
Advisory ids per package. POST /v1/querybatch in chunks of 100. |
scan_lockfile |
path or content, filename?, format?, include_details? |
Parses package-lock.json (v1 to v3), requirements.txt (== pins only), poetry.lock, go.sum (basic), Cargo.lock (cargo), Gemfile.lock (gemfile) or uv.lock (uv) and batch-queries every pinned package; lists skipped entries. Reads one local file up to 10 MB. |
get_vulnerability |
id |
One advisory in full. GET /v1/vulns/{id}. |
Install
Claude Code:
claude mcp add osv-advisories -- docker run --rm -i -v "$PWD:/work:ro" ghcr.io/basitalisandhu/mcp-osv-advisories:0.3.0
Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):
{
"mcpServers": {
"osv-advisories": {
"command": "docker",
"args": ["run", "--rm", "-i", "-v", "/path/to/your/project:/work:ro", "ghcr.io/basitalisandhu/mcp-osv-advisories:0.3.0"]
}
}
}
Pin the version as shown so that an update cannot change what runs in your editor without you noticing. The container sees only the mounted directory, so pass paths under /work. The package is not on npmjs.com yet, so npx does not work; see the repository README for GitHub Packages npm. From a checkout, use "command": "node", "args": ["<path>/packages/osv-advisories/dist/index.js"] after npm install && npm run build at the repository root.
What it touches
- Network:
https://api.osv.devonly. Any other origin is refused before a request is made. Redirects are refused. No telemetry. - Local files:
scan_lockfilereads the one file you name, up to 10 MB. - Telemetry: none.
Notes
- Ecosystem names are matched case-insensitively against the OSV list and normalised (
pypibecomesPyPI); unknown names are an error rather than an empty result. - For Go modules the leading
vis stripped from versions, as OSV expects. - Cargo registry pins use
crates.io; path/workspace and git packages are reported as skipped. GemfileGEMspecs useRubyGems;GITandPATHspecs are reported as skipped, dependency constraints are not queried, and platform suffixes on native gems are removed. uv.lock registry packages usePyPIwith normalised names; editable, virtual, path, directory, git and URL packages are reported as skipped. These are parsers for generated lockfiles, not general TOML or Ruby parsers. - An empty result means OSV has no advisory for that exact package and version; it does not prove the package is safe.
Build and test
npm install # at the repository root
npm run build -w @basitalisandhu/mcp-osv-advisories
npm test -w @basitalisandhu/mcp-osv-advisories
Tests use node:test and the SDK's in-memory transport; they do not reach the network.
Licence
MIT. See LICENSE.