mcp-server-ledger

mcp-server-ledger

15

The MCP Ledger Server bridges AI assistants with the Ledger CLI accounting system, enabling enhanced financial data interaction and reporting. It simplifies command execution for financial analysis, budget tracking, and account management using a standard interface.

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 financial data through Ledger CLI.

Features

  • ledger_balance: Show account balances
  • ledger_register: Display transaction register
  • ledger_accounts: List all accounts
  • ledger_payees: List all payees
  • ledger_commodities: List all commodities
  • ledger_print: Print transactions
  • ledger_stats: Show ledger statistics
  • ledger_budget: Show budget analysis
  • ledger_raw_command: Run raw Ledger CLI commands

Prerequisites

  • Ledger CLI installed
  • Valid ledger file

Installation

  • Docker: Pull and run minhyeoky/mcp-ledger
  • Smithery: Install via npx
  • uv: Run with uv sync

Configuration

Provide path to ledger file via environment variable or command line.

Usage Examples

  • "Show me my expenses for last month"
  • "What's my current balance in all accounts?"

Development

Built with MCP Python SDK. To contribute, clone, install dependencies, and test.

Security Considerations

Ensure usage with trusted clients and review commands.