
Ledgr
io.github.KenTaniguchi-Rv0.3.4更新于 Oct 9, 2026
Self-hosted personal finance app with bank sync, budgets, net worth and investment tracking
概览
让助手查询并更新自托管的 Ledgr 个人财务实例:账户、交易、预算、报表和投资。
- 功能
- Ledgr 是一个自托管个人财务应用,通过 Plaid 或 SimpleFIN 同步银行账户,并对外提供 MCP 端点。工具包括 list_accounts、get_account_summary、get_transactions、get_budget、set_budget_category、get_spending_report、get_income_vs_expense、get_net_worth_history、get_holdings、get_portfolio_summary、get_upcoming_bills、get_dashboard_summary、show_financial_dashboard、update_transaction_category、mark_transaction_transfer 和 sync_accounts。读取、写入和同步类工具由授权时授予的 OAuth 作用域 ledgr:read、ledgr:write、ledgr:sync 控制。
- 适用场景
- 适合已经自行运行 Ledgr 的用户:用自然语言询问支出、预算、账单、净资产或持仓情况,或让助手直接修改交易分类、触发账户同步,而不必打开网页面板。
- 运行要求
- 需要一个正在运行的 Ledgr 实例及其自带的 PostgreSQL 数据库,并通过 LEDGR_URL 配置可访问地址;必须将 MCP_ENABLED 设为 true。MCP 端点位于 /api/mcp,首次连接会走 OAuth 授权流程。打包部署使用 Docker;DATABASE_URL 为必填,BETTER_AUTH_URL 必须与 LEDGR_URL 一致。
安装
在 SourceWeft 中
- 打开 控制台中的 Ledgr,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Ledgr
Self-hostable personal finance app with automatic bank sync and AI agent support.
[License: AGPL v3] [TypeScript] [Next.js] [Docker] [MCP]
[Ledgr Dashboard]Ledgr connects to your bank accounts through Plaid or SimpleFIN, automatically syncs and categorizes transactions, and gives you budgets, investment tracking, bill detection, and financial reports — all running on your own server with your own data.
It also exposes an MCP server, so AI assistants like Claude can query your finances through natural conversation.
Querying your finances from Claude Code via MCP
Features
- Automatic bank sync — connect 12,000+ banks via Plaid (real-time webhook sync or scheduled polling), or via SimpleFIN if you'd rather not use a Plaid developer account
- Smart categorization — four-tier pipeline: your rules > merchant defaults > Plaid categories > AI fallback
- Budgets — set monthly budgets by category, track progress in real time
- Investment tracking — portfolio holdings, performance history, and allocation breakdowns, synced automatically from Plaid or SimpleFIN
- Recurring bill detection — automatically identifies subscriptions and recurring charges
- Financial reports — spending, income, net worth, and category trends over time
- AI agent interface (MCP) — query your finances from Claude Code, Claude Desktop, Cursor, or any MCP client
- In-app AI chat — ask questions about your finances right from the dashboard
- BYOK AI — bring your own API key (OpenAI, Anthropic, Google, or local models) for chat and categorization
- CSV/OFX/QFX import & CSV export — for accounts not supported by Plaid, and for getting your data out
- Self-hosted — Docker Compose with PostgreSQL, your data never leaves your server
Monthly budgets by category, tracked against real spending
[Ledgr spending report with category breakdown]
Spending, income, cash flow, trends, and net worth reports
Quick Start
Requires Docker and Docker Compose.
This creates a ledgr/ directory, downloads docker-compose.yml, and starts the app.
Prefer to see the steps first?
Visit http://localhost:4200, create an account, and start exploring.
On first boot, Ledgr generates an encryption key and session secret and stores them in the app data volume. Back up that volume (or the /data/encryption-key file) along with your database — losing the key means losing access to encrypted data like Plaid and SimpleFIN tokens. Prefer to manage the key yourself? Set ENCRYPTION_KEY in a .env file (see Configuration) and it takes precedence.
Add your Plaid keys to
.envto enable bank sync — see Connect Your Bank below (or skip the keys and use SimpleFIN). The app works without either via CSV import.
Connect Your Bank
- Sign up at dashboard.plaid.com and get your
client_idand secret from Developers > Keys - Add them to a
.envfile next to yourdocker-compose.yml(start from.env.exampleif you don't have one): - Restart:
docker compose restart - In the app, go to Accounts > Link Bank to connect via Plaid
Plaid's free trial plan includes 10 production connections and unlimited sandbox access. After that, the Launch plan is pay-as-you-go with no contract. Don't have Plaid keys yet? The app still works — import transactions via CSV and add Plaid later.
Connect any of 12,000+ banks through Plaid
Or connect via SimpleFIN
SimpleFIN works out of the box — no developer account or .env changes needed.
- Get a SimpleFIN Bridge account and generate a Setup Token from your bridge provider
- In the app, go to Accounts > Link Bank and choose the SimpleFIN option
- Paste your Setup Token to connect
SimpleFIN has no webhooks, so accounts sync on a daily schedule (SCHEDULER_SIMPLEFIN_SYNC_CRON, see Configuration) instead of in real time. Investment holdings sync the same way as they do for Plaid.
Connect Your AI Agent
Ledgr ships with a built-in MCP server and plugin support.
First, enable the MCP endpoint in your .env and restart:
Then pick your tool:
Claude Code
Codex CLI
OpenCode — add to opencode.json:
OpenClaw
Hermes
Other MCP clients (Cursor, Windsurf, Cline, etc.)
Point any MCP-compatible client to your Ledgr instance:
On first connection, Ledgr redirects you through an OAuth flow to authorize access.
Available Tools
Read, write, and sync tools are gated by OAuth scopes (ledgr:read, ledgr:write, ledgr:sync) that you grant during authorization.
Example prompts:
- "How much did I spend on groceries this month?"
- "Show me my budget status"
- "What recurring bills do I have?"
- "Generate a spending report for Q1"
- "Sync my accounts and show my balances"
Comparison
Updating
Migrations run automatically on container startup.
Configuration
See .env.example for all options.
Development
If you're self-hosting Ledgr, use the Quick Start above. The instructions below are for contributors.
Prerequisites
Setup
To run the full app in Docker from source (instead of pulling the pre-built image):
Commands
Tech Stack
Roadmap
- Plaid webhook support (real-time sync)
- AI chat assistant (in-app)
- OFX/QFX import
- SimpleFIN bank sync (Plaid alternative)
- Automatic transfer detection between accounts
- Mobile-responsive UI
- Multi-currency support
- Custom report builder
- Goal tracking (savings goals, debt payoff)
- Recurring budget templates
See Issues for what's being worked on.
Security
Security is critical for a finance app. If you discover a vulnerability, please do not open a public issue. Instead, see SECURITY.md for responsible disclosure instructions.
For details on how Ledgr handles your data, see PRIVACY.md.
Contributing
Contributions are welcome! Please open an issue first to discuss what you'd like to change. See CONTRIBUTING.md for setup and workflow details.
- Fork the repo
- Create your branch (
git checkout -b feat/my-feature) - Commit your changes
- Push and open a Pull Request
License
AGPL-3.0 — you can self-host freely. If you modify and distribute the server, you must open-source your changes.
来源:README.md,提交 0affc66
工具
0版本历史
1- v0.3.4最新Oct 9, 2026

