mcp-server-ledger: A Ledger CLI MCP Server
Overview
A Model Context Protocol server for interacting with Ledger CLI, a powerful, double-entry accounting system accessible from the command line. This server allows Large Language Models to query and analyze your financial data through the Ledger CLI tool.
This MCP server exposes Ledger CLI's functionality through a standardized interface, making it easy for AI assistants to help you with financial reporting, budget analysis, and accounting tasks.
Features
The server provides the following tools that map to Ledger CLI commands:
ledger_balance- Shows account balances with powerful filtering options
- Inputs: query pattern, date ranges, display options
- Returns: Formatted balance report
ledger_register- Shows transaction register with detailed history
- Inputs: query pattern, date ranges, sorting options
- Returns: Formatted register report
ledger_accounts- Lists all accounts in the ledger file
- Input: optional query pattern
- Returns: List of matching accounts
ledger_payees- Lists all payees from transactions
- Input: optional query pattern
- Returns: List of matching payees
ledger_commodities- Lists all commodities (currencies) used
- Input: optional query pattern
- Returns: List of matching commodities
ledger_print- Prints transactions in ledger format
- Inputs: query pattern, date ranges
- Returns: Formatted ledger entries
ledger_stats- Shows statistics about the ledger file
- Input: optional query pattern
- Returns: Statistical summary of the ledger
ledger_budget- Shows budget analysis
- Inputs: query pattern, date ranges, reporting period
- Returns: Budget report
ledger_raw_command- Runs a raw Ledger CLI command
- Input: command arguments as a list of strings
- Returns: Command output as text







