finflow-mcp
Reads transaction notification emails from Gmail (read-only) to identify and process financial transactions.
Writes extracted transactions to a Google Sheets ledger, managing rows, updates, and deduplication.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@finflow-mcpHow much did I spend on groceries this month?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
finflow-mcp
Automatic personal finance tracker. It reads transaction notification emails from Gmail, extracts the numbers, and appends them to a Google Sheets ledger — on a schedule, without you opening anything.
finflow setup # locale, timezone, base currency
finflow auth # connect your own Google OAuth client
finflow sync # creates the ledger, writes the first rows
finflow daemon install # and then you can stop thinking about itfinflow status tells you whether it is still working.
Status: early development. The core is built and tested; it has not yet run for weeks against a real mailbox. See Honest limitations.
Two ways to run it
Autopilot (the point of the project). A per-OS scheduled job runs
finflow daemon run-once and exits — launchd on macOS, a systemd user timer on
Linux, Task Scheduler on Windows. There is no long-lived background process,
which removes every memory-leak and stale-token class of bug and survives reboots
for free.
MCP server. Connect it to an AI client (Claude Desktop, Claude Code) and ask about your spending, or drive a sync interactively. In this mode the server never calls an LLM — the connected client does the extraction and posts results back through the same validation and de-duplication the daemon uses.
// Claude Desktop config — check the current docs for the file location
{
"mcpServers": {
"finflow": { "command": "finflow-mcp" },
},
}Related MCP server: accounting-mcp-server
How an email becomes a row
Gmail search (short, language-agnostic query)
└─ client-side scoring against every keyword pack ← language support is free here
└─ sanitise: mask cards/accounts, strip OTPs, truncate
└─ extract
├─ sender template free, instant, offline, reproducible
├─ Claude (optional) opt-in, your own API key, cost-capped
└─ neither parked in needsExtraction — never guessed
└─ validate (Zod) → categorise → de-duplicate → SheetsExtraction is a strategy, so there is exactly one pipeline. The daemon and the MCP server differ only in which extractor is plugged in — "validation is identical on both paths" is a structural fact rather than something to keep re-checking.
Design commitments
Read-only against Gmail. Scopes are gmail.readonly and drive.file. No
modify, send or delete scope is ever requested, and drive.file cannot see any
file FinFlow did not create.
Integer money. Amounts are stored as integer minor units. There is no floating-point arithmetic anywhere on the ledger path, currency exponents are an explicit table (JPY is 0, KWD is 3), and an unknown currency is an error rather than an assumption of 2.
Ambiguity is refused, never guessed. Rp1.234 means different things in
different locales. When the text and the configured locale cannot settle it,
FinFlow reports PARSE_AMBIGUOUS instead of picking the likelier reading. In a
ledger, a wrong number recorded silently is worse than an email that fails loudly.
Dates are Temporal, not milliseconds. Month boundaries are computed as
PlainDate → startOfDay(timezone). March 2026 is 744 hours in Jakarta, 743 in
New York and 745 in Berlin, and the tests assert exactly that.
Language support is free where it can be. Month names come from CLDR via a
build-time codegen (72 languages, committed so runtime never depends on the
user's ICU build); number separators come from Intl. Keyword scoring runs
client-side, so adding a language costs nothing in API quota or query length.
Failures are visible. The daemon writes a heartbeat on every run — success or failure — and raises an OS notification once per failure streak, not once per failure. Silent failure is the worst possible outcome for an autopilot: you go on believing the ledger is complete while it quietly stops being so.
Nothing leaves the machine uninvited. Network egress is googleapis.com
only, plus api.anthropic.com if you explicitly enable the Claude extractor. In
that case only the sanitised body is sent — account numbers masked, one-time
codes removed, raw text never.
Idempotency
The scheduler runs hourly over a 48-hour overlap window, so every email is seen many times. Identity is deliberately split:
transactionId= hash of(source, sourceRef, occurrenceIndex)— which email, and it never changescontentHash= hash of the extracted values — what we read, and it may
Situation | What happens |
Same id, same hash | Already recorded → skip |
Same id, new hash | Re-read produced better values → update the row |
New id, known hash within ±3 days | Possibly the same payment via a second email → record and flag for review |
New id, new hash | Insert |
The second row is why the two hashes are separate. Combined, a re-read that produced any difference would get a new id, miss the lookup, and append a duplicate — which with an hourly daemon is not a rare edge case.
Deleting a row in the sheet by hand is respected: a short ring of processed email ids stops the next sync from helpfully putting it back.
Configuration
~/.finflow/config.json, validated on every load.
Key | Notes |
| Detected from |
| Totals are in this; other currencies are reported beside it, never converted |
| Optional override for banks that ignore your locale |
| The most effective filter there is, and the only one that behaves the same in every language |
| Claude extraction. Off by default, with an explicit consent step |
| Hard cap. Exceeding it stops the extractor, not the sync — templates keep working |
| Default 60, with ±5 minutes of jitter |
Secrets live in ~/.finflow/.env (0600), never in config.json.
Commands
Command | |
| Configure locale, timezone, currency, extraction |
| Connect Google (loopback + PKCE) |
| Read new emails and record them. A dry run writes nothing, not even the cursor |
| The scheduled job. |
| Is it still working? |
| Diagnose everything, including the 7-day OAuth trap |
Honest limitations
Parsing quality depends on sender templates, not on language. A BCA template does not help with Mandiri. The i18n work makes amounts and dates language-independent; it cannot make a bank's HTML layout universal. Expect the first week to lean on the Claude extractor if you enable it.
Not supported, by choice: non-positional CJK numerals (二万五千), Japanese-era and Hijri calendars, currency conversion, and month names that are ambiguous across languages without a narrowing locale (
listopadis November in Polish and October in Croatian). Each is reported, never guessed.You will occasionally need to re-authenticate — realistically only when you change your Google password, which revokes Gmail-scoped tokens and cannot be worked around.
Accuracy is not 100%. The
needs_reviewcolumn andextraction_confidenceexist so you can audit rather than trust blindly.
Threat model, briefly
Where secrets live |
|
What reaches logs | Everything passes through a redaction layer with two independent rules — by field name and by value shape. A test suite scans logger output for tokens, PANs and email bodies |
What reaches an external API | Nothing, unless you enable the Claude extractor. Then: the sanitised body only |
Blast radius if a token leaks | Read access to your Gmail and to the one spreadsheet FinFlow created. Revoke at myaccount.google.com/permissions |
What FinFlow cannot do | Send, modify or delete mail; read any other Drive file; move money |
Requirements
Node.js >= 20
Your own Google Cloud project — see docs/google-setup.md
Optional: an Anthropic API key, only if you enable the Claude extractor
Development
npm install
npm run typecheck && npm run lint && npm test
npm run gen:month-names # regenerate the CLDR month table (output is committed)License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenancePersonal expense tracker MCP server that enables tracking expenses, income, budgets, and savings goals through natural language.10MIT
- -license-quality-maintenanceA personal accounting MCP server that enables AI assistants to record and query financial transactions through natural language, supporting income/expense tracking, balance inquiry, and monthly summaries.
- Flicense-qualityBmaintenanceMCP server for personal finance management. Enables natural language expense logging, budgeting, recurring charge detection, and statement import with deterministic local calculations.
- Alicense-qualityBmaintenanceA production-grade MCP server for personal finance management, enabling AI agents to add, update, search expenses, manage budgets and credit cards, and generate financial reports.1MIT
Related MCP Connectors
TaxSort — Tollbooth-monetized MCP server for personal tax transaction classification
Hosted MCP server for Mini Accountant: invoices, expenses, customers, analytics, tax estimates.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yogiis/finflow-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server