MCP Economic Integration

MCP Economic Integration 是一个基于 Model Context Protocol (MCP) 的服务实现,旨在桥接 MCP 协议与 e-conomic 的 API,通过 Claude Desktop 提供对 e-conomic 会计和业务功能的标准化访问。该服务提供了强大的认证机制和全面的财务管理功能,包括账户管理、发票生命周期管理、客户和供应商关系管理以及日记账条目创建和管理等。

  • by AI-Strategy-Enablement
  • 更新于
在 GitHub 查看 AI-Strategy-Enablement/mcp-economic

使用说明

基本能力

产品定位

MCP Economic Integration 是一个金融服务工具,专门用于与 e-conomic 会计系统集成,提供标准化的财务管理功能。

核心功能

  • 强大的认证机制:使用 APP_SECRET_TOKEN 和 AGREEMENT_GRANT_TOKEN 进行安全的基于令牌的认证。
  • 全面的财务管理:
    • 账户图表访问,支持过滤和分类。
    • 发票生命周期管理(草稿、预订、已付、未付)。
    • 客户和供应商关系管理。
    • 日记账条目创建和管理。

适用场景

  • 企业财务管理自动化。
  • 会计系统集成。
  • 客户和供应商数据管理。

工具列表

  • 账户管理:get_accounts, get_account。
  • 发票管理:get_booked_invoices, get_draft_invoices, get_paid_invoices, get_unpaid_invoices, get_invoice_totals, create_draft_invoice。
  • 日记账条目:create_supplier_invoice_entry, create_supplier_payment_entry, create_customer_payment_entry, create_customer_invoice_entry。
  • 供应商管理:get_suppliers, get_supplier_groups。
  • 客户管理:get_customers, get_customer_totals, get_customer_groups。

常见问题解答

  • 认证问题:确保正确配置 APP_SECRET_TOKEN 和 AGREEMENT_GRANT_TOKEN。
  • API访问:确保有足够的权限访问 e-conomic API。
  • 错误处理:所有工具都返回标准化的 JSON 响应,包括错误详情和建议解决方案。

使用教程

使用依赖

  • Python 3.12.2 或更高版本。
  • macOS、Linux 或 Windows 操作系统。
  • e-conomic API 凭证(APP_SECRET_TOKEN 和 AGREEMENT_GRANT_TOKEN)。
  • UV/UVX 安装(现代 Python 打包工具)。

安装教程

安装 Python

macOS

# 使用 Homebrew(推荐)
brew install python@3.12

# 验证安装
python3 --version

Windows 从 python.org 下载并安装 Python 3.12.2。

安装 UV/UVX

macOS

# 使用 Homebrew
brew install uv

# 使用 pip
pip install uv

# 使用官方安装脚本
curl -fsSL https://astral.sh/uv/install.sh | bash

Windows

# 使用 pip
pip install uv

# 使用安装脚本
# 下载并运行:https://github.com/astral-sh/uv/releases

安装 MCP Economic Integration

# 克隆仓库
git clone https://github.com/michael-wiesinger/mcp-economic.git
cd mcp-economic

# 创建虚拟环境
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# 安装依赖
pip install -r requirements.txt

调试方式

python -m mcp_economic \
  --app-token "your_app_secret_token" \
  --agreement-token "your_agreement_grant_token" \
  --transport "stdio" \  # 或 "sse" 用于 Server-Sent Events
  --host "localhost" \   # 仅用于 SSE 模式
  --port 4711 \          # 仅用于 SSE 模式
  --timeout 30 \         # 请求超时时间(秒)
  --debug                # 启用调试日志