Ledger MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

分类帐服务 MCP 服务器

MCP 服务器用于通过 Claude 访问和管理分类账文件。

成分

工具

该服务器实现了三种账本管理工具:

  • list-accounts :列出账本中的所有账户
    • 将“年份”作为必需参数
    • 返回所有可用帐户的格式化列表
  • account-balance :获取特定账户的余额
    • 将“年份”和“帐户”作为必需参数
    • 返回指定账户的当前余额
  • account-register :显示账户的交易记录
    • 将“年份”和“帐户”作为必需参数
    • 返回指定账户的详细交易历史记录

安装

先决条件

  • Python 3.13 或更高版本
  • uv包管理器
  • Node.js 和 npm(用于调试)

从 PyPI 安装

uv pip install ledger-service

调试

使用检查器调试服务器:

npx @modelcontextprotocol/inspector \ uv \ --directory /path/to/ledger-service \ run \ ledger-service

配置 Claude 桌面

将服务器配置添加到 Claude Desktop 的配置文件中:

在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

"mcpServers": { "ledger-service": { "command": "uv", "args": [ "--directory", "/path/to/ledger-service", "run", "ledger-service" ] } }
"mcpServers": { "ledger-service": { "command": "uvx", "args": [ "ledger-service" ] } }

发展

本地设置

  1. 克隆存储库
  2. 创建并激活虚拟环境
  3. 安装依赖项:

可以通过修改server.py中的LEDGER_BASE_PATH常量来配置基本路径。

执照

GNU 通用公共许可证第 3 版,2007 年 6 月 29 日

-
security - not tested
A
license - permissive license
-
quality - not tested

MCP 服务器允许通过 Claude 访问和管理分类账文件,提供账户列表、余额检查和交易登记查看功能。

  1. Components
    1. Tools
  2. Installation
    1. Prerequisites
    2. Install from PyPI
  3. Debugging
    1. Configure Claude Desktop
  4. Development
    1. Local Setup
  5. License
    ID: c4fin1c7jw