cleanlib-mcp-server

v0.5.18
cleanlib-mcp-server Checked 1 hour ago Published 16 days ago

CleanLibrary MCP server — exposes verdict-aware supply-chain risk assessment as Model Context Protocol tools for AI agent workflows

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

cleanlib_fetch_verdict

DEPRECATED — use 'cleanlib_policy_decision' instead (same arguments, same behavior; this name is scheduled for removal, CLEANLIB-541). Fetch the CleanLibrary verdict for a package version. Returns the decision (ALLOW / DENY / WARN), severity (NONE / LOW / MEDIUM / HIGH / CRITICAL), composite_score, reasoning, and confidence. Queries a live CleanLibrary backend when CLEANLIB_ENDPOINT + (CLEANLIB_API_KEY or CLEANLIB_ENRICH_BEARER) are configured; otherwise returns bundled demo fixtures. v0.4.2 fail-closed: unknown packages and live-backend-unreachable cases return WARN, not ALLOW. Not to be co…

ParameterTypeDescription
ecosystem *stringPackage ecosystem
package *stringPackage name, in the ecosystem's canonical form. npm: 'lodash' or '@scope/name'. pypi: 'requests' (case and ./_/- differences are folded upstream). go: the full module path, 'github.com/spf13/cobra'.…
version *stringExact released version, in the ecosystem's canonical form — not a range. npm/pypi/maven/crates/nuget/rubygems: '4.17.21'. go: keep the module 'v' prefix, 'v1.0.0' not '1.0.0'. Ranges ('^4.17.0', '~1…
advisory_limitintegerOptional cap on the number of per-CVE advisory findings serialized into app_envelope, highest-severity first. The decision, severity, composite_score, suggested actions and attestation are NEVER affec…
policystringOptional organization policy name to evaluate under, e.g. 'strict-ci'. Call cleanlib_policies first to discover valid names. Omit to use the organization default. The result's applied_policy reports w…

cleanlib_policy_decision

Fetch the CleanLibrary POLICY decision for a package version. Returns the decision (ALLOW / DENY / WARN), severity (NONE / LOW / MEDIUM / HIGH / CRITICAL), composite_score, reasoning, and confidence. Queries a live CleanLibrary backend when CLEANLIB_ENDPOINT + (CLEANLIB_API_KEY or CLEANLIB_ENRICH_BEARER) are configured; otherwise returns bundled demo fixtures. Fail-closed: unknown packages and live-backend-unreachable cases return WARN, not ALLOW. CLEANLIB-541: this is the canonical replacement for the deprecated 'cleanlib_fetch_verdict' name — same arguments, same behavior, clearer name. No…

ParameterTypeDescription
ecosystem *stringPackage ecosystem
package *stringPackage name, in the ecosystem's canonical form. npm: 'lodash' or '@scope/name'. pypi: 'requests' (case and ./_/- differences are folded upstream). go: the full module path, 'github.com/spf13/cobra'.…
version *stringExact released version, in the ecosystem's canonical form — not a range. npm/pypi/maven/crates/nuget/rubygems: '4.17.21'. go: keep the module 'v' prefix, 'v1.0.0' not '1.0.0'. Ranges ('^4.17.0', '~1…
advisory_limitintegerOptional cap on the number of per-CVE advisory findings serialized into app_envelope, highest-severity first. The decision, severity, composite_score, suggested actions and attestation are NEVER affec…
policystringOptional organization policy name to evaluate under, e.g. 'strict-ci'. Call cleanlib_policies first to discover valid names. Omit to use the organization default. The result's applied_policy reports w…

cleanlib_health_check

End-to-end health for every plane the tools depend on, AND the App's full capability matrix. Probes the App's public /health for reachability and the full body — status/service/version/commit_sha, the backend honesty block (which substrate each subsystem is actually wired to — vector_client, cdp, signer, resolver_index, policy_overlay_loaded, audit_backend), the compatibility block (api_versions + per-feature flags), and BOTH ecosystem lists (ecosystems_mounted, the verdict plane, vs ecosystems_enriched, the advisory plane — they differ). Then, separately, authenticates against each cred…

cleanlib_risk_accept

CLEANLIB-1113: create a REAL, server-side risk-acceptance via POST /v1/risk-accept — this is a durable policy exception recorded by the CleanLibrary App, NOT a local/client-side override. Use it when 'cleanlib_policy_decision' (or the deprecated 'cleanlib_fetch_verdict') returns DENY and the coordinate is blocked pending risk-acceptance (the App responds with 403 + x-cleanlibrary-reason: RISK_ACCEPTANCE_REQUIRED). Requires CLEANLIB_ENDPOINT + CLEANLIB_API_KEY (or CLEANLIB_ENRICH_BEARER) to be configured. If 'verdict_id' is omitted, the current verdict is fetched first and its verdict_id is u…

ParameterTypeDescription
ecosystem *stringPackage ecosystem
justification *stringHuman-readable reason this risk is being accepted. Recorded verbatim on the server-side acceptance record.
package *stringPackage name, in the ecosystem's canonical form.
version *stringExact released version, in the ecosystem's canonical form. CLEANLIB-1274: a version RANGE is refused — '^4.17.0', '~4.17.0', '4.17.x', '4.*', '1.0 - 2.0', 'a || b', '[1.0,2.0)', 'latest'. A risk-acc…
expires_atstringOptional ISO 8601 timestamp after which the acceptance no longer applies. Omit for an acceptance that does not expire.
verdict_idstringThe verdict ULID this acceptance applies to. If omitted, the current verdict is fetched first and its verdict_id is used. Must be a valid ULID or the App rejects the request with 'verdict_id must be a…

cleanlib_risk_accept_list

CLEANLIB-1258: list the organization's risk-acceptance register via GET /v1/risk-accept. Use this to answer 'what policy exceptions are we carrying?' and to find the rule_id needed by 'cleanlib_risk_accept_get' / 'cleanlib_risk_accept_revoke'. Returns rule_id, match_pattern, acknowledged_by/at, justification and expires_at for each. NOTE: the App returns ACTIVE acceptances only — a revoked record is filtered out server-side and cannot be listed, so an empty result means 'none active', NOT 'none ever'. Requires CLEANLIB_ENDPOINT + CLEANLIB_API_KEY (or CLEANLIB_ENRICH_BEARER).

cleanlib_risk_accept_get

CLEANLIB-1258: read ONE risk-acceptance by rule_id via GET /v1/risk-accept/{rule_id}. Returns the full record including the 'revoked' block when the acceptance has been revoked — this is the ONLY way to reach a revoked record, since 'cleanlib_risk_accept_list' returns active ones only. Reports a clear not-found result if no acceptance carries that rule_id. Requires CLEANLIB_ENDPOINT + CLEANLIB_API_KEY (or CLEANLIB_ENRICH_BEARER).

ParameterTypeDescription
rule_id *stringThe acceptance's rule_id, as returned by cleanlib_risk_accept (on create) or cleanlib_risk_accept_list. Example: 'risk_accept_01M45HPXB93P59MPPX18J4WHPB'.

cleanlib_risk_accept_revoke

CLEANLIB-1258: REVOKE a risk-acceptance via DELETE /v1/risk-accept/{rule_id}. This withdraws a durable policy exception — after it, the coordinate is governed by policy again and will block if it was blocking before. The revoke is a soft delete and is idempotent: revoking an already-revoked acceptance succeeds and returns the ORIGINAL revoked_at. 'reason' is REQUIRED and must not be blank — a revocation is itself an audited action and is recorded verbatim. Requires CLEANLIB_ENDPOINT + CLEANLIB_API_KEY (or CLEANLIB_ENRICH_BEARER).

ParameterTypeDescription
reason *stringWhy the exception is being withdrawn. Required and non-blank; recorded verbatim on the audit record.
rule_id *stringThe acceptance's rule_id, as returned by cleanlib_risk_accept or cleanlib_risk_accept_list.

cleanlib_remediation

Returns the CleanLibrary sparse remediation composite for a library. MEASURED COVERAGE 2026-09-22, 8 ecosystems: fix 7/8, recommended_version 6/8, fix_trust 1/8, reachability 1/8. The upstream_lag, blast_radius and deadline blocks were NOT returned for ANY of the 8, so do not select this tool for those. Each block carries availability + as_of metadata. Use when the user asks 'how do I upgrade X' or 'what is the fix for X'.

ParameterTypeDescription
ecosystem *stringPackage ecosystem. CLEANLIB-917: aligned with the cleanlib-enrich plane this tool actually queries (11 ecosystems incl. alpine | debian | ubuntu | composer), not with cleanlib_fetch_verdict's narrower…
library *stringPackage name (e.g., 'lodash', 'log4j-core')

cleanlib_advisories

Returns deduped GHSA / vulnerability advisory rows for a library (cleanlib-enrich /advisories). Each row carries cve_id, summary, severity, ghsa_id, epss_score, kev_flag. Rows are collapsed only when they are the same branch (cve_id + fixed_version + severity + KEV), with affected ranges unioned, so distinct malicious branches under one CVE are never hidden (CLEANLIB-584). Use when the user asks 'what vulnerabilities are known on X' / 'GHSA advisories for X'.

ParameterTypeDescription
ecosystem *stringPackage ecosystem, lowercase (npm | pypi | go | maven | crates | nuget | rubygems | composer | alpine | debian | ubuntu)
library *stringPackage name (e.g., 'lodash', 'django')

cleanlib_exploitability

Returns the CleanLibrary fused exploitability block for a CVE (cleanlib-enrich /exploitability) — KEV flag + EPSS percentile + exploit_risk_score (0-100) + exploitation_likelihood (CRITICAL/HIGH/MEDIUM/LOW) + availability map. This is the golden surface; prefer it over the raw /kev or /epss endpoints when answering 'how exploitable is CVE-X' questions.

ParameterTypeDescription
cve *stringCanonical CVE identifier (e.g., 'CVE-2021-44228')

cleanlib_epss

Returns the raw EPSS (Exploit Prediction Scoring System) row for a CVE (cleanlib-enrich /epss) — score, percentile, as_of, availability. Reserve for detail-pane queries; prefer cleanlib_exploitability for general triage (already fuses EPSS + KEV into a single golden block).

ParameterTypeDescription
cve *stringCanonical CVE identifier (e.g., 'CVE-2021-44228')

cleanlib_kev

Returns the KEV (CISA Known Exploited Vulnerabilities) row for a CVE — in_kev flag, date_added, ransomware flag, availability. NOTE: due_date is NOT returned here — the upstream /api/v1/kev endpoint is 410-deprecated and the /api/v1/exploitability fallback this tool uses does not carry it; use cleanlib_kev_package for due_date. v0.5.0: upstream /api/v1/kev/:cve is 410-deprecated by Tricorder; this tool auto-fallbacks to /api/v1/exploitability/:cve and re-projects the response to the KEV shape. For new code, prefer cleanlib_exploitability (CVE-keyed) or cleanlib_kev_package (pkg-keyed rollu…

ParameterTypeDescription
cve *stringCanonical CVE identifier (e.g., 'CVE-2021-44228')

cleanlib_cve_enrich

Returns the full single-call CVE enrichment profile (fused KEV + EPSS + advisories + exploitability for one CVE) from cleanlib-enrich /cve-enrich. Gated on Tricorder Vector IMPL v1.5.0 — until that lands, returns a typed CveEnrichNotAvailable response so the agent can fall back to cleanlib_exploitability + cleanlib_epss + cleanlib_kev + cleanlib_advisories. Activation: set CLEANLIB_CVE_ENRICH_ENABLED=1 once /cve-enrich is live.

ParameterTypeDescription
cve *stringCanonical CVE identifier (e.g., 'CVE-2021-44228')
ecosystemstringOptional ecosystem context, lowercase (npm | pypi | go | maven | crates | nuget | rubygems | composer | alpine | debian | ubuntu)
librarystringOptional library context (e.g., 'lodash')

cleanlib_enrich_package

Returns the consolidated CleanLibrary intelligence block for a package (cleanlib-enrich-api v1.8.0 /api/v1/enrich/:eco/:pkg). MEASURED COVERAGE 2026-09-22, all 11 ecosystems: vulnerability 11/11, remediation 11/11, risk_join 9/11. The vector_verdict, commit_intel and upstream_fix axes were NOT returned for ANY of the 11, so do not select this tool for those - an absent axis here does not distinguish 'no data for this package' from 'this axis is never populated'. Axes that do not apply are omitted (gap-tolerant). Prefer this over chaining cleanlib_advisories + cleanlib_remediation for triage. D…

ParameterTypeDescription
ecosystem *stringPackage ecosystem, lowercase (npm | pypi | go | maven | crates | nuget | rubygems | composer | alpine | debian | ubuntu)
package *stringPackage name (e.g., 'lodash', 'org.apache.logging.log4j:log4j-core', 'github.com/spf13/cobra'). URL-encoding is automatic.
advisory_limitintegerOptional cap on the number of (deduplicated) CVE advisories returned, highest-severity first. Advisories are always deduplicated by CVE id; use this to further bound the payload for context-limited ca…

cleanlib_epss_package

Returns the package-keyed EPSS (Exploit Prediction Scoring System) rollup for a package — aggregates per-CVE EPSS scores into {cve_count, max_score, max_percentile} + the per-CVE breakdown sorted DESC by score (cleanlib-enrich-api v1.8.0 /api/v1/epss/:eco/:pkg). Use when the user asks 'what's the exploit-likelihood picture for X' / 'how exploit-prone is X overall'. Reserve cleanlib_epss for CVE-keyed detail-pane queries.

ParameterTypeDescription
ecosystem *stringPackage ecosystem, lowercase (npm | pypi | go | maven | crates | nuget | rubygems | composer | alpine | debian | ubuntu)
package *stringPackage name. URL-encoding is automatic.

cleanlib_kev_package

Returns the package-keyed CISA KEV (Known Exploited Vulnerabilities) rollup for a package — aggregates KEV entries over the package's CVE list (cleanlib-enrich-api v1.8.0 /api/v1/kev/:eco/:pkg). Surfaces kev_count, has_ransomware_use, earliest/latest date_added, and the per-CVE breakdown with vendor + required_action. Use when the user asks 'is X actively exploited' / 'does X have CISA-listed CVEs'. Canonical replacement for the deprecated CVE-keyed /kev/:cve.

ParameterTypeDescription
ecosystem *stringPackage ecosystem, lowercase (npm | pypi | go | maven | crates | nuget | rubygems | composer | alpine | debian | ubuntu)
package *stringPackage name. URL-encoding is automatic.

cleanlib_vector_verdict

DEPRECATED — use 'cleanlib_triage_verdict' instead (same arguments, same behavior; this name is scheduled for removal, CLEANLIB-541). Returns the Tricorder Vector triage verdict + rich-data axes for a package (cleanlib-enrich-api v1.8.0 /api/v1/vector/:eco/:pkg). Verdict states: CONFIRMED | LIKELY | UNCERTAIN. MEASURED COVERAGE 2026-09-22, 11 ecosystems: package_level_triage 6/11, recommended_version 6/11, package_risk 1/11, repo_health 1/11, reachability 0/11 (NEVER returned). maven, composer, alpine, debian and ubuntu return not_found outright. COVERAGE: not limited to Alpine - real non-Al…

ParameterTypeDescription
ecosystem *stringPackage ecosystem, lowercase (npm | pypi | go | maven | crates | nuget | rubygems | composer | alpine | debian | ubuntu)
package *stringPackage name. URL-encoding is automatic.

cleanlib_triage_verdict

Returns the Tricorder Vector triage verdict + rich-data axes for a package (cleanlib-enrich-api v1.8.0 /api/v1/vector/:eco/:pkg). Verdict states: CONFIRMED | LIKELY | UNCERTAIN. MEASURED COVERAGE 2026-09-22, 11 ecosystems: package_level_triage 6/11, recommended_version 6/11, package_risk 1/11, repo_health 1/11, reachability 0/11 (NEVER returned). maven, composer, alpine, debian and ubuntu return not_found outright. COVERAGE: not limited to Alpine - real non-Alpine packages return genuine CONFIRMED-malicious verdicts with full AST evidence, but coverage is sparse and not fully characterized. Wh…

ParameterTypeDescription
ecosystem *stringPackage ecosystem, lowercase (npm | pypi | go | maven | crates | nuget | rubygems | composer | alpine | debian | ubuntu)
package *stringPackage name. URL-encoding is automatic.

cleanlib_exploitability_bulk

Batch CVE exploitability lookups (cleanlib-enrich-api v1.8.0 POST /api/v1/exploitability/bulk). Accepts up to 200 CVE IDs per call; returns the fused exploitability block (in_kev + known_ransomware_use + EPSS + exploit_risk_score + availability) for each. Use for CI/CD scan pipelines that need to triage a list of CVEs in a single round-trip.

ParameterTypeDescription
cves *arrayList of CVE IDs (e.g., ['CVE-2021-44228', 'CVE-2022-22965']). Max 200 per call.

cleanlib_packages_check_bulk

Batch package check — returns per-package advisories (deduped CVE rows with severity/KEV) plus a risk_join rollup, in a single round-trip (cleanlib-enrich-api v1.8.0 POST /api/v1/bulk/packages/check). CLEANLIB-596: despite the name, this endpoint does NOT return verdict or remediation blocks (only advisories + risk_join) — use cleanlib_enrich_package or cleanlib_fetch_verdict for those. It also does not version-scope (see the `version` field note) and its risk_join rollup has been observed under-reporting KEV/severity for individual CVEs — prefer each result's `advisory_derived` block (c…

ParameterTypeDescription
packages *arrayList of package coordinates to check. A manifest up to 2000 packages is accepted and split into batches of 100 internally — most real manifests (500-1000 packages) fit well under this with headroom.…
advisory_limitintegerOptional per-package cap on the number of DISTINCT CVEs returned, highest-severity first (then highest CVSS). Advisories are deduplicated per CVE id AND fix branch: one CVE fixed in both 0.2.x and 1.2…

cleanlib_policy_decision_bulk

CLEANLIB-1423: get CleanLibrary policy decisions for MANY packages in one call (POST /v1/scan) — the BULK form of 'cleanlib_policy_decision', and the equivalent of `cleanlib scan`. Use this to gate a whole project: 'is my pyproject.toml safe to install?', 'scan my package.json', 'which of these 40 packages are blocked?'. Prefer this over calling cleanlib_fetch_verdict in a loop — one call instead of N, and N round trips is the thing this tool exists to replace. Pass 'manifest_path' to scan a project file: the server reads the manifest AND its sibling lockfile (package-lock.json, poetry.loc…

ParameterTypeDescription
evidence_rowsintegerHow many blocking rows get full CVE evidence attached (default 10, 0 = decisions only). Every package is always decided and counted; this only bounds how much evidence is serialized, because one high-…
include_transitivebooleanWith 'manifest_path': also scan lockfile entries the manifest does not declare. Default true — on a real project these are most of the dependency graph, and scanning only direct dependencies reports…
manifest_pathstringPath to a manifest or lockfile on THIS machine, e.g. './pyproject.toml', '/repo/package.json', 'go.mod'. Recognised: package.json, requirements.txt, pyproject.toml, Cargo.toml, go.mod, pom.xml, compos…
packagesarrayExplicit coordinates, when there is no file to point at. Mutually exclusive with 'manifest_path'.
policystringOptional organization policy name to gate against. Call cleanlib_policies to discover valid names. Omit to use the organization default. An unknown name aborts the whole scan rather than marking every…

cleanlib_audit

CLEANLIB-1409: read the organization's policy-decision audit log (GET /v1/audit, WORM-GCS backed). Use this to answer 'what did we block this week?', 'show me every DENY in go', 'was this package ever evaluated?'. Each record carries ecosystem, package_name, package_version, policy_decision (ALLOW/WARN/INSUFFICIENT/DENY), verdict_source, policy_rule_id_matched, cve_ids, on_kev, on_ransomware and reasoning. SCOPE — this log records POLICY EVALUATIONS ONLY, never package downloads (CLEANLIB-1397): per_route shows only the verdict routes and bytes_served is 0 on every row, so this CANNOT answer…

ParameterTypeDescription
decisionstringFilter by policy decision — ALLOW, WARN, INSUFFICIENT or DENY (case-insensitive). Passed through to the server unmodified; an unknown value is rejected by the App with a 400 naming the values it acc…
ecosystemstringFilter by ecosystem, lowercase (npm | pypi | go | maven | crates | nuget | rubygems | composer). The audit route serves the verdict plane only — alpine/debian/ubuntu are rejected by the App.
limitintegerHow many records to RENDER (default 20, max 500, 0 = summary only). This is a display cap applied AFTER the server answers — it does NOT narrow the query and does NOT change the counts in the summar…
policystringOptional organization policy name to scope this read to. Call cleanlib_policies to discover valid names. Omit to use the organization default. Letters, digits, '_' and '-' only, max 128 characters.
sincestringLower bound on the window, RFC 3339 (e.g. '2026-11-01T00:00:00Z'). WARNING: the App does NOT validate this — an unparseable value returns HTTP 200 with the full unfiltered newest-500 rather than an…
untilstringUpper bound on the window, RFC 3339. This is the ONLY way to page past the App's 500-record cap: set it to the oldest request_at you have already seen. Same no-validation warning as 'since'.

cleanlib_policies

List the organization's CleanLibrary policies (GET /v1/policies): names, versions, and which one is the default. Call this BEFORE passing a 'policy' argument to cleanlib_policy_decision, cleanlib_policy_decision_bulk or cleanlib_audit, so you use a name that exists. Returns identity only — never the policy rules. An empty list is not an error: it means the organization has no policies and the platform baseline applies. Requires CLEANLIB_ENDPOINT + CLEANLIB_API_KEY (or CLEANLIB_ENRICH_BEARER).