hledger-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hledger-mcpshow my balance for the current month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
hledger-mcp
MCP server for hledger — exposes double-entry accounting tools to AI agents via the Model Context Protocol.
Built with fastmcp.
Tools
Tool | Description |
| Account balances, optionally filtered by account and period |
| Transaction history, optionally filtered by account, period, and limit |
| Budget report (requires |
| Append a new transaction to the journal |
Related MCP server: bookie
Requirements
Usage
Run directly with uvx
uvx --from /path/to/hledger-mcp hledger-mcpAdd to Claude Code
{
"mcpServers": {
"hledger": {
"command": "uvx",
"args": ["--from", "/path/to/hledger-mcp", "hledger-mcp"]
}
}
}Journal path
By default, the server reads and writes to ~/hledger.journal. Override with the HLEDGER_JOURNAL environment variable:
HLEDGER_JOURNAL=/path/to/my.journal uvx --from /path/to/hledger-mcp hledger-mcpOr in mcp.json:
{
"mcpServers": {
"hledger": {
"command": "uvx",
"args": ["--from", "/path/to/hledger-mcp", "hledger-mcp"],
"env": {
"HLEDGER_JOURNAL": "/home/user/finance/ledger.journal"
}
}
}
}Using with orbit
orbit is an AI session launcher that manages context — MCPs, instructions, and permissions — across a layered scope hierarchy: workspace → tenant → project → repository. hledger ships as a first-class orbit plugin.
Setup (3 commands)
# Register the plugin with orbit
curl -fsSL https://raw.githubusercontent.com/eloircorona/hledger-mcp/main/hledger.toml \
-o ~/.orbit/plugins/hledger.toml
# Install hledger if not already present
orbit plugins install hledger
# Configure the journal path for this instance
orbit plugins auth hledger
# Enable the MCP for the current scope (tenant, project, or global)
orbit plugins enable hledgerorbit plugins auth prompts for the instance name and journal path, then wires everything up. No config files to edit manually.
If you already cloned the repo, the one-liner becomes:
cp hledger.toml ~/.orbit/plugins/Launch
orbit launch <scope>orbit starts the session with hledger connected alongside any other MCPs in scope. Switch to a different tenant and hledger disappears automatically.
Multiple journals
Need separate instances for personal and business finances? Run orbit plugins auth hledger again with a different instance name — orbit tracks them independently:
orbit plugins auth hledger # instance: personal → ~/finance/personal.journal
orbit plugins auth hledger # instance: business → ~/finance/business.journalWhy this matters
A typical personal finance setup in orbit pairs hledger-mcp with:
MCP | Purpose |
| Typed access to the journal — query balances, add transactions |
| Browse receipts, bank exports, tax documents |
| Structured queries over imported CSV data |
Because orbit merges MCPs layer by layer, you can scope hledger to a specific tenant so it only loads when you're working on finances — never leaking into other sessions.
orbit handles context scoping, MCP lifecycle, engine selection (Claude, Gemini, local), and session instructions — so the AI always has the right tools for the current domain, with zero manual configuration per session.
Tool reference
get_balance
Returns the balance report (hledger bal).
get_balance(account="gastos", period="this month")
get_balance(account="activos:banco")
get_balance()Param | Type | Description |
|
| Account name pattern to filter |
|
| Period expression: |
get_register
Returns the register report (hledger reg).
get_register(account="gastos:alimentacion", period="this month")
get_register(limit=20)Param | Type | Description |
|
| Account name pattern to filter |
|
| Period expression |
|
| Max number of entries to return |
get_budget
Returns the budget report (hledger budget). Requires ~ monthly or similar budget directives in your journal.
get_budget(period="this month")Param | Type | Description |
|
| Period expression |
add_transaction
Appends a transaction to the journal file.
add_transaction(
date="2026-08-08",
description="Supermercado Walmart",
postings=[
{"account": "gastos:alimentacion", "amount": "850 MXN"},
{"account": "activos:banco:bbva"}, # no amount — hledger auto-balances
]
)Param | Type | Description |
|
| ISO date: |
|
| Payee or description |
|
| List of |
The resulting journal entry:
2026-08-08 Supermercado Walmart
gastos:alimentacion 850 MXN
activos:banco:bbvaAccount conventions (hledger standard)
activos: assets (bank, cash, investments)
pasivos: liabilities (credit cards, loans)
ingresos: income (salary, freelance)
gastos: expenses (food, transport, rent)
patrimonio: equity (opening balances)Development
git clone git@github.com:eloircorona/hledger-mcp.git
cd hledger-mcp
uv sync
uv run hledger-mcpLicense
MIT
This server cannot be installed
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
- AlicenseCqualityDmaintenanceA Model Context Protocol server that allows AI assistants to query and analyze financial data through Ledger CLI, enabling tasks like financial reporting, budget analysis, and accounting.951MIT
- Alicense-qualityAmaintenanceA Model Context Protocol (MCP) server that keeps the books for your personal and business finances using double-entry accounting — driven entirely from an LLM.378MIT
- Flicense-qualityCmaintenanceA read-only MCP server that gives AI agents structured access to a Beancount personal finance ledger.1
- Alicense-qualityAmaintenanceDouble-entry accounting ledger MCP server for autonomous agents that enables creating accounts, posting journal entries, and generating financial reports.MIT
Related MCP Connectors
Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
MCP server exposing the Backtest360 engine API as tools for AI agents.
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/eloircorona/hledger-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server