Skip to content

mizcausevic-dev/mcp-tool-card-summary

mcp-tool-card-summary

Fleet-analyze a directory of MCP Tool Cards. Counts by side-effect class, PII/secrets exposure, reversibility, human-approval-required; surfaces approval gaps (destructive tools that don't declare human_approval_required: true).

Status: v0.1.0 — Node 20/22 supported, library + CLI.

What it produces

Surface Why it matters
Counts by side-effect class How much of the fleet is read vs mutating vs external vs destructive — the fundamental risk surface
PII / secrets exposure histogram Tools that touch high-PII or read secret material need extra controls
Reversible / human-approval counts What fraction of the fleet has human-in-the-loop or undo
Approval gaps ⚠ Destructive tools where human_approval_required is false — the spec requires the conjunction; this surfaces violations

CLI

npx mcp-tool-card-summary <cards-dir> [--format json|markdown|summary]
                                      [--fail-on-gaps] [--out FILE]

<cards-dir> is a directory containing one Tool Card JSON file per tool (the shape produced by mcp-tool-card-generator).

Exit code:

  • 0 — clean fleet (or --fail-on-gaps not set)
  • 1 — approval gaps detected AND --fail-on-gaps is set
  • 2 — usage / I/O error

Drop it into your CI to fail on the first PR that introduces a destructive Tool Card without the matching human-approval declaration.

Library

import { summarize, toMarkdown, toSummary } from "mcp-tool-card-summary";

const report = summarize(cards); // cards: ToolCard[]
console.log(report.bySideEffect);            // { read, mutating, external, destructive }
console.log(report.approvalGaps);            // SummaryRow[]
console.log(toSummary(report));              // "3 cards · 1 destructive · 1 require human approval"
console.log(toMarkdown(report));             // GitHub-flavored report

Composes with

Develop

npm install
npm run lint && npm run typecheck && npm run coverage && npm run build
npm run demo

License

AGPL-3.0-or-later

About

Fleet-analyze a directory of MCP Tool Cards. Counts by side-effect class, PII/secrets exposure, reversibility, human-approval-required; surfaces approval gaps (destructive tools missing human_approval_required: true). Library + CLI.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors