finledger
FinLedger
3つの読み取りサーフェスを持つローカル金融台帳と、エージェントがそれらを照会できるMCPサーバー:
expenses: 支出アカウント。ピアからの reimbursement と照合される
investments: 証券口座の残高、保有、および取引
income: 給与(総額、控除、手取り)
expenses と investments はストアを共有するが、それ以外は共有しない。アカウントには明示的な domain が付与され、すべての支出クエリはそれを経由して結合されるため、株式購入が reimbursement マッチャーに到達することはない。
マッチャーはルール優先である。確信がない場合は棄権する。マッチが純支出を縮小する前に、人間またはエージェントが確認する。
実際の取引、給与明細、APIキーはあなたのマシン上に留まる(~/.finledger/ledger.db、.env)。このリポジトリはコードと合成評価セットのみを提供する。
インストール
Python 3.10以上。台帳、マッチャー、MCPループ、評価ハーネスは標準ライブラリ。pypdf はオプションで、給与明細PDFのインポートにのみ必要。
pip install -e .Related MCP server: MCP Agent - AI Expense Tracker
MCPサーバー
python3 -m finledger.mcp_server --db ~/.finledger/ledger.db18のツール。expenses_*、investments_*、income_* の名前空間に加え、savings_rate、accounts、sync、reconcile。
Cursorの例(~/.cursor/mcp.json):
{
"mcpServers": {
"finledger": {
"command": "python3",
"args": ["-m", "finledger.mcp_server"]
}
}
}デフォルトの台帳パスは ~/.finledger/ledger.db。
CLI
finledger sync
finledger reconcile
finledger review
finledger servefinledger serve は :8770 でローカルデスクを開く。macOSでは scripts/Expense Desk.command をダブルクリックすることもできる。
オプションのライブソース(認証情報は .env に置き、コミットしないこと):
ソース | 方法 |
shim.finance(カード + Venmo) |
|
SnapTrade(当座 + 証券口座) |
|
カードCSVバックフィル |
|
給与明細PDF |
|
.env.example を .env にコピーする。
公開評価
公開されているゴールドセットは合成である。scripts/make_sample_data.py によって生成され、data-sample/ にある。すべての取引行は synthetic: true とマークされている。これはマッチャーの動作(クリーンマッチ、ファンイン、バンドリング、ピア発信親、マーチャントクレジット、弱いメモ、クロスソースツイン)をカバーするセットである。匿名化された実データではない。
python3 scripts/eval_public.py
# equivalent:
python3 -m reconcile.eval --matcher rules_v0このリポジトリから再現できる数値
data-sample/ で rules_v0(ウィンドウ ±90日、自動マッチ閾値 0.75)で測定:
メトリック | 値 |
評価可能な例 | 22( |
完全一致精度 | 72.7%(16/22) |
エッジ P / R / F1 | 81.2% / 61.9% / 70.3% |
自動マッチ精度 | 85.7%(n=14; 12 tp, 2 fp) |
ゴールドマッチの自動マッチ再現率 | 66.7% |
python3 scripts/eval_public.py を再実行して更新する。サンプル上の残りの2つの偽陽性は実際のマッチャーの弱点であり、絵文字リコールリフトルールの過剰適用を含む。
このリポジトリに含まれないもの
開発中に約92件のラベル付き例からなるプライベートゴールドセットが使用された。実在の人物と実際の購入を指名しており、公開されていない。サンプルの数値をそのセットの再現として扱わないこと。異なるコーパス、異なるサイズ、異なるスコア。
このリポジトリは100%の自動マッチ精度を主張しない。
マッチャー
reconcile/README.md を参照。短いバージョン:
名前 | 動作 |
| ±$1以内の最も近い請求と日付ウィンドウ。なければ空。 |
| 金額適合 + 日付 + メモ/マーチャントの重複、拒否権付き。信頼度 >= 0.75 なら自動マッチ、それ以外は棄権。 |
|
|
サンプルコーパスにラベルを付けるには python3 labeling/app.py(デフォルトは data-sample/)。
ライセンス
MIT
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
- FlicenseNot gradedqualityDmaintenanceEnables interaction with local Beancount accounting ledgers through structured tools for viewing accounts, balances, and transactions, as well as inserting/removing transactions and answering natural-language questions via BeanQuery. Provides deterministic, validated, and auditable financial data operations with offline-first functionality.1
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage personal expenses through natural language conversations. Supports adding, searching, and analyzing transactions with automatic categorization and financial insights.3MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to query and analyze local personal finance data from Tusk Ledger through tools for transactions, accounts, investments, and more, without sending data to the internet.13MIT
- AlicenseNot gradedqualityCmaintenanceProvides tools for querying and writing finance records in a Notion-backed household finance workspace, enabling management of budgets, expenses, savings, and debt through natural language.MIT
Related MCP Connectors
Connect AI agents to bank accounts, transactions, balances, and investments.
Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.
Personal, family and business books over fiat and crypto. Reads and records; it cannot pay.
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/anikam13/finledger'
If you have feedback or need assistance with the MCP directory API, please join our Discord server