hledger-mcp-server

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

  1. Install hledger: brew install hledger
  2. Clone and build this repo
  3. Set LEDGER_FILE=path/to/your.journal
  4. 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 balances
  • hledger_register - Transaction listing
  • hledger_accounts - List accounts
  • hledger_stats - Journal statistics
  • hledger_balancesheet - Balance sheet
  • hledger_incomestatement - Income statement
  • hledger_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