hledger MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
hledger MCP
MCP server for hledger — plain-text accounting. It gives AI agents read/write access to your journals. Works with any MCP client (OpenCode, Claude Desktop, Cursor, …).
Quick start
# Run directly (no install needed)
uvx hledger-mcp --journal /path/to/main.journal
# Or install globally
uv tool install hledger-mcp
hledger-mcp --journal /path/to/main.journalThe journal path can also come from the LEDGER_FILE environment variable.
Related MCP server: ledgerkit-mcp
MCP client setup
OpenCode (~/.config/opencode/opencode.json):
{
"mcp": {
"hledger": {
"type": "local",
"command": ["uvx", "hledger-mcp", "--journal", "/path/to/main.journal"],
"enabled": true
}
}
}Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"hledger": {
"command": "uvx",
"args": ["hledger-mcp", "--journal", "/path/to/main.journal"]
}
}
}Example
"How much did I spend on groceries last month?"
The agent calls hledger_balance(account="expenses:groceries", monthly=True).
"Record a 15 euro grocery purchase at Esselunga paid with my bank card."
The agent calls hledger_add_transaction() with:
2026-07-28 Esselunga
expenses:groceries 15.00 EUR
assets:bankSay "check if it is valid first" and the agent will validate with dry_run=True before touching your journal.
Tools
Tool | Description |
| Account balances, with filters and |
| Transaction register, with filters and |
| Transactions as JSON (default) or plain text |
| Names used in the journal |
| Journal statistics; files behind |
| Financial reports, with |
| Add, replace, or remove a transaction (edit/delete match exactly one) |
| Add a |
| Validate the journal with |
Safety
Every write is backed up, validated with hledger check, and rolled back on failure. dry_run=True validates against a temp file and never touches your journal.
Requirements
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Personal finance ledger for AI agents — query spending, track bills, forecast cash flow.
Query, edit, and reconcile a hosted Beancount ledger: BQL, reports, files, and bank imports.
Personal, family and business books over fiat and crypto. Reads and records; it cannot pay.
Read and update double-entry books: accounts, invoices, bills, bank activity and reports.
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-
- AlicenseAqualityDmaintenanceEnables AI agents to interact with a double-entry ledger, offering tools for account management, balanced journal entries, balance queries, trial balance, and penny-perfect allocation. Built with safety by construction: no update/delete tools, idempotent posting, and an append-only journal.7MIT
- AlicenseBqualityCmaintenanceEnables an agent to query local financial ledgers for expenses, investments, and income, with tools for savings rate, accounts, sync, and reconciliation.18MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform exact-decimal double-entry accounting by calling tools that compute money, validate and post entries, verify equations, and produce deterministic audit hashes and citation-grounded artifacts.60 npm1MIT