官方说明🏎️ ☁️ - Query the OSV (Open Source Vulnerabilities) database by package version or commit, batch-query multiple packages and get vulnerability details by ID.
An MCP (Model Context Protocol) server that provides access to the OSV (Open Source Vulnerabilities) database. Overview This project implements an SSE-based MCP server that allows LLM-powered applications to query the OSV database for vulnerability information. The server provides tools for: 1. Querying vulnerabilities for a specific package version or commit 2. Batch querying vulnerabilities for multiple packages or commits 3. Getting detailed information about a specific vulnerability by ID Installation Prerequisites - Go 1.21 or later - Task (optional, for running tasks) - ko (optional, for building container images) Building from source Usage Running with ToolHive (Recommended) The easiest way to run the OSV MCP server is using ToolHive, which provides secure, containerized deployment of MCP servers: The server will be available to your MCP-compatible clients and can query the OSV database for vulnerability information. Running from Source Server Configuration The server can be configured using environment variables: - MCP_PORT: The port number to run the server on (default: 8080) - Must be a valid integer between 0 and 65535 - If invalid or not set, the server will use port 8080 - MCP_TRANSPORT: The transport mode for the server (default: sse) - Supported values: sse, streamable-http - If invalid or not set, the server will use SSE transport mode Example: MCP Tools The server provides the following MCP tools: query_vulnerability Query for vulnerabilities affecting a specific package version or commit. **Input Schema:** query_vulnerabilities_batch Query for vulnerabilities affecting multiple packages or commits at once. **Input Schema:** get_vulnerability Get details for a specific vulnerability by ID. **Input Schema:** Examples Querying vulnerabilities for a package Querying vulnerabilities for a commit Batch querying vulnerabilities Getting vulnerability details Development Running tests Linting Formatting code Contributing We welcome contributions to this MCP server! If you'd like to contribute, please review the CONTRIBUTING guide for details on how to get