Mcp Openpay

io.github.codespar由 GitHub 账号 codespar 发布v0.2.2更新于 Oct 24, 2026

MCP server for Openpay — BBVA-owned Mexican gateway (cards, SPEI, OXXO, subscriptions, payouts)

已验证STDIO仅桌面金融商业与电商

概览

AI 生成的概览

面向墨西哥 Openpay 支付网关的本地 MCP 服务器,让助手创建扣款、管理客户、卡、订阅、代付与 Webhook。

可以做什么
  • 创建、查询、请款与退款扣款,可选择按客户维度调用
  • 创建、更新、列出与删除客户,并对卡进行令牌化、列出或删除
  • 创建订阅计划、为客户订阅并取消订阅
  • 创建与列出向银行账户的代付,并保存或删除客户银行账户
  • 注册、列出与删除 Webhook 端点
适用场景
适合需要让助手操作墨西哥 Openpay 商户账户的场景:受理卡、SPEI 或 OXXO 支付,管理周期订阅,向银行账户代付,或配置 Webhook。可先用沙箱模式验证流程,再接触生产环境。
运行要求
通过 npm 包以 npx 在本地运行,默认使用 stdio(也可用 MCP_HTTP 与 MCP_PORT 启用 HTTP 模式)。需要 OPENPAY_MERCHANT_ID 提供商户号,OPENPAY_PRIVATE_KEY 提供私有 API 密钥;OPENPAY_ENV 选择 sandbox(默认)或 production。需要能访问 Openpay API 的网络。
安装前请注意
OPENPAY_PRIVATE_KEY 中的私有 API 密钥是完整商户凭证,以 HTTP Basic 方式发送,请勿写入日志或共享配置。多个工具会真实动账或改动数据:扣款、请款、退款、代付、订阅、删除客户与卡、以及 Webhook。在验证流程前请将 OPENPAY_ENV 设为 sandbox。只有在符合 PCI-DSS 时才在服务端传输原始卡号与 CVV,优先使用客户端令牌化。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Openpay,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@codespar/mcp-openpay

MCP server for Openpay — the BBVA-owned Mexican payment gateway.

Openpay is the main BBVA-backed alternative to Conekta for Mexican online merchants. Adding it to the catalog alongside @codespar/mcp-conekta closes the "big two" MX gateway story and opens the BBVA rails (SPEI, OXXO, domestic cards) to agents. Differentiators in this catalog: native subscriptions (plans + per-customer recurring billing) and marketplace payouts.

Tools (23)

ToolPurpose
create_chargeCreate a charge.
get_chargeRetrieve a charge.
capture_chargeCapture a previously authorized charge (when the original charge used capture=false).
refund_chargeRefund a captured charge.
create_customerCreate a customer record.
get_customerRetrieve a customer by Openpay customer id.
list_customersList customers with optional filters.
create_cardTokenize a card.
delete_cardDelete a tokenized card.
create_planCreate a subscription plan.
create_subscriptionSubscribe a customer to a plan.
create_payoutPay out MXN to a bank account.
update_customerUpdate a stored customer (PUT /customers/{id}).
delete_customerDelete a customer (DELETE /customers/{id}).
get_cardRetrieve a tokenized card.
list_cardsList tokenized cards.
create_bank_accountStore a customer bank account (POST /customers/{customer_id}/bankaccounts).
delete_bank_accountDelete a stored customer bank account (DELETE /customers/{customer_id}/bankaccounts/{id}).
cancel_subscriptionCancel a customer's subscription (DELETE /customers/{customer_id}/subscriptions/{id}).
list_payoutsList payouts.
create_webhookRegister a webhook endpoint (POST /webhooks).
list_webhooksList configured webhook subscriptions (GET /webhooks).
delete_webhookDelete a webhook subscription (DELETE /webhooks/{id}).

Install

bash
npm install @codespar/mcp-openpay

Environment

bash
OPENPAY_MERCHANT_ID="..."  # merchant id (part of the API URL path)OPENPAY_PRIVATE_KEY="..."  # private API key — secretOPENPAY_ENV="sandbox"      # 'sandbox' (default) | 'production'

Authentication

HTTP Basic. The private key is the username, and the password is empty:

Authorization: Basic base64(OPENPAY_PRIVATE_KEY + ":")Content-Type: application/json

The server handles the Base64 encoding automatically — you only configure the three env vars.

Base URLs

EnvHost
sandbox (default)https://sandbox-api.openpay.mx/v1/{merchant_id}
productionhttps://api.openpay.mx/v1/{merchant_id}

Run

bash
# stdio (default — for Claude Desktop, Cursor, etc)npx @codespar/mcp-openpay
# HTTP (for server-to-server testing)MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-openpay

Scoping notes

Several Openpay resources can be addressed at either merchant scope or customer scope. The tools expose this via an optional customer_id parameter:

  • create_charge, get_charge, capture_charge, refund_charge — routed to /customers/{customer_id}/... when customer_id is set, else /....
  • create_card, delete_card — same pattern.
  • create_payout — customer-scoped payout requires the customer to have requires_account=true.
  • create_subscription — customer scope is required by the API (plans are merchant-scoped; subscriptions are always per-customer).

PCI scope

Prefer client-side tokenization with Openpay.js and pass the resulting token_id / source_id to the server. Only send raw PANs/CVVs server-side if you are PCI-DSS compliant.

Docs

https://documents.openpay.mx/en/api

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

来源:packages/payments/openpay/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分