hledger MCP Server
MCP server that gives Claude access to hledger commands for financial analysis.
Built with Claude Code.
Setup
- Install hledger:
brew install hledger - Clone and build this repo
- Set
LEDGER_FILE=path/to/your.journal - Configure Claude Desktop (see below)
git clone https://github.com/kristianfreeman/hledger-mcp-server
cd hledger-mcp-server
npm install
npm run build
export LEDGER_FILE=/path/to/your/main.journal
Available Commands
hledger_balance- Account balanceshledger_register- Transaction listinghledger_accounts- List accountshledger_stats- Journal statisticshledger_balancesheet- Balance sheethledger_incomestatement- Income statementhledger_cashflow- Cash flow statement
Claude Configuration
Claude Code (CLI)
claude mcp add hledger-mcp-server -- node ./hledger-mcp-server/dist/index.js
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"hledger": {
"command": "node",
"args": ["/absolute/path/to/hledger-mcp-server/dist/index.js"]
}
}
}
Then ask Claude: "Show me my account balances" or "What did I spend on groceries last month?"
License
MIT License - see LICENSE file for details.
Related Projects
- hledger - Plain text accounting software
- MCP Framework - TypeScript MCP server framework
- Model Context Protocol - Protocol specification











