Osv MCP logo

Osv MCP

by StacklokLabs

Query OSV for package, commit, batch, and vulnerability-ID security data through MCP tools.

Install Osv MCP

Run the project’s own setup commands, in order.

Setup steps from the project

StacklokLabs/osv-mcp installs with its own commands rather than a config we can generate, so these are copied as-is. Run them in order in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/StacklokLabs/osv-mcp.git
    
  2. 2. Run
    cd osv-mcp
    
  3. 3. Install
    task build
    
  4. 4. Start the server
    thv run osv
    
  5. 5. Start the server
    MCP_PORT=3000 ./build/osv-mcp-server
    
  6. 6. Start the server
    ./build/osv-mcp-server
    

Overview

StacklokLabs/osv-mcp MCP server gives MCP-compatible applications access to the OSV Open Source Vulnerabilities database. It supports lookups by package version, commit, or package URL, along with batch queries and vulnerability-ID detail retrieval. The server uses SSE by default and also supports streamable HTTP, with port and transport controlled through environment variables. Reach for it when an agent needs vulnerability checks for dependencies or source commits.

Use cases

  • Check a dependency version for known vulnerabilities
  • Scan multiple packages in one batch query
  • Inspect vulnerabilities affecting a source commit
  • Retrieve details for a known OSV vulnerability ID

Key features

  • Query package versions or commits
  • Accept package URLs for lookups
  • Batch query multiple packages or commits
  • Retrieve vulnerability details by ID
  • Support SSE and streamable HTTP transports

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

14/15 checks healthy over the last 90d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars44Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Osv MCP works

What StacklokLabs/osv-mcp MCP server does

StacklokLabs/osv-mcp MCP server connects MCP-compatible applications to the OSV database for open-source vulnerability lookups. It belongs in the Security category and is suited to agents that need to inspect dependency versions, source commits, or known vulnerability records without implementing OSV request handling themselves.

The server exposes three tools:

  • query_vulnerability checks one package version or commit. A package can be identified with package_name and ecosystem, or with a purl. Version and commit are alternative query inputs.
  • query_vulnerabilities_batch accepts an array of package or commit queries, allowing several lookups in one tool call.
  • get_vulnerability retrieves details for a vulnerability using its OSV vulnerability ID.

How it works

The server implements an SSE-based MCP service. SSE is the default transport, and streamable HTTP is also available through configuration. MCP clients connect to the running service and invoke the exposed tools with structured inputs.

For package checks, provide a version together with the package identity, such as a package name and ecosystem. The documented ecosystems include examples such as npm, PyPI, and Go. A package URL can be used instead of the package name and ecosystem. Commit queries use a commit hash and should not be combined with a version. Batch requests follow the same input rules for each item in the queries array.

Setup and configuration

Building from source requires Go 1.21 or later. The repository documents Task as optional for running project tasks and ko as optional for building container images. The documented source build command is task build.

StacklokLabs/osv-mcp MCP server can also be run through ToolHive. The documented flow is to install ToolHive, run thv client setup to register a supported client, and start the packaged server with thv run osv. ToolHive then makes the server available to MCP-compatible clients.

Configuration uses these environment variables:

  • MCP_PORT selects the listening port. It defaults to 8080 and must be an integer from 0 through 65535.
  • MCP_TRANSPORT selects sse or streamable-http. It defaults to sse when missing or invalid.

For example, setting MCP_PORT=3000 starts the compiled server on port 3000.

Tools and capabilities

The tools support three common workflows: checking whether a dependency version is affected, checking a source commit, and retrieving a vulnerability record after an ID is known. Batch input is useful when an agent needs to assess multiple packages or commits in one operation. The vulnerability detail tool accepts an id field, while the batch tool requires queries.

The server can be tested, linted, and formatted with the repository's documented Task commands: task test, task lint, and task fmt. These commands describe development workflows rather than additional MCP capabilities.

Limitations and notes

It also does not document a client-specific configuration file. Use the transport and port settings supplied by the server, and verify that the chosen client supports MCP and the selected transport.

The project is licensed under the Apache v2 License.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Osv MCP

Build it from source with Go 1.21 or later using the repository's documented `task build` command, or run the packaged `osv` server through ToolHive with `thv run osv`.

Set `MCP_PORT` to an integer from 0 through 65535. The default is port 8080.

Yes. Use the `query_vulnerabilities_batch` tool and provide a required `queries` array containing package or commit query objects.

Yes. Set `MCP_TRANSPORT=streamable-http`; the default transport is SSE.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOsv MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/stackloklabs-osv-mcp?style=directory)](https://allmcps.com/mcp/stackloklabs-osv-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/stackloklabs-osv-mcp"><img src="https://allmcps.com/api/badge/stackloklabs-osv-mcp?style=directory" alt="Osv MCP on AllMCPs" /></a>