About OSV Advisories
OSV Advisories is an MCP server for developers checking package vulnerabilities or scanning lockfiles. It queries OSV.dev and can return full advisory details, while restricting network access to api.osv.dev.
Key features
- 01Query advisories by package and version
- 02Batch-query up to 1,000 packages
- 03Scan supported lockfiles for pinned packages
- 04Retrieve full vulnerability records
Use cases
- 01Check a dependency before upgrading it
- 02Scan a project lockfile for known advisories
MCP support
Exposes package queries, batch queries, lockfile scans, and vulnerability lookups as MCP tools.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
docker run -i --rm ghcr.io/basitalisandhu/mcp-osv-advisories:0.3.0Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
ghcr.io/basitalisandhu/mcp-osv-advisories:0.3.0stdioTools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEosv-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 or go.sum (basic) 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.2.2
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.2.2"]
}
}
}
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. - 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.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.