HLedger MCP

HLedger MCP

MCP server giving AI assistants direct access to HLedger accounting data and functionality.

24
Stars
0
Forks
6
Releases

Overview

Hledger MCP Server is a Model Context Protocol (MCP) server that exposes HLedger accounting data and functionality to MCP clients, including AI assistants. It enables AI applications to query current balances, generate a wide range of financial reports, add new entries, and analyze journal data through a standardized protocol. The server supports most hledger CLI commands, can fetch and traverse included journal files, and offers a safe read-only mode to prevent writes. It is published on npm as @iiatlas/hledger-mcp and can be deployed from an .mcpb release file or via npm. The MCP server automatically registers the primary journal and every file reported by hledger files as MCP resources, enabling clients to browse and retrieve the source ledgers. When write operations are enabled, it provides tools to add, remove, replace, import, rewrite, and close transactions, with optional dry-run previews and backups. A built-in web interface via hledger web can be launched from within the MCP server, and environment/config options let you specify custom executables and toggle read/write behavior. The project includes test resources and a clear development structure to support extension and testing. Read-only MCP sessions force the web interface to view mode, while write-enabled sessions default to add unless edit is explicitly requested.

Details

Owner
iiAtlas
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

Accounts

List and query account names and structures.

Balance

Generate balance reports with extensive customization options.

Register

View transaction registers and posting details.

Print

Output journal entries and transactions.

Balance Sheet

Generate balance sheet reports.

Balance Sheet Equity

Balance sheet reports with equity details.

Income Statement

Profit & loss statements.

Cash Flow

Cash flow analysis and reports.

Audience

AI assistantsAccess HLedger data and functionality for querying balances, reports, and analysis.
AccountantsAutomate journal queries and updates within HLedger using MCP integration.
MCP developersIntegrate with Claude Desktop or other MCP clients to access ledgers.

Tags

HLedgerHLedger MCPMCP serveraccountinghledgerfinancial reportingdata analysisjournalweb UIread-onlyCLIintegrationClaudeOpenAI