Ledger CLI

v1.0.0Finance & Fintechstable

A Model Context Protocol server for interacting with Ledger CLI, a powerful double-entry accounting system. This server enables Large Language Models to query and analyze financial data through a standardized interface, making it easy for AI assistan

ledger-cli-mcp-servermcpai-integration
Share:
48
Stars
0
Downloads
0
Weekly
0/5

What is Ledger CLI?

Ledger CLI is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server for interacting with ledger cli, a powerful double-entry accounting system. this server enables large language models to query and analyze financial data through a standa...

A Model Context Protocol server for interacting with Ledger CLI, a powerful double-entry accounting system. This server enables Large Language Models to query and analyze financial data through a standardized interface, making it easy for AI assistan

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol server for interacting with Ledger

Use Cases

Query and analyze financial data using Ledger double-entry accounting
Get AI-assisted insights on personal finances and budgets
minhyeoky

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedApr 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx ledger-cli-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Ledger CLI

The Ledger CLI MCP Server connects AI assistants to Ledger, a powerful command-line double-entry accounting system, letting you query balances, browse transaction history, analyze budgets, and run arbitrary Ledger CLI commands through natural language. It bridges the gap between plain-text accounting files and conversational AI, making it easy to ask questions about your finances without remembering Ledger's syntax. The server requires that Ledger CLI is already installed on your system and that you have an existing .ledger data file.

Prerequisites

  • Ledger CLI installed on your system (version 3.x recommended; install via brew install ledger on macOS)
  • An existing Ledger-format journal file (.ledger or .dat)
  • Python 3.10+ and uv package manager (or Docker) for running the server
  • A Smithery account or Docker for the recommended install paths
  • An MCP client such as Claude Desktop
1

Install Ledger CLI

Ensure the Ledger CLI binary is available before starting the server. On macOS use Homebrew; on Linux use your package manager.

brew install ledger
2

Install the MCP server via Smithery

The easiest installation path uses Smithery's CLI which handles dependency setup and Claude Desktop configuration automatically.

npx -y @smithery/cli install @minhyeoky/mcp-ledger --client claude
3

Alternative: run with uv

If you prefer a manual setup, clone the repository and use uv to sync dependencies, then run the server directly.

git clone https://github.com/minhyeoky/mcp-server-ledger.git
cd mcp-server-ledger
uv sync
uv run mcp-server-ledger
4

Set the LEDGER_FILE environment variable

The server needs to know which Ledger journal file to read. Set LEDGER_FILE to the absolute path of your .ledger file in the MCP client configuration.

5

Configure Claude Desktop

Add the server block to your Claude Desktop configuration file, pointing LEDGER_FILE at your journal. The Smithery install does this automatically; for manual installs, edit the config yourself.

{
  "mcpServers": {
    "ledger": {
      "command": "uv",
      "args": ["--directory", "/path/to/mcp-server-ledger", "run", "mcp-server-ledger"],
      "env": {
        "LEDGER_FILE": "/Users/you/finances/main.ledger"
      }
    }
  }
}
6

Restart Claude Desktop and verify

Fully quit and relaunch Claude Desktop so it picks up the new server. You should see a hammer icon in the chat interface indicating MCP tools are available.

Ledger CLI Examples

Client configuration

Claude Desktop config using uv to run the server with a local ledger journal file.

{
  "mcpServers": {
    "ledger": {
      "command": "uv",
      "args": ["--directory", "/Users/you/mcp-server-ledger", "run", "mcp-server-ledger"],
      "env": {
        "LEDGER_FILE": "/Users/you/finances/2024.ledger"
      }
    }
  }
}

Prompts to try

Natural language prompts that exercise the nine exposed Ledger tools.

- "What is my current balance across all accounts?"
- "Show me all expenses for the last month"
- "List all transactions with Amazon in 2024"
- "How much did I spend on groceries versus dining out this quarter?"
- "Show me my budget performance for Q1 2024"
- "What currencies and commodities appear in my ledger?"

Troubleshooting Ledger CLI

Server starts but returns errors like 'ledger: command not found'

The Ledger CLI binary must be on PATH when the MCP server runs. Verify with `which ledger`. If installed via Homebrew on Apple Silicon, you may need to add /opt/homebrew/bin to PATH in the env block of your Claude Desktop config.

LEDGER_FILE not found or permission denied

Use an absolute path for LEDGER_FILE (not ~/finances/main.ledger). Tilde expansion may not occur in the MCP env block. Run `ls -la /absolute/path/to/file.ledger` to confirm the file exists and is readable.

Smithery install completes but tools don't appear in Claude Desktop

Fully quit Claude Desktop (Cmd+Q on macOS, not just close the window) and relaunch. Also confirm the install succeeded by running `cat ~/Library/Application\ Support/Claude/claude_desktop_config.json` and checking for the ledger entry.

Frequently Asked Questions about Ledger CLI

What is Ledger CLI?

Ledger CLI is a Model Context Protocol (MCP) server that model context protocol server for interacting with ledger cli, a powerful double-entry accounting system. this server enables large language models to query and analyze financial data through a standardized interface, making it easy for ai assistan It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Ledger CLI?

Follow the installation instructions on the Ledger CLI GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Ledger CLI?

Ledger CLI works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Ledger CLI free to use?

Yes, Ledger CLI is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "ledger-cli-mcp-server": { "command": "npx", "args": ["-y", "ledger-cli-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Ledger CLI?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides