finledger
FinLedger
Ein lokales Finanzhauptbuch mit drei Leseoberflächen und einem MCP-Server, damit ein Agent sie abfragen kann:
expenses: Ausgabenkonten, abgeglichen mit Peer-Erstattungen
investments: Brokerage-Salden, Bestände und Aktivitäten
income: Gehaltsabrechnungen (brutto, Abzüge, netto)
Expenses und investments teilen sich einen Speicher und sonst nichts. Ein Konto trägt eine explizite domain, und jede Expense-Abfrage wird darüber verknüpft, sodass ein Aktienkauf den Erstattungs-Matcher nicht erreichen kann.
Der Matcher ist regelbasiert. Er enthält sich, wenn er unsicher ist. Ein Mensch oder Agent bestätigt, bevor ein Treffer die Nettoausgaben reduziert.
Echte Transaktionen, Gehaltsabrechnungen und API-Schlüssel verbleiben auf Ihrem Rechner (~/.finledger/ledger.db, .env). Dieses Repository enthält nur Code und einen synthetischen Eval-Datensatz.
Installation
Python 3.10+. Das Hauptbuch, der Matcher, die MCP-Schleife und die Eval-Infrastruktur sind Standardbibliothek. pypdf ist optional und wird nur zum Importieren von Gehaltsabrechnungs-PDFs benötigt.
pip install -e .Related MCP server: MCP Agent - AI Expense Tracker
MCP-Server
python3 -m finledger.mcp_server --db ~/.finledger/ledger.db18 Tools in den Namensräumen expenses_*, investments_* und income_*, plus savings_rate, accounts, sync und reconcile.
Cursor-Beispiel (~/.cursor/mcp.json):
{
"mcpServers": {
"finledger": {
"command": "python3",
"args": ["-m", "finledger.mcp_server"]
}
}
}Der Standardpfad für das Hauptbuch ist ~/.finledger/ledger.db.
CLI
finledger sync
finledger reconcile
finledger review
finledger servefinledger serve öffnet ein lokales Desk unter :8770. Unter macOS können Sie auch scripts/Expense Desk.command doppelklicken.
Optionale Live-Quellen (Zugangsdaten in .env eintragen, niemals committen):
Quelle | Vorgehen |
shim.finance (Karte + Venmo) |
|
SnapTrade (Girokonto + Depots) |
|
Karten-CSV-Nachimport |
|
Gehaltsabrechnungs-PDF |
|
Kopieren Sie .env.example nach .env.
Öffentliches Eval
Der veröffentlichte Golddatensatz ist synthetisch. Er wird von scripts/make_sample_data.py erzeugt und liegt in data-sample/. Jede Transaktionszeile ist mit synthetic: true markiert. Es ist ein Abdeckungsdatensatz für Matcher-Verhaltensweisen (sauberer Treffer, Fan-in, Bündelung, Peer-Outbound-Eltern, Händlergutschriften, schwache Notizen, quellenübergreifende Zwillinge). Es handelt sich nicht um anonymisierte echte Daten.
python3 scripts/eval_public.py
# equivalent:
python3 -m reconcile.eval --matcher rules_v0Zahlen, die Sie anhand dieses Repos reproduzieren können
Gemessen an data-sample/ mit rules_v0 (Fenster ±90 Tage, Auto-Match-Schwelle 0.75):
Metrik | Wert |
auswertbare Beispiele | 22 (2 als |
Exact-Set-Genauigkeit | 72.7 % (16/22) |
Edge P / R / F1 | 81.2 % / 61.9 % / 70.3 % |
Auto-Match-Präzision | 85.7 % (n=14; 12 tp, 2 fp) |
Auto-Match-Recall der Gold-Treffer | 66.7 % |
Führen Sie python3 scripts/eval_public.py erneut aus, um diese Werte zu aktualisieren. Zwei verbleibende False Positives in der Stichprobe sind echte Matcher-Schwächen, einschließlich der zu weit greifenden Emoji-Recall-Lift-Regel.
Was nicht in diesem Repo enthalten ist
Während der Entwicklung wurde ein privater Golddatensatz mit etwa 92 beschrifteten Beispielen verwendet. Er nennt echte Personen und echte Käufe und ist nicht veröffentlicht. Behandeln Sie die Stichprobenzahlen nicht als Reproduktion dieses Datensatzes. Anderes Korpus, andere Größe, andere Ergebnisse.
Dieses Repository erhebt keinen Anspruch auf 100 % Auto-Match-Präzision.
Matcher
Siehe reconcile/README.md. Kurzfassung:
Name | Verhalten |
| Nächstgelegene Buchung innerhalb ±$1 und eines Zeitfensters. Leer, wenn keine. |
| Betragsabgleich + Datum + Notiz-/Händlerüberlappung, mit Vetos. Auto-Match, wenn Konfidenz >= 0.75; andernfalls Enthaltung. |
| Wie |
Beschriften Sie das Beispielkorpus mit python3 labeling/app.py (Standard: data-sample/).
Lizenz
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