Add an MCP server exposing the OSV API as tools for AI agents
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with the existing Python tooling pattern in tools/datafix and the MCP SDK. Create an isolated server under tools/osv-mcp/ with its own pyproject.toml, using OSV_API_BASE_URL to target the stable /v1 endpoints. Done means exposing the four listed query and vulnerability lookup tools without adding dependencies to the root library; the issue says a PR is being opened, so check for that work before starting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
AI coding agents (Claude, Gemini, Joule, etc.) increasingly author and modify dependency manifests, but they have no first-class, machine-native way to ask OSV "is this package/version vulnerable?" during a task. Today an agent has to know and hand-roll the OSV REST contract. There is no Model Context Protocol (MCP) server in this repo, so OSV cannot be plugged into the MCP tool ecosystem that these agents natively consume.
Describe the solution you'd like
A small, self-contained MCP server under tools/ that wraps the stable public OSV REST API (https://api.osv.dev) as MCP tools, so any MCP-capable agent can query OSV directly:
query_package_vulnerabilities(package_name, ecosystem, version=None)→POST /v1/queryquery_by_commit(commit)→POST /v1/queryquery_batch(queries)→POST /v1/querybatchget_vulnerability(vuln_id)→GET /v1/vulns/{id}
Design intent:
- Python, using the official
mcpSDK, matching the existing Python tooling (poetry, yapf, pylint). - Fully isolated in its own
tools/osv-mcp/directory with its ownpyproject.toml(same pattern astools/datafix), so nothing leaks into the rootosvlibrary. - Thin REST wrapper only — no GCP dependencies, no new surface on the Go migration path. Only the stable
/v1endpoints (the two/v1experimental/endpoints are intentionally excluded). OSV_API_BASE_URLenv var to target staging / a local API dev server.
Describe alternatives you've considered
- A Go implementation (matching the repo's Python→Go migration direction) — but the MCP SDK is most mature in Python, this is auxiliary tooling rather than a core service, and
tools/datafixestablishes the Python-in-tools/precedent. - Leaving it to third-party/out-of-tree MCP wrappers — but a first-party server keeps the tool surface and endpoint contracts in sync with OSV itself.
Additional context
Happy to open a PR for this. Flagging up front per CONTRIBUTING: this would be an AI-assisted contribution and the PR will disclose that. I'll sign the CLA. Opening a PR alongside this issue for concreteness, but happy to iterate on scope/placement first.
- Ngôn ngữ chính
- Go
- Star
- 3k
- Fork
- 390
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 129
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/osv.dev
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
google/osv.dev#5824 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
worker to log more information for gitter internal server errorsCó thể làm lại được @ZedingZhang đã nhận 58 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google/osv.dev#5809 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Create repo purls for GIT ecosystem rangesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbacklog data quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
google/osv.dev#3807 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
data quality
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 22/100
google/osv.dev#6283 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của google/osv.dev
Issue tương tự
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
jordansmall/spindrift#6318 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Eyevinn/moqlivemock#166 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
JakeChampion/lang#14091 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
hyperledger/fabric-x-orderer#1409 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
get actions doesn't show the approval flag, and describe action shows it unformattedCó thể đã có người làm @kenokech đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày