Mcp Braspag

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

MCP server for Braspag — Cielo orchestration, token vault (Cartão Protegido), recurrence, split

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

概览

AI 生成的概览

面向 Braspag(Cielo 集团)的本地 MCP 服务器,让助手创建、捕获、作废和查询支付,管理定期扣款、卡令牌与市场分账。

可以做什么
  • 创建、捕获与作废交易,含 boleto、Pix、3DS 及零金额验卡
  • 按支付 ID 或商户订单号查询交易详情
  • 在 Cartão Protegido 卡库中令牌化、读取与删除卡片
  • 创建、停用、重新启用定期扣款,并更新金额与下次扣款日期
  • 创建分账交易并按子商户金额捕获分账
  • 提交独立反欺诈分析
适用场景
适合已开通 Braspag Pagador 的商户与团队,希望由助手执行收款、捕获、退款、定期扣款、卡令牌、市场分账和反欺诈等支付操作,通常先在沙箱环境试用。
运行要求
通过 npx 从 npm 包 @codespar/mcp-braspag 本地运行(需 Node.js)。需要由 Cielo/Braspag 客户团队开通的 Braspag 商户合约,并以环境变量设置 BRASPAG_MERCHANT_ID 与 BRASPAG_MERCHANT_KEY;BRASPAG_ENV 选择 sandbox(默认)或 production。需能访问 Braspag 接口。
安装前请注意
涉及真实资金:工具会创建交易、捕获、作废、修改定期扣款金额并删除卡库令牌,且 BRASPAG_ENV=production 会指向生产接口。BRASPAG_MERCHANT_KEY 是机密凭证,勿写入共享配置。卡数据与客户数据会发送至 Braspag 及其反欺诈服务。建议先在沙箱测试。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@codespar/mcp-braspag

MCP server for Braspag — Cielo Group's enterprise orchestration layer: multi-acquirer routing, token vault (Cartão Protegido), recurrence, marketplace split, antifraud orchestration.

[npm] [License: MIT]

Braspag vs. Cielo (Acquirer)

CodeSpar ships two Cielo Group servers with different business contracts:

ServerProductWhat it isWho uses it
@codespar/mcp-cieloCielo AcquirerDirect card acquiring rails (credit, debit, boleto, Pix)Any merchant taking cards through Cielo
@codespar/mcp-braspag (this)Braspag / PagadorEnterprise orchestration on top of any acquirerEnterprise BR retail (Magalu-tier): multi-acquirer routing, token vault, marketplace split

Braspag orchestrates across acquirers. You keep your Cielo (or Rede, or Stone) acquiring contract and layer Braspag on top for: smart routing, failover, vaulting cards once and reusing across acquirers (Cartão Protegido), driving recurrence, and splitting marketplace capture across sub-merchants.

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

json
{  "mcpServers": {    "braspag": {      "command": "npx",      "args": ["-y", "@codespar/mcp-braspag"],      "env": {        "BRASPAG_MERCHANT_ID": "your-merchant-uuid",        "BRASPAG_MERCHANT_KEY": "your-merchant-key",        "BRASPAG_ENV": "sandbox"      }    }  }}

Claude Code

bash
claude mcp add braspag -- npx @codespar/mcp-braspag

Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

json
{  "servers": {    "braspag": {      "command": "npx",      "args": ["-y", "@codespar/mcp-braspag"],      "env": {        "BRASPAG_MERCHANT_ID": "your-merchant-uuid",        "BRASPAG_MERCHANT_KEY": "your-merchant-key",        "BRASPAG_ENV": "sandbox"      }    }  }}

Tools (22)

ToolPurpose
create_saleCreate a sale on the Braspag Transaction API (POST /sales).
capture_saleCapture a pre-authorized sale (PUT /sales/{paymentId}/capture).
void_saleVoid / cancel a sale (PUT /sales/{paymentId}/void).
create_recurrentCreate a recurrent payment schedule (POST /recurrentPayments).
disable_recurrentDeactivate a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Deactivate).
update_recurrent_amountUpdate the charged amount on a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Amount).
get_saleGet sale detail by PaymentId (GET /sales/{paymentId} — Query API).
get_sale_by_order_idLook up sale(s) by MerchantOrderId (GET /sales?merchantOrderId=X — Query API).
get_recurrentGet a recurrent payment's configuration and history (GET /recurrentPayments/{recurrentPaymentId} — Query API).
tokenize_cardTokenize a card into the Braspag vault / Cartão Protegido (POST /card).
get_card_tokenRetrieve the stored card data associated with a Cartão Protegido token (GET /card/{token}).
create_split_saleCreate a sale with marketplace split rules (POST /sales with Payment.SplitPayments).
create_sale_3dsCreate a 3DS-authenticated credit sale (POST /sales).
create_zero_authZero-dollar authorization / card validation (POST /zeroauth).
create_boleto_saleConvenience wrapper to create a Boleto sale (POST /sales with Payment.Type=Boleto).
create_pix_saleConvenience wrapper to create a Pix sale (POST /sales with Payment.Type=Pix).
reactivate_recurrentReactivate a previously deactivated recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Reactiva...
update_recurrent_next_paymentUpdate the NextPaymentDate on a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/NextPaymentD...
update_recurrent_paymentUpdate the Payment (CreditCard + Customer) on a recurrent schedule (PUT /recurrentPayments/{recurrentPaymen...
create_antifraud_analysisSubmit a standalone Antifraud analysis (POST /fraudanalysis) through Braspag's antifraud orchestration (Cyb...
delete_card_tokenDelete a Cartão Protegido vault token (DELETE /card/{token}).
create_split_captureCapture a previously authorized split sale with overridden per-sub-merchant amounts (PUT /sales/{paymentId}...

Authentication

Braspag uses MerchantId (UUID) and MerchantKey (secret) headers on both the Transaction API and the Query API.

Environments

EnvTransaction APIQuery API
sandbox (default)https://apisandbox.braspag.com.br/v2https://apiquerysandbox.braspag.com.br/v2
productionhttps://api.braspag.com.br/v2https://apiquery.braspag.com.br/v2

Set via BRASPAG_ENV=production to switch.

Get your credentials

  1. Reach out to your Cielo / Braspag account team to enable Braspag Pagador on your merchant contract.
  2. Receive your MerchantId (UUID) and MerchantKey.
  3. Set the environment variables below.

Environment Variables

VariableRequiredDescription
BRASPAG_MERCHANT_IDYesMerchant UUID
BRASPAG_MERCHANT_KEYYesMerchant secret key
BRASPAG_ENVNosandbox (default) or production

Roadmap

v0.2 (planned)

  • create_sale_with_card_token — convenience wrapper that uses a Cartão Protegido token
  • delete_card_token — revoke a vault token
  • get_sale_antifraud — Query API antifraud detail
  • update_recurrent_payment — update non-amount fields on a recurrent
  • create_zero_auth — zero-dollar auth for card validation

v0.3 (planned)

  • Marketplace: sub-merchant onboarding endpoints
  • Bank slip (boleto) registered-only helpers
  • Webhook verification helper

Want to contribute? Open a PR or request a tool.

Links

Enterprise

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

License

MIT

来源:packages/payments/braspag/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 分