Skip to main content
Glama
anikam13

finledger

by anikam13

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.db

18のツール。expenses_*investments_*income_* の名前空間に加え、savings_rateaccountssyncreconcile

Cursorの例(~/.cursor/mcp.json):

{
  "mcpServers": {
    "finledger": {
      "command": "python3",
      "args": ["-m", "finledger.mcp_server"]
    }
  }
}

デフォルトの台帳パスは ~/.finledger/ledger.db

CLI

finledger sync
finledger reconcile
finledger review
finledger serve

finledger serve:8770 でローカルデスクを開く。macOSでは scripts/Expense Desk.command をダブルクリックすることもできる。

オプションのライブソース(認証情報は .env に置き、コミットしないこと):

ソース

方法

shim.finance(カード + Venmo)

SHIM_API_KEY

SnapTrade(当座 + 証券口座)

SNAPTRADE_CLIENT_IDSNAPTRADE_CONSUMER_KEYSNAPTRADE_USER_IDSNAPTRADE_RECOVER

カードCSVバックフィル

finledger sync --card-csv PATH --card-account-id ID

給与明細PDF

python3 scripts/paystub_import.py statement.pdfpypdf が必要)

.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(unsure ラベルの2件をスキップ)

完全一致精度

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 を参照。短いバージョン:

名前

動作

baseline

±$1以内の最も近い請求と日付ウィンドウ。なければ空。

rules_v0

金額適合 + 日付 + メモ/マーチャントの重複、拒否権付き。信頼度 >= 0.75 なら自動マッチ、それ以外は棄権。

rules_v0_llm

rules_v0 と同じで、その後レビュー残渣に対してオプションの Groq 呼び出し(GROQ_API_KEY)。

サンプルコーパスにラベルを付けるには python3 labeling/app.py(デフォルトは data-sample/)。

ライセンス

MIT

A
license - permissive license
B
quality
C
maintenance

Maintenance

UpdatingMaintainers
UpdatingResponse time
Release cycle
0Releases (12mo)
Commit activity

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables 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
  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    13
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides 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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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