Skip to main content
Glama
andrespadeto

ribbo-mcp

by andrespadeto

ribbo-mcp

RibboMCPModel Context Protocol)服务器。它将您的 AI 助手(Claude Desktop、Cursor 等)连接到 Ribbo 的定期收款 API,并使其成为一个操作员:AI 将执行真实操作 —— 创建和管理订阅、查询 entitlements、退款、立即收款,以及生成支付/续期链接。

身份验证使用您的租户 API 密钥(前缀 bk_),在控制台面板的 开发者 → API keys 中生成。该服务器是公共 API 的精简客户端:代码中不包含任何密钥 —— 您通过环境变量提供自己的密钥。


要求

  • Node.js 18+

  • 一个 Ribbo 的 API 密钥bk_…)。使用 read 范围的密钥只能查询;使用 write 范围的密钥可以让 AI 执行操作(退款、收款、取消等)。

Related MCP server: Agent Billy MCP Server

安装

最快的方式 —— 无需克隆任何代码 —— 是通过 npx 将您的 AI 客户端指向该包。要在终端中测试:

# direto do GitHub (funciona já):
npx -y github:andrespadeto/ribbo-mcp

# ou, depois de publicado no npm:
npx -y ribbo-mcp

它会保持等待直到从 stdio 接收数据 —— 这就是 MCP 服务器的运行方式。与之“对话”的是您的 AI 客户端(如下所述),而不是终端。退出请按:Ctrl+C

配置

两个环境变量:

变量

说明

RIBBO_API_KEY

您的 API 密钥(bk_…),来自管理后台的 开发者 → API keyswrite 可启用操作;read 仅用于查询。

RIBBO_API_BASE

API 基础地址,末尾不带斜杠。例如:https://api.ribbo.app

Claude Desktop

claude_desktop_config.json(菜单 → Settings → Developer → Edit Config)中:

{
  "mcpServers": {
    "ribbo": {
      "command": "npx",
      "args": ["-y", "github:andrespadeto/ribbo-mcp"],
      "env": {
        "RIBBO_API_KEY": "bk_sua_chave_aqui",
        "RIBBO_API_BASE": "https://api.ribbo.app"
      }
    }
  }
}

重启 Claude Desktop。Ribbo 的工具会出现在聊天的工具图标中。

Cursor

.cursor/mcp.json(项目中)或全局 MCP 设置中,使用上面相同mcpServers 块。

发布到 npm 后,将 "github:andrespadeto/ribbo-mcp" 替换为 "ribbo-mcp"

工具

读取(只需要 read 密钥):

工具

功能

check_entitlements

查询某个客户的 entitlements。

list_subscriptions

列出租户的订阅(过滤/分页)。

get_subscription

查询某个订阅的详情。

get_gateway_events

网关在收款时返回的时间轴。

get_payment

查询某笔付款的详情。

get_customer_subscriptions

查询某个客户的订阅(按 external_id)。

get_customer_payments

查询某个客户的付款历史。

get_referral_link

获取推荐链接。

get_renewal_campaign_link

获取某个订阅者的续期活动链接。

list_renewal_campaign_links

获取某个活动的所有链接。

get_payment_link

获取订阅未结账单的支付链接。

get_order_payment_link

获取订单的支付链接(第二份 / 重新访问 Pix 支付)。(用于单次购买或提前续费)

写入(需要 write 密钥 —— 会改动资金/状态):

工具

功能

create_subscription

创建订阅(也支持无卡:手动 Pix / 迁移)。

change_plan

变更方案(升级/降级/改变周期)。

cancel_plan_change

取消已预定的方案变更。

cancel_subscription

取消订阅。

charge_now

立即触发当期账单收款。

reschedule_subscription

重新安排下一次收款时间。

remove_coupon

移除订阅的优惠券。

create_renewal_link

生成提前续期链接。

create_payment_method_link

生成更换支付方式的链接。

refund_payment

对一笔付款进行退款。

update_customer

更新客户的姓名/电话。

update_customer_email

更新客户邮箱(本地 + 网关)。

安全性

  • 密钥标识并隔离您的租户 —— 其他租户的数据永远无法访问。

  • 写操作会改动资金/状态(退款、收款、取消)。如果 AI 只需要查询,请使用 read 密钥;仅在需要实际执行操作时使用 write 密钥。

  • 密钥存放在 MCP 客户端的环境变量中(在您的机器上) —— 请将其视为机密,切勿提交。

  • 代码开源且不含任何密钥:所有凭据都来自环境变量。

API 约定

金额以(整数)为单位;ID 带有前缀(sub_cus_pay_ord_ 等);时间格式为 ISO-8601 UTC。错误格式为 Erro <状态>: {…}。完整契约(OpenAPI 3.1)见 GET {RIBBO_API_BASE}/v1/public/schema/

开发

git clone https://github.com/andrespadeto/ribbo-mcp.git
cd ribbo-mcp
npm install          # o "prepare" compila o TypeScript para dist/
cp .env.example .env # preencha RIBBO_API_KEY e RIBBO_API_BASE
npm run dev          # build + start
  • 源代码在 src/(TypeScript ESM)。src/index.ts 注册工具;src/api.ts 是 HTTP 客户端(Bearer)。

  • 构建产物(dist/)由 npm run build 生成,并且不进行版本控制

许可证

MIT © Ribbo

Install Server
A
license - permissive license
B
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides secure, role-based access to Stripe billing operations for AI assistants like Claude and Cursor. It enables users to manage customers, subscriptions, invoices, and refunds through a local proxy with server-side permission enforcement.
    12
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to access Magpie Payment Platform APIs for processing payments, creating checkout sessions, sending invoices, and managing payment links through natural conversation.
    90
    1
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andrespadeto/ribbo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server