Personal Expense Categorizer
Click on "Deploy 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., "@Personal Expense Categorizer Categorize my bank CSV and summarize spending by category."
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.
Personal Expense Categorizer
A Bob Skill + MCP server that reads CSV bank exports and tags every transaction with a category. It runs entirely on your machine: no network calls, no accounts, no API keys.
Auto-detects bank CSV layouts (delimiter, header row, date order, debit/credit columns, sign convention)
Tags each transaction with category, kind (expense / income / transfer) and merchant, and tells you which rule matched
Summarizes spending by category and month; finds subscriptions and other recurring charges
Learns: confirm a merchant once and it is categorized correctly from then on
Exports a clean categorized CSV
Design details: docs/ARCHITECTURE.md
How it works
flowchart LR
U[You] <--> B[Bob + Skill]
B -- MCP stdio --> M[MCP server]
M --> F[(Bank CSV)]
M <--> R[(Your rules.json)]The skill (.bob/skills/personal-expense-categorizer/SKILL.md) guides the conversation: categorize, ask you about unknown merchants in one batch, save your answers, report. The MCP server does the deterministic work: parsing, matching, math, file access.
Related MCP server: local-budget
Install
Requires Node.js 20 or newer.
git clone <your-repo-url> personal-expense-categorizer
cd personal-expense-categorizer
npm install
npm run build
npm test # builds and runs 27 testsRegister the MCP server in Bob
Add to your workspace or global mcp.json (also in examples/mcp.json), using the
absolute path to this checkout:
{
"mcpServers": {
"personal-expense-categorizer": {
"command": "node",
"args": ["/absolute/path/to/personal-expense-categorizer/build/src/index.js"]
}
}
}For a workspace config opened on this repo, "${workspaceFolder}/build/src/index.js" also works.
Bob reconnects automatically when the file is saved.
Install the skill
The skill lives at .bob/skills/personal-expense-categorizer/. It is picked up automatically when this
repo is your workspace. To use it in every workspace, copy the folder:
mkdir -p ~/.bob/skills
cp -R .bob/skills/personal-expense-categorizer ~/.bob/skills/Start a new task afterwards so Bob loads it.
Usage
Try it on the bundled fixtures. Ask Bob:
Categorize
/absolute/path/to/test-data/sample-checking-us.csvand show me a spending summary.
Expected shape of the result for that file:
Period | 2025-01-02 to 2025-03-28 |
Income | 9,600.00 |
Expenses | 5,765.63 (transfers of 900.00 excluded) |
Largest category | Housing, 4,350.00 (75.45%) |
Uncategorized | 2 rows ( |
Recurring | Rent, PG&E, Shell, Planet Fitness, Netflix, Spotify |
Bob will then ask what category MYSTERY VENDOR LLC belongs to, save the rule, and the next run shows 0 uncategorized.
Other prompts:
"Which of my subscriptions are recurring, and what do they cost per month?"
"Export the categorized transactions next to the original file."
"This bank writes dates day-first. Re-run it."
MCP tools
Tool | What it does |
| Parse and tag all rows. |
| Totals, by category with share, by month, uncategorized total |
| Weekly, monthly and yearly repeats with next expected date |
| Categories, kinds and rule counts; shows your rules file path |
| Save |
| Write |
Every parsing tool accepts these options when auto-detection needs help:
Option | Values |
|
|
|
|
|
|
Supported CSV shapes
Feature | Supported |
Delimiters | comma, semicolon, tab |
Amount columns | single signed |
Date formats |
|
Money formats |
|
Quirks | BOM, CRLF, quoted fields with commas, lines of account info above the header |
Not supported yet: PDF, OFX/QFX, XLSX, live bank connections.
Customizing categories
Defaults are in config/default-categories.json. Your own rules are saved to
~/.personal-expense-categorizer/rules.json (override with the EXPENSE_RULES_PATH environment variable) and
always take precedence:
{
"categories": { "Pets": "expense" },
"rules": [
{ "category": "Pets", "keyword": "petco" },
{ "category": "Dining", "keyword": "blue bottle" }
]
}Matching is case- and punctuation-insensitive, on whole words. The longest matching keyword wins.
Privacy and safety
Local only: the server contains no network code and sends nothing anywhere.
The server reads only
.csv,.tsvor.txtfiles up to 10 MB (checked again after resolving symlinks), and only when a tool call names them.Set
EXPENSE_ALLOWED_DIRS(e.g./Users/you/Downloads, multiple folders separated by:) to restrict all reads and writes to those folders. Recommended; add it underenvin yourmcp.json.Export never overwrites unless you say so, and even then only replaces files this server exported earlier. It also neutralizes spreadsheet formula injection.
rules.jsonis validated on load and saved with owner-only permissions (600)..gitignoreblocks bank-export formats,.env.*andrules.json, except the five synthetictest-data/files. Do not commit real statements.See SECURITY.md for the threat model and how to report a vulnerability.
Your Bob client may send tool results to its model provider. Tool results include transaction descriptions and amounts, so use a provider you are comfortable with for financial data.
Project layout
.bob/skills/personal-expense-categorizer/SKILL.md conversation workflow
src/ index.ts (tools) | service.ts | parser.ts | csv.ts | rules.ts | analysis.ts | types.ts
config/ default-categories.json
test-data/ 5 synthetic CSV fixtures
tests/ unit + end-to-end MCP tests
docs/ARCHITECTURE.md
examples/mcp.jsonDevelopment
npm run build # tsc -> build/
npm test # build + node:test (unit + stdio e2e)
npm start # run the server on stdio (waits for an MCP client)Troubleshooting
Symptom | Fix |
Tools do not appear in Bob | Check the absolute path in |
"Could not find a header row" | Pass |
Dates look swapped | Pass |
Spending shows as income | Pass |
"Refusing to read" | The file must end in |
Skill not listed | Start a new task; confirm the folder name is exactly |
License
MIT, see LICENSE.
Available Tools
6 toolsadd_category_ruleAIdempotent
Teach the categorizer: transactions whose description contains the keyword will be assigned the category. Saved to the user's local rules file and applied on the next call. Only call after the user has confirmed the mapping.
Inputs: keyword (required), category (required), kind.
categorize_transactionsARead-only
Parse a CSV bank export and tag every transaction with a category, kind (expense/income/transfer), merchant and the rule that matched. Returns detected format, warnings and per-category counts. Set only_uncategorized to review what rules missed.
Inputs: file_path (required), limit, column_map, date_format, +2 more.
export_categorized_csvADestructive
Write the categorized transactions to a new CSV file (id,date,description,merchant,amount,category,kind,source). Refuses to overwrite an existing file unless overwrite is true, and even then only replaces files this tool previously exported. Ask the user before setting overwrite.
Inputs: file_path (required), output_path (required), overwrite, column_map, +2 more.
find_recurring_chargesBRead-only
Detect subscriptions and other recurring charges (weekly, monthly, yearly) with typical amount and next expected date.
Inputs: file_path (required), column_map, date_format, amount_convention.
list_categoriesARead-only
List all categories with their kind and rule counts, and the location of the user's custom rules file.
Inputs: no named parameters.
summarize_spendingARead-only
Totals by category and by month for a CSV bank export. Transfers are excluded from income and expense totals; reports how much money is still uncategorized.
Inputs: file_path (required), column_map, date_format, amount_convention.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct stage of the expense workflow: categorizing, summarizing, detecting recurring charges, managing rules/categories, and exporting. There is little overlap between tagging transactions, totaling spending, listing categories, and writing CSV output. An agent can select the correct tool from the descriptions.
All tool names use a consistent snake_case verb_noun pattern: summarize_spending, categorize_transactions, find_recurring_charges, add_category_rule, list_categories, export_categorized_csv. The convention is predictable and readable throughout.
Six tools are well-scoped for a personal expense categorizer. Each tool covers a meaningful operation without bloating the surface, and the set stays comfortably within a manageable range.
The core workflow is covered: parse/categorize transactions, summarize spending, find recurring charges, add/list category rules, and export results. Minor gaps exist around managing existing rules/categories, such as updating or deleting a rule or creating/renaming categories, though the custom rules file location provides a manual workaround.
Related MCP Connectors
Import bank CSV exports, categorise transactions, total them by category or month, match expenses.
Import a bank CSV, categorise it, summarise it per currency and reconcile it against your expenses.
Import a bank CSV, categorise it, summarise it per currency and reconcile it against your expenses.
Deterministic bank-statement parsing: messy CSV/OFX to clean categorized rows. In-memory only.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables parsing and filtering of mBank CSV operation exports locally. Supports data aggregation and querying through natural language, running entirely offline with no network calls.31MIT
- AlicenseBqualityCmaintenanceEnables local-first personal finance management through deterministic tools for importing, categorizing, and analyzing bank transactions.36MIT
- AlicenseNot gradedqualityBmaintenanceDeterministic bank-statement parsing for AI agents: messy CSV/OFX exports to clean, categorized ledger rows. In-memory only, no storage, no external calls, no LLM in the loop.MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying your own local bank and credit card statement files (CSV or PDF) in plain language, so you can discover forgotten recurring subscriptions, compare spending across months and quarters, and look up transactions without any bank logins or network calls.MIT