The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Osv Advisory MCP Server listing page.
Query OSV.dev for package vulnerabilities, batch-audit dependency lists, and fetch full advisory records via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://osv-advisory.caseyjhand.com/mcp
4 tools for querying the OSV.dev vulnerability database — single package lookups, batch dependency audits, and full advisory fetch:
| Tool | Description |
|---|---|
osv_query_package | Query known vulnerabilities for a single package version by name, ecosystem, and version |
osv_query_batch | Batch vulnerability query for an array of package tuples — one call for a full dependency list or SBOM audit |
osv_get_vulnerability | Fetch the full advisory record for a single OSV vulnerability ID |
osv_list_ecosystems | Return the list of supported ecosystem identifier strings |
osv_query_packageThe primary "is this package version vulnerable?" tool.
name, ecosystem (case-sensitive exact match — use osv_list_ecosystems to validate), and versionaliases field surfaces CVE IDs for chaining to nist-nvd-mcp-server for CVSS base scores, EPSS exploitation probability, and CISA KEV statusosv_query_batchThe primary tool for dependency audits, SBOM scanning, and lockfile triage.
{name, ecosystem, version} tuples (1–1000 packages per call)error rather than failing the whole batchvulnerable, vulnCount, vulns (including aliases and severityLabel), and fixedVersionstotalPackages, vulnerableCount, cleanCount, errorCount, totalVulns, worstSeverityosv_get_vulnerabilityFetch the complete advisory record by OSV ID.
GHSA- (GitHub), PYSEC- (Python), RUSTSEC- (Rust), GO- (Go), DSA-/DLA- (Debian), CVE- (direct CVE fallbacks)osv_query_package or osv_query_batch returns a vuln ID and you need the full advisory context — remediation guidance, scope of affected packages, or eligibility criteriaosv_list_ecosystemsReturn the list of valid ecosystem identifier strings. Ecosystem strings are case-sensitive exact matches — "pypi" is not "PyPI". Call this tool before querying to validate ecosystem strings from lockfiles or user input. The list is static (sourced from the OSV schema spec) and may occasionally lag newly added ecosystems.
Built on @cyanheads/mcp-ts-core:
none, jwt, oauthin-memory, filesystem, Supabase, Cloudflare KV/R2/D1OSV-specific:
osv_query_batch return full records including aliases (CVE IDs) that the upstream batch endpoint omitserror, leaving the rest of the batch intactAgent-friendly output:
aliases (CVE IDs) prominently surfaced on every vuln entry — the primary composition point for chaining to nist-nvd-mcp-server for CVSS base scores, EPSS, and CISA KEV statusseverityLabel derived from database_specific.severity (GHSA records) or the highest CVSS base score; null rather than fabricated when neither source is availablequeryMeta) on osv_query_package output so agents can verify the request was applied correctlyworstSeverity, vulnerableCount, cleanCount) for quick triage without reading per-package rowsA public instance is available at https://osv-advisory.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
Add the following to your MCP client configuration file. No API key is required — OSV.dev is fully public.
Or with npx (no Bun required):
Or with Docker:
For Streamable HTTP, set the transport and start the server:
All configuration is validated at startup. No server-specific env vars are required — OSV.dev is keyless and fully public.
| Variable | Description | Default |
|---|---|---|
OSV_REQUEST_TIMEOUT_MS | HTTP request timeout in milliseconds for OSV.dev API calls. | 10000 |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_HTTP_ENDPOINT_PATH | HTTP endpoint path. | /mcp |
MCP_PUBLIC_URL | Public origin override for TLS-terminating reverse-proxy deployments. | none |
MCP_SESSION_MODE | HTTP session mode: stateful, stateless, or auto (auto resolves to stateful). This server explicitly deploys stateless; its tools have no multi-round input flow. | stateless |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | false |
See .env.example for the full list of optional overrides.
Build and run:
Run checks and tests:
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/osv-advisory-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools and inits services. |
src/mcp-server/tools | Tool definitions (*.tool.ts) — osv_query_package, osv_query_batch, osv_get_vulnerability, osv_list_ecosystems. |
src/services/osv-api | OSV.dev REST API service — fetch, retry, response normalization. |
tests/ | Unit and integration tests mirroring src/. |
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.enrich for response context, and ctx.signal for cancellable OSV requestssrc/mcp-server/tools/definitions/index.tsIssues and pull requests are welcome. Run checks and tests before submitting:
Apache-2.0 — see LICENSE for details.