fairbooks-saas-seats
v0.2.0
Published
Fairbooks SaaS Seats: an MCP agent that finds unused, idle, duplicate, leaver and over-tiered SaaS seats (including AI tools) in CSV/JSON exports and estimates the saving, timed to each contract renewal and notice window. Writes a review sheet, a renewal
Maintainers
Readme
Fairbooks SaaS Seats (fairbooks-saas-seats)
Find unused, idle, duplicate and over-tiered SaaS seats (AI tools included) and estimate the saving. Revoking is 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 SaaS Seats a seat export (app, user, email, tier, monthly_cost, last_active, premium_features_used, status; column names matched loosely) and, optionally, an HR roster (email, status). It flags:
- seats never used, or idle longer than
idle_days(default 60); - duplicate seats for the same person in the same app;
- leavers (terminated in HR) and people missing from the roster;
- premium tiers (Pro, Business, Enterprise, Team…) where premium features are marked unused.
Each seat gets a suggested action and an estimated monthly saving (a downgrade saves downgrade_ratio of the cost, default 0.5); seats with no cost are counted separately, never guessed. It writes a review sheet with blank reviewer columns.
Renewal-aware savings. Savings on an annual contract only land at renewal. Give Fairbooks SaaS Seats contract terms per app (in a seats-policy.json, or a contracts CSV with app, billing, renewal_date, notice_days, min_seats, owner) and it adds:
- an act-by date (renewal date minus notice days) and a prioritised Act first list, soonest deadline first;
est_saving_next_12m: the saving over the next 12 months, pro-rated by day from the renewal date (monthly billing counts fromas_of; a passed notice window moves the saving to the following renewal and flagsnotice_window_passed);- contract minimums (
min_seats): removals below the minimum are flaggedcontract_minimum_Nand not counted as savings; and a recommended seat count to true-down to at renewal; - per-app
idle_daysanddowngrade_ratiooverrides.
Also: a renewal calendar (renewals.ics, notice-due and renewal events with reminders), owner confirmation drafts (one Markdown draft per app owner, roster managers in Cc, keep/remove boxes; never sent), and a comparison of two exports (seats added and removed, waste resolved, new waste, seats still flagged since last time, cost changes, spend and waste change).
Exports it reads
Table inputs can be CSV, TSV, semicolon- or pipe-separated text, Excel .xlsx, JSON or JSONL. A file already in this agent's own columns is read as it is. The exports below are recognised by their column names and mapped onto those columns; dates become YYYY-MM-DD, amounts plain decimals (both decimal marks), and yes/no columns yes/no. Each result lists, under sources, which export was recognised, which columns were mapped, and any rows skipped or dates that could be read two ways.
Seat or licence export (arguments seats, previous)
| System | Export | Layout checked against vendor docs | |---|---|---| | Microsoft 365 usage reports | Active users report detail (CSV) | no | | Google Workspace Admin | Users > Download users (CSV) | no | | GitHub Copilot | Seat assignments API JSON (GET /orgs/{org}/copilot/billing/seats) | no | | Atlassian Administration | Directory > Users > Export users (CSV) | no |
HR roster (argument roster)
| System | Export | Layout checked against vendor docs | |---|---|---| | BambooHR | Employee report (CSV or Excel) | no | | Google Workspace Admin | Users > Download users (CSV) | no |
Columns named differently? Run npx fairbooks-saas-seats inspect <file> to see how a file is read (column names and shapes only, never values), then name your columns in fairbooks-sources.json in the root:
{ "files": { "exports/users.csv": { "columns": { "email": "Work E-mail" }, "date_order": "dmy" } } }Where a layout says "checked", its column names were compared with the vendor's documentation on that date. The other layouts were written from knowledge of the export and were not checked. None was tested against a live account. If a real export does not match, the result says which columns were missing; please report it.
Install
npm install -g fairbooks-saas-seats
fairbooks-saas-seats demo # runs on the bundled fictional sample dataAs an MCP server
Claude Code
claude mcp add fairbooks-saas-seats -- npx -y [email protected] mcp --root /path/to/your/exportsCursor / Claude Desktop / VS Code / Windsurf
{ "mcpServers": { "fairbooks-saas-seats": { "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 |
|---|---|---|
| seats_find_waste | allow | Flag waste, per seat and per app, with estimated savings |
| seats_write_review | allow | Write seat-review.csv, renewal-actions.csv and a summary to fairbooks-out/seats |
| seats_renewal_calendar | allow | Write renewals.ics (notice-due and renewal events) |
| seats_draft_confirmations | allow | Write owner confirmation drafts (Markdown) and drafts-index.csv; sends nothing |
| seats_compare_reviews | allow | Compare an earlier export with the current one |
| seats_request_downgrade | ask (Auto-eligible) | Record a downgrade request for the app admin |
| seats_request_revoke | ask · one-click | After a named human approves, record a revocation request for the app admin |
Any other tool name is blocked. fairbooks_info shows the pinned model, mode, caps and every decision. Report tools record the hash of what they wrote in the audit log (output_sha256).
Prompt
seats_seat_review (MCP prompt) walks a host model through the review: find waste, act-by order, compare with last time, write the sheet, calendar and owner drafts, then record only owner-confirmed changes. Arguments: seats (required), roster, policy, as_of.
Contract terms (seats-policy.json)
{
"idle_days": 60,
"default_owner": "[email protected]",
"apps": {
"Salesforce": { "billing": "annual", "renewal_date": "2027-03-01", "notice_days": 60, "min_seats": 1, "owner": "[email protected]" },
"Figma": { "billing": "monthly", "owner": "[email protected]", "idle_days": 30 }
}
}The file is checked against a JSON Schema before use; a typo fails with a JSON-pointer path (for example /apps/Zoom/billing must be one of "monthly", "annual"). Check it yourself with fairbooks-saas-seats validate-config seats-policy seats-policy.json.
Modes
- Review (
--mode review): read and report only. - Assist (default): the policy above.
askreturns anapproval_id; a person approves once withfairbooks-saas-seats 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-saas-seats kill).
seats_request_downgrade can go on Auto (--mode auto --auto seats_request_downgrade). Revoking a seat is revoke_access: it stays one-click even in Auto, and --auto seats_request_revoke is refused.
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-saas-seats tools
fairbooks-saas-seats call seats_find_waste '{"seats":"seats.csv","roster":"hr-roster.csv","idle_days":60}'
fairbooks-saas-seats call seats_find_waste '{"seats":"seats.csv","policy":"seats-policy.json","as_of":"2026-11-14"}'
fairbooks-saas-seats call seats_compare_reviews '{"previous":"seats-october.csv","seats":"seats.csv"}'
fairbooks-saas-seats 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 SaaS management platform. It connects to no app and changes no seat; an admin does that.
- Savings are estimates from your cost column. Renewal timing uses only the terms you give it; true-up clauses, tiered pricing, partial-term credits and price changes at renewal are not modelled. Without terms, savings are counted from
as_of. - Confirmation drafts are files for a person to review and send. Fairbooks SaaS Seats has no email or chat connection and sends nothing.
- No live SaaS admin connectors yet (planned once the shared connector layer exists); it reads exports only.
last_activeis only as good as the export it came from.- 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-saas-seats
