local-budget
Enables local-first personal finance management through deterministic tools for importing, categorizing, and analyzing bank transactions.
README
local-budget
A local-first, agent-first personal spending agent for your bank/financial
statements. Your data stays in one
local data/budget.db on your own machine — full account numbers and every
transaction. You don't click through an app to understand your money; you talk
to it from a Claude Code session pointed at this repo, through a small MCP server
and a set of no-code skills. The server runs no inference — it just exposes
deterministic, column-guarded tools; the reasoning happens in your Claude Code
session under your own subscription auth.
How it works
- Import. Drop a bank statement export (
.qfx/.ofx/.csv) in your inbox and runbudget intake(orbudget import <file>). Account numbers are masked at import time; the raw transaction is stored once indata/budget.db. - The MCP server. The committed
.mcp.jsonwires upuv run budget-mcp— a standalone stdio MCP server that exposes 32 deterministic tools (18 read, 14 write) overbudget.db. Every tool runs behind a connection-scoped, column-level SQLite authorizer (db.agent_connect): imported facts are immutable, and account numbers, raw OFX, and raw payee/memo are read-denied — the sanitizedmerchant_normis the agent's only merchant text. Read tools return a{data, rendered}pair so the agent can print an exact, deterministic markdown block instead of paraphrasing numbers. - The skills. Eight no-code
budget-*skills (under.claude/skills/) orchestrate those tools in your session — grounded in a sharedbudget-analystpersona that enforces "never invent a number, print the tool'srenderedblock verbatim, confirm before any write." - The dashboard (optional).
budget servestarts a loopback-only web dashboard athttp://127.0.0.1:8770— a deterministic visual glance at your spending. It runs no Claude inference.
Open a Claude Code session in this repo and the MCP tools (.mcp.json) and the
budget skills (.claude/skills/) load automatically. Then just ask:
"How much did I spend on groceries this month?", "Categorize my unreviewed
merchants," "Give me a monthly brief."
Privacy
- One local DB. Everything lives in
data/budget.db, which is gitignored and never committed. - Account numbers masked at import and read-denied to the agent; raw
payee/memo read-denied by the authorizer — the agent sees only the
sanitized
merchant_norm. - The agent can never alter an imported fact. The write authorizer permits only the derived category columns and the app-config tables — not the imported transaction rows. No tool can rewrite history.
- The dashboard is loopback-only by default; binding a non-loopback host requires
a 32+ char
LOCAL_BUDGET_API_TOKEN(see.env.example).
Quick start
uv sync
# import a bank statement export
uv run budget import ~/Downloads/statement.qfx
# …or drop exports in your inbox and run:
uv run budget intake
# then open a Claude Code session in this repo and ask your money questions —
# the budget skills + MCP tools auto-load from .mcp.json and .claude/skills/.
For the optional visual dashboard:
uv run budget serve --open # http://127.0.0.1:8770 (loopback-only)
Run uv run budget --help for the full CLI (import, intake, report, reconcile,
recurring, limits, subscriptions, backup, …).
Skills
| Skill | What you ask it |
|---|---|
budget-setup |
first-run setup — expected income, an overview of where you stand |
budget-coach |
spending questions — categories, top merchants, "how am I doing" |
budget-monthly-brief |
a full month wrap-up — summary, trends, anomalies, recurring |
budget-categorize |
pin merchants to categories, clear the review queue |
budget-budgets |
set and check monthly category/subcategory limits |
budget-income |
income by source and the underlying transactions |
budget-subscriptions |
detected recurring charges, split into their own subcategories |
budget-reconcile |
review and resolve import conflicts |
All eight reference the shared budget-analyst persona; visual reports follow
the shared budget-visualizer discipline.
Evals
Skills are tested like code. scripts/eval.py runs a deterministic mock tier
(replays committed transcripts, no spend) in CI, plus an opt-in live tier
(--live, drives claude -p) that is cost-capped for when you want to verify
real model behavior.
What's committed vs. local
| Committed (the app — runs anywhere) | Local only (gitignored — your data/host) |
|---|---|
src/, tests/, scripts/, pyproject.toml, uv.lock |
data/ (budget.db, local_key, -wal/-shm) |
.mcp.json, .claude/skills/budget-*, docs/ |
.env (real tokens, host paths) |
LICENSE, README.md, fabricated test fixtures |
briefings/, backups/, raw bank exports |
Install the commit guard so personal data can't slip into git:
ln -sf ../../scripts/secret-scan.sh .git/hooks/pre-commit
Requirements
Python 3.12. MIT licensed (see LICENSE).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。