Ledger CLI
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
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
Maintainer
Works with
Installation
Manual Installation
npx ledger-cli-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 ledgerInstall 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 claudeAlternative: 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-ledgerSet 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.
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"
}
}
}
}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.
Ledger CLI Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to Ledger CLI? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
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.
Set Up Ledger CLI in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.