Purpose
osv-mcp is an MCP (Model Context Protocol) server designed to provide LLM-driven applications with access to the OSV (Open Source Vulnerabilities) database. Through this server, AI applications can query information about known vulnerabilities in open source software packages or code commits.
Main Capabilities
The server provides the following MCP tools:
- Query vulnerability information for a specific package version or commit.
- Batch query vulnerability information for multiple packages or commits.
- Retrieve detailed information about a specific vulnerability by vulnerability ID.
Usage
Environment Requirements
- Go 1.21 or later
- Task (optional, for running tasks)
- ko (optional, for building container images)
How to Run
- Run with ToolHive (recommended): ToolHive provides secure containerized deployment and makes it easy to run the OSV MCP server. The server will be available to MCP-compatible clients and can query the OSV database for vulnerability information.
- Run from source: You can build and run the server directly from source.
Server Configuration
The server can be configured via environment variables:
MCP_PORT: the port number the server runs on (default: 8080). Must be a valid integer between 0 and 65535. If invalid or unset, the server will use port 8080.MCP_TRANSPORT: the server's transport mode (default: sse). Supported values:sse、streamable-http. If invalid or unset, the server will use SSE transport mode.
Applicable Scenarios
Suitable for developers and security researchers who need to integrate open source vulnerability query capabilities into LLM applications. For example, in AI-assisted programming or security auditing scenarios, automatically check whether dependency packages have known vulnerabilities.
Limitations
- Requires Go 1.21 or later.
- Deployment with ToolHive requires a containerized environment.
- Specific query examples and detailed API documentation are not yet provided.
- The project uses the Apache v2 license.