Part of #273. Pilot P2, item K (MCP). Stacked on the evidence-pack PR.
Why
breakpilot's document service pulls a target's evidence over MCP. It had no way to find the targets, and no SBOM document or CVE list to pull.
What
New tools:
list_targets: id, name, type, artifact kinds and detected type. The record is redacted before anything is read from it, so no credential can leave.
get_scan_results: a target's scan runs, newest first (default 10, max 50).
get_sbom: the whole SBOM as one CycloneDX 1.5 (default) or SPDX 2.3 document, built by the same code as the API export. sbom_docs moves to compliance_core::sbom_docs for that.
list_cves: the target's CVE alerts, highest CVSS first.
get_control_mapping: the CRA Annex I mapping (OSCAL). oscal_assessment stays for existing clients.
Shared collect / json_result / db_error helpers for the tools.
The server instructions now say to start with list_targets; the MCP docs are updated.
Token expiry, per-call audit and entitlement/ladder checks.
Hiding runtime-only tools in source_only deployments.
Updating the §6 list in Collectives.
Verification
Unit tests: the summary never carries a credential; parameter parsing.
the_contract_tools_answer_for_a_target runs the four tools against a real tenant database (MongoDB; skips without it): target listed, SPDX document with the component, the CVE, and empty scan runs.
Part of #273. Pilot P2, item K (MCP). **Stacked on the evidence-pack PR.**
## Why
breakpilot's document service pulls a target's evidence over MCP. It had no way to find the targets, and no SBOM document or CVE list to pull.
## What
- New tools:
- **`list_targets`**: id, name, type, artifact kinds and detected type. The record is redacted before anything is read from it, so no credential can leave.
- **`get_scan_results`**: a target's scan runs, newest first (default 10, max 50).
- **`get_sbom`**: the whole SBOM as one CycloneDX 1.5 (default) or SPDX 2.3 document, built by the same code as the API export. `sbom_docs` moves to `compliance_core::sbom_docs` for that.
- **`list_cves`**: the target's CVE alerts, highest CVSS first.
- **`get_control_mapping`**: the CRA Annex I mapping (OSCAL). `oscal_assessment` stays for existing clients.
- Shared `collect` / `json_result` / `db_error` helpers for the tools.
- The server instructions now say to start with `list_targets`; the MCP docs are updated.
## Not in this PR (keeps #273 open)
- `run_scan`: the MCP process cannot start scans.
- Token expiry, per-call audit and entitlement/ladder checks.
- Hiding runtime-only tools in `source_only` deployments.
- Updating the §6 list in Collectives.
## Verification
- Unit tests: the summary never carries a credential; parameter parsing.
- `the_contract_tools_answer_for_a_target` runs the four tools against a real tenant database (MongoDB; skips without it): target listed, SPDX document with the component, the CVE, and empty scan runs.
- 37 MCP tests pass; clippy with the CI flags; fmt.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
breakpilot's document service pulls a target's evidence over MCP. It had
no way to find the targets, and no SBOM document or CVE list to pull.
- list_targets: id, name, type, artifact kinds and detected type (no
credential leaves: the record is redacted first).
- get_scan_results: a target's scan runs, newest first.
- get_sbom: the whole SBOM as one CycloneDX 1.5 or SPDX 2.3 document, built
by the same code as the agent's export (moved to compliance_core::sbom_docs).
- list_cves: the target's CVE alerts, highest CVSS first.
- get_control_mapping: the CRA Annex I mapping (OSCAL assessment results);
oscal_assessment stays for existing clients.
- Shared cursor/JSON helpers for the tools; the server's instructions say
to start with list_targets.
Not in this change (remaining in #273): run_scan (the MCP process cannot
start scans), token expiry, per-call audit and entitlement checks, and
hiding runtime-only tools in source-only deployments.
Tests: the summary never carries a credential; parameters; and the four
tools against a real tenant database (skips without MongoDB). Docs: the
MCP tool tables.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #273. Pilot P2, item K (MCP). Stacked on the evidence-pack PR.
Why
breakpilot's document service pulls a target's evidence over MCP. It had no way to find the targets, and no SBOM document or CVE list to pull.
What
list_targets: id, name, type, artifact kinds and detected type. The record is redacted before anything is read from it, so no credential can leave.get_scan_results: a target's scan runs, newest first (default 10, max 50).get_sbom: the whole SBOM as one CycloneDX 1.5 (default) or SPDX 2.3 document, built by the same code as the API export.sbom_docsmoves tocompliance_core::sbom_docsfor that.list_cves: the target's CVE alerts, highest CVSS first.get_control_mapping: the CRA Annex I mapping (OSCAL).oscal_assessmentstays for existing clients.collect/json_result/db_errorhelpers for the tools.list_targets; the MCP docs are updated.Not in this PR (keeps #273 open)
run_scan: the MCP process cannot start scans.source_onlydeployments.Verification
the_contract_tools_answer_for_a_targetruns the four tools against a real tenant database (MongoDB; skips without it): target listed, SPDX document with the component, the CVE, and empty scan runs.🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
b821ad8ce6to9cd4ba8b1a