osv-advisory-mcp-server
Public Hosted Server: https://osv-advisory.caseyjhand.com/mcp
Overview
Vulnerability data from OSV.dev, the open-source vulnerability database. Query a package version or Git commit, batch-audit a dependency list or SBOM, and fetch complete advisory records with CVSS severity, CVE aliases, and affected version ranges.
Tools
Tool | Description |
| Query a package version by name/ecosystem/version or Package URL (PURL) |
| Audit the first 1,000 package versions in a submission of up to 5,000 |
| Query known vulnerabilities for a full Git commit hash |
| Fetch the full advisory record for a single OSV vulnerability ID |
| Return the list of supported ecosystem identifier strings |
Related MCP server: Vulnary-MCP
Capability reference
osv_query_package tool
Provide
name,ecosystem, andversion, or apurlsuch aspkg:pypi/jinja2@3.1.4. Known ecosystem bases normalize case (pypi→PyPI); release and repository suffixes retain their spelling. A PURL needs exactly one version: embedded in the URL or supplied separately. Versions are exact, never rangesAlpine needs a release branch, such as
Alpine:v3.17orpkg:apk/alpine/openssl@3.0.8-r0?distro=3.17.3. Maven needsgroupId:artifactId(a singlegroupId/artifactIdslash normalizes). Composer PURLs map to Packagist; an optionalrepository_urlkeeps repository scopeUnsupported ecosystem-specific constraints fail as
invalid_version; npm/crates.io exact pins with=or==normalize to the installed versionEach advisory carries CVE
aliases, optionalupstreamIDs,severityLabelwith itsseveritySource, the queried package'sfixedVersions,affectedRanges, andcweIdstruncated: trueindicates more OSV pages remain. PassnextCursorascursorwith the same identifier to continue. Repeat that input cursor alongsidepagewhen retrieving fields from a resumed reply. An empty initial complete result confirms no known vulnerabilities. An empty terminal resume only confirms exhaustion of the continuation
osv_query_batch tool
Submit 1–5,000
{name, ecosystem, version}tuples or{purl, version?}entries. The call processes the first 1,000. SetOSV_BATCH_SERVE_OVER_CAP=falseto reject submissions above 1,000summary.submittedPackages,unprocessedCount, andnextInputOffsetaccount for the input. IfnextInputOffsetis set, submitpackages.slice(nextInputOffset)in a new call and add that offset to its row indices. All outcome counts describe the processed prefixEach row carries
vulnerable,vulnCount,vulns,truncated, anderror; a failure lands in the affected rows'errorinstead of failing the callsummarytotals the scan (vulnerableCount,cleanCount,truncatedCount,errorCount,totalVulns,worstSeverity), and truncated rows never count as clean. The whole scan has a 50-second deadlinevulnerableRows,errorRows, andtruncatedRowsinsummaryretain original zero-based indices even when the preview omits those rows. Lists can overlap; retrieve a row with/results/<index>Resume a row through
osv_query_packagewith its original identifier andnextCursorascursor
osv_query_commit tool
One full
commit: 40 hexadecimal characters for SHA-1 or 64 for SHA-256; either letter case is accepted, abbreviations are rejectedAdvisories retain record-wide severity, aliases, upstream IDs, and GIT ranges with repository URLs and ordered events. Readable advisory sections retain complex values in fenced JSON. No package-specific
fixedVersionsare inferredPass
nextCursorascursorwith the same commit to continue a truncated result. An empty terminal resume confirms the continuation is exhausted
osv_get_vulnerability tool
One exact advisory ID from any OSV source (
GHSA-,PYSEC-,RUSTSEC-,GO-,DSA-,USN-,CVE-, …), matched case-sensitivelyFull record:
details,aliases, optionalupstreamandrelatedIDs, every affected package with its ranges and source metadata,severityLabel,cweIds, andreferencesAn unknown ID fails as
vulnerability_not_found;withdrawnis set only on retracted advisories
osv_list_ecosystems tool
No input; returns the
ecosystemsstrings the query tools accept, plus anotewith the date the list was last checked against OSV.devReturns canonical spellings. Query tools normalize known base names case-insensitively and forward unknown names to OSV.dev; release and repository suffixes remain unchanged
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
OSV-specific:
No API key required — OSV.dev is public and keyless, with no published rate limit
osv_query_batchfinds matching advisory IDs through OSV's/v1/querybatch, then fetches each unique advisory once, so batch rows carry the full records (aliasesincluded) the batch endpoint omits; requests are capped byOSV_BATCH_CONCURRENCYosv_list_ecosystemsis checked against the live OSV schema and API withbun run check:ecosystems
Agent-friendly output:
Truncation is never read as clean —
truncatedflags incomplete OSV pagination, and truncated batch rows are left out ofcleanCountCVE-shaped
aliasesandupstreamIDs chain tonist-nvd-mcp-serverfor CVSS base scores and CISA KEV status. The lists remain separate; a distribution advisory can cover several upstream vulnerabilitiesResponse fields are bounded to 24,000 bytes; upstream cursors are returned intact outside that budget. Start retrieval by repeating the original input with
page: overflow.page. Continue the samepathwithoffset: page.nextOffsetandrevision: page.revisionuntilnextOffsetis null. Fetch eachentries[].deferred.pathseparately at offset zero without a revision; never copy the whole outputpageobject into the inputAdvisory text in
content[]escapes HTML and unsafe-link constructs while preserving HTTP(S) links; caller coordinates render literally. Commit data and affected metadata use reversible JSON where literal rendering needs it.structuredContentkeeps every OSV string verbatim
Getting started
Use the public hosted instance with Claude Code:
claude mcp add --transport http osv-advisory-mcp-server https://osv-advisory.caseyjhand.com/mcpOr run locally through npm:
claude mcp add osv-advisory-mcp-server -- npx -y @cyanheads/osv-advisory-mcp-serverFor other MCP clients, add this to the client configuration:
{
"mcpServers": {
"osv-advisory-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/osv-advisory-mcp-server"]
}
}
}No API key is required. For Docker or a source build, see Running the server.
Configuration
All configuration is validated at startup, and every variable is optional.
Variable | Description | Default |
| Timeout per OSV.dev HTTP attempt, in milliseconds. Package, commit and batch queries share a 50-second per-operation deadline across requests, retries, response reads and hydration. |
|
| Maximum concurrent OSV.dev requests issued by |
|
| Maximum OSV.dev result pages followed per package or commit before a result is marked |
|
| Accept up to 5,000 packages and process the first 1,000. Set |
|
| Transport: |
|
| Port for HTTP server. |
|
| HTTP endpoint path. |
|
| Public origin override for TLS-terminating reverse-proxy deployments. | none |
| HTTP session mode: |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files. Relative paths resolve from the server package root. |
|
| Log each failed tool call's arguments and result, redacted by key name and capped at |
|
| Storage backend. |
|
| Enable OpenTelemetry instrumentation (spans, metrics, completion logs). |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Requires Bun v1.4.4 or higher (or Node.js v24+).
git clone https://github.com/cyanheads/osv-advisory-mcp-server.git
cd osv-advisory-mcp-server
bun install
cp .env.example .envBuild and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec bun run check:ecosystems # Compare osv_list_ecosystems with the live OSV schema and API
Docker
docker run --rm -p 3010:3010 ghcr.io/cyanheads/osv-advisory-mcp-server:latestThe image defaults to HTTP transport, stateless session mode, and logs to /var/log/osv-advisory-mcp-server. For stdio, use docker run -i --rm -e MCP_TRANSPORT_TYPE=stdio ghcr.io/cyanheads/osv-advisory-mcp-server:latest. Build locally with docker build -t osv-advisory-mcp-server .; OpenTelemetry peers are installed by default — use --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| OSV.dev REST API service — fetch, retry, response normalization. |
| Unit and integration tests mirroring |
| Published dependency-audit and advisory-retrieval guide, also served over MCP. |
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.enrichfor response context, andctx.signalfor cancellable OSV requestsRegister new tools via the barrel in
src/mcp-server/tools/definitions/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Package vuln advisories from OSV.dev: CVEs, severity, fixes, manifest audit. Pay per call via x402.
Check npm, PyPI, Go and Maven packages or lockfiles against OSV.dev: CVEs, CVSS, fixed versions.
Queries live Google OSV.dev vulnerability intelligence for any PyPI, npm, Go, or Rust crate and re
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceScans Python, Node.js, Java/Spring, and PHP dependency manifests for known vulnerabilities using OSV and GitHub Advisory APIs.-
- AlicenseAqualityCmaintenanceMCP server for querying CVE and package vulnerability data from NVD and OSV.dev, allowing CVE lookups and dependency scanning.4148 npm1MIT

@guardbee/mcp-dependencyofficial
AlicenseNot gradedqualityFmaintenanceEnables auditing npm, pip, and other package dependencies for known CVEs via the OSV database, with tools to scan manifests, query individual packages, and integrate into CI/CD workflows.570 npmMIT- AlicenseAqualityAmaintenanceEnables AI agents to submit npm, PyPI, Go, or Maven packages and manifests to the free OSV.dev database and receive per-package and per-advisory results with CVE mappings, CVSS scores, severities, and the versions that fix each issue. It also supports filtering by minimum severity, de-duplicating alias advisories, and machine-readable error/warning rows for CI gates and upgrade recommendations.3MIT