fairbooks-grant-reporting
v0.2.0
Published
Fairbooks Grant Reporting: an MCP agent that maps grant deadlines, budget lines, outcomes and evidence from CSV exports into a draft report packet with gaps marked for a person: budget-vs-actual variance with explanation markers, spend-down projection, fu
Maintainers
Readme
Fairbooks Grant Reporting (fairbooks-grant-reporting)
Grant report prep from CSV exports: deadlines, budget pace, outcomes and evidence mapped into a draft packet with every gap marked. Submitting is a binding send: one human click.
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
Give Fairbooks Grant Reporting your grants (grant_id, funder, program, award_amount, period_start, period_end, report_due, report_type, status), budget lines (grant_id, line, budgeted, spent) and outcomes (grant_id, metric, target, actual, evidence; evidence paths are relative to the outcomes file). It:
- lists report deadlines: overdue, due soon (≤ 30 days), upcoming, later and submitted;
- checks each budget line for overspend, and for spending ahead of or behind the share of the grant period that has passed (
pace_tolerance, default 0.25); flags budget totals that differ from the award; - checks each outcome for a missing actual, a result below target, and evidence that is missing or not found;
- computes budget-vs-actual variance by line (
grants_variance): against the full budget for final reports or once the period has ended, otherwise against the share expected by now. A line whose variance is more thanvariance_pct(default 10%) and at leastvariance_amount(default 0) gets an[EXPLAIN VARIANCE — …]marker; anexplanationcolumn in your budget file is carried through but still marked for a person to check. It also projects spend at the current pace to the end of the period (projected_underspend/projected_overspend,underspend_pct, default 10%); - maps a funder template (
grants_template_check, andtemplateongrants_build_packet): a JSON file listing the funder's sections in order (each filled fromsummary,budget,variance,outcomes,evidence,deadlines, or left[TO WRITE]fornarrative/custom), word limits, the funder's own guidance text, required attachments (paths relative to the outcomes file) and an optional variance threshold. Missing required sections and attachments, and a template meant for another funder, are flagged. The template is schema-checked, so a typo fails with the exact JSON path (fairbooks-grant-reporting validate-config funder_template template.json). You write the template from the funder's instructions; Fairbooks Grant Reporting does not know any funder's rules; - builds a draft packet per grant:
report-draft.md(budget, variance and outcome tables, evidence references,[EXPLAIN]and[MISSING]markers; in template order when a template is given),checklist.mdandevidence-index.csv(with file hashes); - writes a deadline calendar (
grants_calendar):grant-deadlines.icswith each open report deadline and grant period end and reminders (default 30, 14, 7 and 1 days before), validated before it is written; - assembles an evidence pack (
grants_evidence_pack): a zip of one grant's draft packet, the evidence files it cites,variance.csvand amanifest.jsonwith SHA-256 hashes; the zip hash is written into the audit line.
The narrative section is left as [TO WRITE] for a person. Fairbooks Grant Reporting does not write claims about your program.
Install
npm install -g fairbooks-grant-reporting
fairbooks-grant-reporting demo # runs on the bundled fictional sample dataAs an MCP server
Claude Code
claude mcp add fairbooks-grant-reporting -- npx -y [email protected] mcp --root /path/to/your/exportsCursor / Claude Desktop / VS Code / Windsurf
{ "mcpServers": { "fairbooks-grant-reporting": { "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 |
|---|---|---|
| grants_deadlines | allow | Report deadlines by status |
| grants_review | allow | Budget pace, outcomes, evidence and open items per grant |
| grants_variance | allow | Budget-vs-actual variance by line, explanation flags, spend-down projection |
| grants_template_check | allow | Map a funder template onto each grant: filled, to write, missing |
| grants_calendar | allow | Write grant-deadlines.ics with reminders |
| grants_build_packet | ask (Auto-eligible) | Write draft packets to fairbooks-out/grants/packets/<grant_id> (optionally in template order) |
| grants_evidence_pack | ask (Auto-eligible) | Zip a packet, its evidence and a hash manifest |
| grants_request_submission | ask · one-click | After a named human approves, record a packet as approved to submit (warns about open markers) |
| funder_portal_submit | block | Listed so agents see the refusal. Fairbooks Grant Reporting never submits. |
Any other tool name is blocked. fairbooks_info shows the pinned model, mode, caps and every decision.
MCP prompt
grants_report_cycle (arguments grants, budget, outcomes, optional template, grant_id, as_of) walks a host model through deadlines, calendar, review, variance, template check, packet, evidence pack and the human submission click, and tells it not to write narrative or variance explanations itself.
Modes
- Review (
--mode review): read and report only. - Assist (default): the policy above.
askreturns anapproval_id; a person approves once withfairbooks-grant-reporting 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-grant-reporting kill).
grants_build_packet and grants_evidence_pack can go on Auto if you opt in. Submitting a report to a funder is a binding_send: it stays one-click even in Auto, and --auto grants_request_submission is refused. Submitting in a funder portal 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-grant-reporting tools
fairbooks-grant-reporting call grants_review '{"grants":"grants.csv","budget":"budget.csv","outcomes":"outcomes.csv"}'
fairbooks-grant-reporting 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 a grant management system, and it does not make you compliant with any funder or federal rule. It checks the figures and files you give it.
- It does not write your narrative or explain variances; it marks where a person must.
- It does not know any funder's template or rules. Templates are files you write from the funder's instructions.
- It never submits anything to a funder.
- 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-grant-reporting
