
iiatlas/hledger-mcp 是从 https://github.com/iiatlas/hledger-mcp. 导入的 MCP 服务器候选服务器
概览
iiatlas/hledger-mcp 是从 https://github.com/iiatlas/hledger-mcp. 导入的 MCP 服务器候选服务器
概述(AI 翻译)
一台模型上下文协议(MCP)服务器,为AI助手(MCP客户端)提供对HLedger会计数据和功能的直接访问。该服务器使AI应用能够查询账户余额、生成财务报告、添加新数据,并通过标准化协议分析会计数据。
它支持大多数 hledger CLI 命令,能够获取遍历 include 的日志文件,并支持安全的 --read-only 模式。希望你觉得有用!
发布在 npm 上,代码为 @iiatlas/hledger-mcp,并可作为可安装的 .mcpb 文件从各版本发布。
特色
HLedger MCP 服务器通过以下工具全面访问 HLedger 的财务报告功能:
核心会计
- 账户 - 列表和查询账户名称及结构
- 平衡 - 生成带有广泛自定义选项的余额报告
- 注册 - 查看交易注册和发布详情
- 打印 - 输出日记条目和交易
财务报告
- 资产负债表 - 生成资产负债表报告
- 资产负债表权益 - 包含权益详情的资产负债表报告
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
HLedger MCP Server
A Model Context Protocol (MCP) server that provides AI assistants (MCP Clients) with direct access to HLedger accounting data and functionality. This server enables AI applications to query account balances, generate financial reports, add new entires, and analyze accounting data through a standardized protocol.
It has support for most hledger cli commands, the ability to fetch an traverse include’d journal files, and a safe --read-only mode. I hope you find it useful!
Published on npm as @iiatlas/hledger-mcp, and available as an installable .mcpb file from releases.
Features
The HLedger MCP server provides comprehensive access to HLedger’s financial reporting capabilities through the following tools:
Core Accounting
- Accounts - List and query account names and structures
- Balance - Generate balance reports with extensive customization options
- Register - View transaction registers and posting details
- Print - Output journal entries and transactions
Financial Reports
- Balance Sheet - Generate balance sheet reports
- Balance Sheet Equity - Balance sheet reports with equity details
- Income Statement - Profit & loss statements
- Cash Flow - Cash flow analysis and reports
Data Analysis
- Stats - Statistical analysis of journal data
- Activity - Account activity and transaction frequency analysis
- Payees - List and analyze transaction payees
- Descriptions - Transaction description analysis
- Tags - Query and analyze transaction tags
- Notes - List unique transaction notes and memo fields
- Files - List data files used by hledger
Resource Integration
- Automatically registers the primary journal and every file reported by
hledger filesas MCP resources so clients can browse and retrieve the source ledgers
Journal Updates
- Add Transaction - Append new, validated journal entries with optional dry-run support
- Find Entry - Locate complete transactions (with file and line metadata) matching any hledger query
- Remove Entry - Delete a transaction safely using its exact text and location, with optional dry-run
- Replace Entry - Swap an existing transaction for new content after validating the change
- Import Transactions - Safely ingest batches of entries from external journal files or other supported formats
安装
npx -y @iiatlas/hledger-mcp /path/to/your/master.journal配置
{
"mcpServers": {
"hledger": {
"command": "npx",
"args": ["-y", "@iiatlas/hledger-mcp", "/path/to/your/master.journal"]
}
}
}