Osv Advisory Mcp Server
БесплатноПоддерживаетсяQuery OSV.dev for package vulnerabilities, batch-audit dependency lists, and fetch full advisory records via MCP. STDIO or Streamable HTTP.
Описание
Query OSV.dev for package vulnerabilities, batch-audit dependency lists, and fetch full advisory records via MCP. STDIO or Streamable HTTP.
README
@cyanheads/osv-advisory-mcp-server
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
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 |
|---|---|
osv_query_package |
Query a package version by name/ecosystem/version or Package URL (PURL) |
osv_query_batch |
Audit the first 1,000 package versions in a submission of up to 5,000 |
osv_query_commit |
Query known vulnerabilities for a full Git commit hash |
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 |
Capability reference
osv_query_package tool
- Provide
name,ecosystem, andversion, or apurlsuch aspkg:pypi/[email protected]. 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 ranges - Alpine needs a release branch, such as
Alpine:v3.17ordistro=alpine-3.17.3in a PURL. Debian PURLs accept known releases or codenames, with an optionaldebian-prefix. Numeric Ubuntu PURL qualifiers such asdistro=ubuntu-22.04.1select the releaseUbuntu:22.04 - For a release-qualified Ubuntu query, supply the installed binary name and version. Both package tools look up the source packages OSV indexes for that release. For example,
libssl3onUbuntu:22.04:LTSresolves toopenssl. A fallback lookup covers only the supplied name and marks coverage incomplete. A mapping rate limit or exhausted deadline requires a retry - Maven needs
groupId:artifactId(a singlegroupId/artifactIdslash normalizes). Composer PURLs map to Packagist; an optionalrepository_urlkeeps repository scope - Unsupported ecosystem-specific constraints fail as
invalid_version; npm/crates.io exact pins with=or==normalize to the installed version - Each advisory carries CVE
aliases, optionalupstreamIDs,severityLabelwith itsseveritySource, the queried package'sfixedVersions,affectedRanges, andcweIds truncated: 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 result confirms no known vulnerabilities when lookup and source resolution completed. An empty terminal resume only confirms exhaustion of the continuation- When upgrading from before 0.6.0, restart any Ubuntu PURL query with a numeric distro qualifier by omitting its old cursor. The new query scopes findings to the requested release
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,000 summary.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 prefix- Each row carries
vulnerable,vulnCount,vulns,truncated, anderror; a failure lands in the affected rows'errorinstead of failing the call summarytotals 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>summary.sourceResolutionUnavailableRowRangesidentifies rows checked under their supplied Ubuntu names after a mapping failure. For example,0,3-5means rows 0, 3, 4, and 5. Those rows are excluded fromcleanCount- Resume a row through
osv_query_packagewith its original identifier andnextCursorascursor - If a nested advisory page returns a timeout or upstream error, retry the same path. You can also retrieve
/results/<index>/errorfor the row diagnostic
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 rejected - Advisories 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 inferred - Pass
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-sensitively - Full record:
details,aliases, optionalupstreamandrelatedIDs, every affected package with its ranges and source metadata,severityLabel,cweIds, andreferences - When OSV publishes evidence for a converted range, inspect
/affected/<index>/ranges/<index>/database_specific. Its source tags and release boundaries accompany OSV's normalized events - An 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.dev - Returns 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 ofcleanCount - CVE-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 vulnerabilities - Response 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 input - Advisory 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/mcp
Or run locally through npm:
claude mcp add osv-advisory-mcp-server -- npx -y @cyanheads/osv-advisory-mcp-server
For 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 |
|---|---|---|
OSV_REQUEST_TIMEOUT_MS |
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. | 40000 |
OSV_BATCH_CONCURRENCY |
Maximum concurrent OSV.dev requests issued by osv_query_batch. |
10 |
OSV_QUERY_MAX_PAGES |
Maximum OSV.dev result pages followed per package or commit before a result is marked truncated. |
10 |
OSV_BATCH_SERVE_OVER_CAP |
Accept up to 5,000 packages and process the first 1,000. Set false to restore the 1,000-entry submission ceiling. |
true |
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: stateless, stateful, or auto. |
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. Relative paths resolve from the server package root. | <server-package-root>/logs |
LOG_TOOL_FAILURE_PAYLOADS |
Log each failed tool call's arguments and result, redacted by key name and capped at LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES (default 16384). A secret inside a free-form value is not redacted. |
false |
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.
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 .env
Build 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:latest
The 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 |
|---|---|
src/index.ts |
createApp() entry point — registers tools and inits services. |
src/config |
Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools |
Tool definitions (*.tool.ts) — osv_query_package, osv_query_batch, osv_query_commit, 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/. |
skills/ |
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 logic - Use
ctx.logfor request-scoped logging,ctx.enrichfor response context, andctx.signalfor cancellable OSV requests - Register new tools via the barrel in
src/mcp-server/tools/definitions/index.ts - Wrap 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 test
License
Apache-2.0 — see LICENSE for details.
Установить Osv Advisory Mcp Server в Claude Desktop, Claude Code, Cursor
unyly install osv-advisory-mcp-serverСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add osv-advisory-mcp-server --env MCP_LOG_LEVEL="" --env MCP_TRANSPORT_TYPE="" -- npx -y @cyanheads/osv-advisory-mcp-serverПошаговые гайды: как установить Osv Advisory Mcp Server
FAQ
Osv Advisory Mcp Server MCP бесплатный?
Да, Osv Advisory Mcp Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Osv Advisory Mcp Server?
Да, требуются переменные окружения: MCP_LOG_LEVEL, MCP_TRANSPORT_TYPE. Unyly подставит их в конфиг при установке.
Osv Advisory Mcp Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Osv Advisory Mcp Server в Claude Desktop, Claude Code или Cursor?
Открой Osv Advisory Mcp Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Изменения
Версии и запрашиваемые доступы со временем.
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Unyly Deploy
Deploy sites and MCP servers to Unyly straight from your AI agent
автор: UnylyTemplate MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectServer Sequential Thinking
MCP server for sequential thinking and problem solving
автор: GitHub ActionsAmap Maps Mcp Server
MCP server for using the AMap Maps API
автор: duxiaohuiPayMCP
Lightweight payments layer for MCP servers: turn tools into paid endpoints with a two-line decorator. [PyPI](https://pypi.org/project/paymcp/) · [npm](https://w
автор: blustAIdemo
demo — MCP server via Smithery
автор: yoojoohans-jpgServer For Power BI
Enables exploring Microsoft Fabric / Power BI workspaces and semantic models, and executing ad-hoc DAX queries.
автор: Mitsubishi-FusoCompare Osv Advisory Mcp Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
