MCP cover image
See in Github
2025-03-22

Ein Modellkontext-Protokollserver für die Interaktion mit Ledger CLI, einem leistungsstarken Doppelentwicklungs-Buchhaltungssystem. Mit diesem Server können große Sprachmodelle Finanzdaten über eine standardisierte Schnittstelle abfragen und analysieren, sodass AI -Assistenten die Finanzberichterstattung, die Budgetanalyse und die Buchhaltungsaufgaben helfen können.

1

Github Watches

1

Github Forks

7

Github Stars

mcp-server-ledger: A Ledger CLI MCP Server

smithery badge

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:

  1. ledger_balance

    • Shows account balances with powerful filtering options
    • Inputs: query pattern, date ranges, display options
    • Returns: Formatted balance report
  2. ledger_register

    • Shows transaction register with detailed history
    • Inputs: query pattern, date ranges, sorting options
    • Returns: Formatted register report
  3. ledger_accounts

    • Lists all accounts in the ledger file
    • Input: optional query pattern
    • Returns: List of matching accounts
  4. ledger_payees

    • Lists all payees from transactions
    • Input: optional query pattern
    • Returns: List of matching payees
  5. ledger_commodities

    • Lists all commodities (currencies) used
    • Input: optional query pattern
    • Returns: List of matching commodities
  6. ledger_print

    • Prints transactions in ledger format
    • Inputs: query pattern, date ranges
    • Returns: Formatted ledger entries
  7. ledger_stats

    • Shows statistics about the ledger file
    • Input: optional query pattern
    • Returns: Statistical summary of the ledger
  8. ledger_budget

    • Shows budget analysis
    • Inputs: query pattern, date ranges, reporting period
    • Returns: Budget report
  9. ledger_raw_command

    • Runs a raw Ledger CLI command
    • Input: command arguments as a list of strings
    • Returns: Command output as text

Prerequisites

  • Ledger CLI must be installed and available in your PATH
  • A valid Ledger file with your financial data

Installation

Using uv (recommended)

The easiest way to install and run this server is with uv:

uv sync

Configuration

The server requires a path to your Ledger file. This can be provided through:

  • The LEDGER_FILE environment variable
  • Command-line arguments when starting the server

Using with Claude Desktop

Add this to your claude_desktop_config.json:

"mcpServers": {
  "ledger": {
    "command": "uv",
    "args": [
      "run",
      "--env-file",
      "/path/to/your/.env",  // Optional: to set LEDGER_FILE
      "--with",
      "mcp[cli]",
      "mcp",
      "run",
      "<repo_path>/main.py"  // Path to the main.py file in this repository
    ]
  }

}

Usage Examples

Once configured, you can ask your AI assistant questions about your financial data:

  • "Show me my expenses for the last month"
  • "What's my current balance in all accounts?"
  • "List all transactions with Amazon"
  • "How much did I spend on groceries in 2023?"
  • "Show me my budget performance for Q1"

The AI will use the appropriate Ledger CLI commands through the server to get the information.

Debugging

For more detailed local testing:

mcp dev main.py

Development

This server is built using the Model Context Protocol Python SDK. For more information about MCP and how to develop MCP servers, see the official documentation.

To contribute to this project:

  1. Clone the repository
  2. Install development dependencies
  3. Make your changes
  4. Test using the MCP inspector or by integrating with Claude Desktop

Security Considerations

This server runs Ledger CLI commands on your financial data. While it includes basic validation to prevent command injection, you should:

  • Only use with trusted clients
  • Be careful about which file paths you expose
  • Review all commands before execution

License

This MCP server is licensed under the MIT License. Feel free to use, modify, and distribute it according to the license terms.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.

  • modelcontextprotocol
  • Modellkontext -Protokollserver

  • Mintplex-Labs
  • Die All-in-One-Desktop & Docker-AI-Anwendung mit integriertem Lappen, AI-Agenten, No-Code-Agent Builder, MCP-Kompatibilität und vielem mehr.

  • OffchainLabs
  • GO -Umsetzung des Ethereum -Beweises des Anteils

  • n8n-io
  • Fair-Code-Workflow-Automatisierungsplattform mit nativen KI-Funktionen. Kombinieren Sie visuelles Gebäude mit benutzerdefiniertem Code, SelbstHost oder Cloud, 400+ Integrationen.

  • huahuayu
  • Ein einheitliches API-Gateway zur Integration mehrerer Ethercan-ähnlicher Blockchain-Explorer-APIs mit Modellkontextprotokoll (MCP) für AI-Assistenten.

    Reviews

    2 (1)
    Avatar
    user_ZMemcRVf
    2025-04-17

    As a dedicated user of mcp, I am thoroughly impressed with the mcp-server-ledger developed by minhyeoky. This tool greatly simplifies server log management and analysis, streamlining the process with its robust and efficient design. The GitHub link provides easy access to the code and comprehensive documentation, making implementation seamless. Highly recommend for anyone seeking a reliable log management solution!