kristianfreeman/hledger-mcp-server
3.2
If you are the rightful owner of hledger-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The hledger MCP Server provides an interface for executing hledger commands through the Model Context Protocol, enabling financial analysis and reporting.
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