Pennylane API 服务器

一个为Pennylane V2 API设计的MCP服务器,提供60多种工具,覆盖账单、会计、客户、供应商等多个领域,支持双认证模式和自动速率限制。

  • by SommeSi
  • Ruby
  • 本地部署
  • 更新于
在 GitHub 查看 SommeSi/mcp-pennylane

使用说明

MCP Pennylane-SommeSi

PennyLane v2 API的模型上下文协议(MCP)服务器,用Ruby开发。

暴露 60+工具MCP 涵盖整个PennyLane API:发票、会计、客户、供应商、产品、报价、银行、分析等。

功能

  • Pennylane V2的所有域 :销售、采购、会计、分析、银行、核心
  • 双重身份验证模式 :Mono-dossier(API代币公司)和公司API(多客户)
  • 自动限速 :尊重Pennylane限制(要求5/秒)
  • 使用指数回溯重试 :429/5xx错误处理
  • 基于分页光标 :符合API v2
  • Pennylane JSON过滤器 :完全支持V2过滤格式
  • 2种运输方式 :stdio(克劳德桌面)和流式HTTP(Rails)

安装

1.添加宝石

# Gemfile
gem "mcp", "~> 0.10"
gem "faraday", "~> 2.0"
gem "faraday-retry", "~> 2.0"

2.配置令牌

cp .env.example .env
# Éditez .env avec votre token Pennylane

3.轨道集成

# config/routes.rb
post "/mcp", to: "mcp#handle"

复制 app/controllers/mcp_controller.rb 和 config/initializers/mcp_pennylane.rb 在您的应用程序中。

4.或STDIO模式(克劳德桌面)

{
  "mcpServers": {
    "pennylane": {
      "command": "ruby",
      "args": ["/chemin/vers/mcp-pennylane/bin/mcp_server"],
      "env": { "PENNYLANE_API_TOKEN": "votre_token" }
    }
  }
}

Pennylane要求的范围

customers:all products:all customer_invoices:all quotes:all suppliers:all supplier_invoices:all ledger trial_balance:readonly exports:fec exports:agl fiscal_years:readonly categories:all transactions:readonly bank_accounts:readonly file_attachments:all billing_subscriptions:all commercial_documents:all customer_mandates:all e_invoices:all

许可证

麻省理工学院 - SommeSi 2026