fairbooks-data-erasure-requests
v0.2.0
Published
Fairbooks Data Erasure Requests: an MCP agent for data-subject erasure requests. Maps where personal data lives across your exports, finds the subject, flags records you may have to keep and builds a checklist. Deleting personal data is always one human c
Maintainers
Readme
Fairbooks Data Erasure Requests (fairbooks-data-erasure-requests)
A data-subject erasure request workflow over your exports: where the person's data lives, what you may have to keep, and a checklist. Deleting is one human click; Fairbooks Data Erasure Requests never deletes.
Part of Fairbooks Machine domain agents: one agent, one process, nothing outside its lane. Built on fairbooks-core. MIT, Node ≥ 20, runs on your machine, no account or API key needed.
What it does
Point Fairbooks Data Erasure Requests at a folder of exports (CSV, JSON, JSONL) from your CRM, support desk, newsletter tool, billing and so on. It:
- maps which columns look like personal data (email, phone, name, address, birth date, IP address, government id, payment details, customer id);
- finds the requester's rows by email (case-insensitive), phone (last 10 digits) or customer id, and also in pseudonymised exports where the email or phone is stored as a SHA-256 or MD5 hash (ad audiences, ESP subscriber hashes). Output says which column matched and how, never the value;
- flags files that look like records you may have to retain (invoices, tax, payroll, orders, contracts);
- applies your own retention rules and legal holds (a JSON file you write) to the matched rows, holds first, and cites the rule or hold id for every row: on hold, retain until a date, period ended, date missing, or no rule;
- tracks request deadlines from the request log: due date from the response period you configure, overdue and due-soon requests first, optional
.icscalendar with reminders; - writes an evidence pack per request (JSON + self-contained HTML): exports searched with their SHA-256, rows found and how they matched, retention decisions with rule ids, approved deletion requests, what is kept and what is still open. The JSON's hash goes into the audit log line;
- builds a checklist: verify identity first, log the request with a response target (GDPR 30 days, CCPA/CPRA 45 days by default; confirm what applies to you), one step per file, processors and vendors, confirmation to the requester. Owner and evidence columns are blank.
Identifiers are masked in every output (j***@example.com); logs carry a hash key instead of the raw value.
Install
npm install -g fairbooks-data-erasure-requests
fairbooks-data-erasure-requests demo # runs on the bundled fictional sample dataAs an MCP server
Claude Code
claude mcp add fairbooks-data-erasure-requests -- npx -y [email protected] mcp --root /path/to/your/exportsCursor / Claude Desktop / VS Code / Windsurf
{ "mcpServers": { "fairbooks-data-erasure-requests": { "command": "npx", "args": ["-y", "[email protected]", "mcp", "--root", "/path/to/your/exports"] } } }--root is the only folder the tools can read or write. Paths outside it are refused.
Tools
| Tool | Policy | What it does |
|---|---|---|
| erasure_map_data | allow | Inventory personal-data columns and retention flags |
| erasure_find_subject | allow | Find the subject's rows; identifiers masked |
| erasure_build_checklist | allow | Write erasure-checklist.csv + erasure-request.md to fairbooks-out/erasure; with rules, retention steps cite your rule and hold ids |
| erasure_retention_check | allow | Apply your retention rules and legal holds to the matched rows; rule id per row |
| erasure_deadlines | allow | Request deadline tracker over requests.csv: request-deadlines.csv, optional .ics |
| erasure_evidence_pack | allow | evidence-<key>.json + .html for one request; hash recorded in the audit log |
| erasure_log_request | ask (Auto-eligible) | Add the request to requests.csv with a target date |
| erasure_request_deletion | ask · one-click | After a named human approves, record a deletion for one system's owner |
| erasure_delete_records | block | Listed so agents see the refusal. Fairbooks Data Erasure Requests never deletes or edits data. |
Any other tool name is blocked. fairbooks_info shows the pinned model, mode, caps and every decision.
Retention rules file
{
"response_periods": { "gdpr": 30, "ccpa": 45 },
"due_soon_days": 7,
"retention_rules": [
{ "id": "RET-INV-7Y", "record_type": "invoices", "file_pattern": "invoice", "date_column": "date", "keep_days": 2555, "action_after": "delete", "basis": "your note" }
],
"legal_holds": [ { "id": "HOLD-1", "file_pattern": "support-tickets", "until": "2027-06-30", "note": "open dispute" } ]
}file_pattern is plain text the export's path contains (case-insensitive). The file is checked against a schema; a typo such as keep_dayz fails with a JSON pointer. Check it first with fairbooks-data-erasure-requests validate-config retention_rules rules.json. The rules are yours: Fairbooks Data Erasure Requests applies them and cites them, it does not decide which rule or exemption applies.
MCP prompt
erasure_request_workflow walks the host model through one request: map, find, retention, log, checklist, deletion requests (each waits for a named person), deadlines and the evidence pack.
Modes
- Review (
--mode review): read and report only. - Assist (default): the policy above.
askreturns anapproval_id; a person approves once withfairbooks-data-erasure-requests approve <id> --as "Your Name". - Auto (
--mode auto --auto <tool,...>): off by default, opt-in per action, with step/spend caps (--max-steps,--max-spend) and a kill switch (fairbooks-data-erasure-requests kill).
erasure_log_request can go on Auto. Deleting personal data is delete_personal_data: it stays one-click even in Auto, and --auto erasure_request_deletion is refused. Deleting directly stays blocked.
Go-live, revoking access, deleting personal data, moving money, legally binding sends and production deploys always need a person's click, in every Fairbooks pack.
CLI
fairbooks-data-erasure-requests tools
fairbooks-data-erasure-requests call erasure_find_subject '{"dir":"exports","email":"[email protected]","ids":["C-101"]}'
fairbooks-data-erasure-requests eval # private evals on the bundled fixturesEvery call is written to .fairbooks/audit.jsonl (hash-chained JSONL; arguments stored as a hash). Read it with fairbooks-audit-evidence or npx -y -p fairbooks-core fairbooks-verify-log .fairbooks/audit.jsonl.
What it is not
- Not legal advice and not a privacy compliance platform. It does not decide whether an exemption applies or which deadline is yours.
- It only sees the exports you give it. Systems, backups and processors you did not export are not covered.
- Hashed matching covers SHA-256/MD5 of the lower-cased email and SHA-256 of common phone forms (last 10 digits, all digits,
+digits,+1+ 10 digits). Salted or keyed hashes, and other normalisations, will not match. - Deadlines come from the periods you configure (defaults: 30 days GDPR/UK GDPR, 45 days CCPA/CPRA). Extensions and pauses are not modelled.
- The evidence pack records what this tool saw and recorded. It is not a certification and does not prove deletion in the source system.
- Column detection is by name. A free-text field that holds an email will be found by the subject search but may not appear in the column inventory.
- Not fully autonomous: anything risky waits for a named person.
Data
Everything runs locally on files you choose. No network calls, no telemetry. The bundled fixtures are fictional.
License
MIT © 2026 Kurt Francisco. Source: https://github.com/fpavia111-creator/fairbooks-agents/tree/master/packages/fairbooks-data-erasure-requests
