Mcp Pagbrasil

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

PagBrasil — cross-border acquiring into Brazil: Pix, Boleto Flash, refunds

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

概览

AI 生成的概览

面向巴西跨境收单机构 PagBrasil 的本地 MCP 服务器,让助手创建 Pix、Boleto 和信用卡订单、查询状态并办理退款。

可以做什么
创建订单并发起 Pix、Boleto 或信用卡收款,返回 Pix 代码与图片,或 Boleto 条码与 PDF 链接。查询订单当前状态,例如轮询以确认是否已结算。对已结算订单办理全额或按金额的部分退款。原始 XML 响应会原样返回,避免字段丢失。
适用场景
适合需要协助面向巴西市场的国际商户处理收款的场景:发起 Pix 或 Boleto 收款、确认订单是否结算、为客户退款,也可在沙箱环境中测试。
运行要求
通过 npx 从 npm 包在本地运行,需要 Node.js。需要在 PagBrasil 后台获取商户令牌并配置到 PAGBRASIL_PBTOKEN,以及密钥短语配置到 PAGBRASIL_SECRET。PAGBRASIL_BASE_URL 可选,默认指向沙箱;生产地址需在签署支付服务协议后由商户获得。需要访问 PagBrasil 的网络。
安装前请注意
涉及真实支付凭证:PAGBRASIL_PBTOKEN 和 PAGBRASIL_SECRET 会作为请求体字段随每次请求发送,不要写入共享配置。它可以创建真实扣款并办理会转移资金的退款,建议先在沙箱测试。订单号在同一客户税号下必须唯一,税号必须是用户提供的有效 CPF 或 CNPJ,不可编造。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@codespar/mcp-pagbrasil

MCP server for PagBrasil — the cross-border acquirer for international merchants selling into Brazil: Pix, Automatic Pix (PagStream), Boleto Flash, PEC Flash and local credit cards with installments. Distinct from PagBank/PagSeguro.

[npm] [License: MIT]

Quick Start

Claude Desktop

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

json
{  "mcpServers": {    "pagbrasil": {      "command": "npx",      "args": ["-y", "@codespar/mcp-pagbrasil"],      "env": {        "PAGBRASIL_PBTOKEN": "your-merchant-token",        "PAGBRASIL_SECRET": "your-secret-phrase"      }    }  }}

Claude Code

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

Cursor / VS Code

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

json
{  "servers": {    "pagbrasil": {      "command": "npx",      "args": ["-y", "@codespar/mcp-pagbrasil"],      "env": {        "PAGBRASIL_PBTOKEN": "your-merchant-token",        "PAGBRASIL_SECRET": "your-secret-phrase"      }    }  }}

Authentication

Every request carries the merchant token (pbtoken) and the secret phrase as body fields — there is no auth header. This server injects both from PAGBRASIL_PBTOKEN and PAGBRASIL_SECRET.

API shape (worth knowing)

PagBrasil's API is form-urlencoded (not JSON) and answers XML. The merchant token (pbtoken) and secret phrase travel as body fields on every request — this server injects both from the environment. Tool responses hand the raw XML to the agent under xml so no fields are lost.

Tools (3)

ToolEndpointWhat it does
create_orderPOST /order/addCreate an order / request a payment (pix, boleto, creditcard). Pix responses carry pix_code + pix_image; boleto responses carry the bar code + PDF URL
get_orderPOST /order/getFetch an order's current status — poll to detect settlement
refund_orderPOST /order/refundRefund a settled order (amount_brl for partial, omit for full)

Environment

VariableRequiredDescription
PAGBRASIL_PBTOKENyesMerchant token from the PagBrasil Dashboard
PAGBRASIL_SECRETyesSecret phrase from the Dashboard
PAGBRASIL_BASE_URLnoDefaults to https://sandbox.pagbrasil.com/api. Production hosts are issued per-merchant after the Payment Service Agreement — set the URL your dashboard provides

Notes

  • amount_brl is in major units as a string: '125.00' = R$ 125,00.
  • order_number must be unique per customer_taxid. Same number + same taxid = idempotent no-op; same number + different taxid = rejected (Duplicated order).
  • customer_taxid must be a valid CPF or CNPJ — agents should ask the user, never invent one.

Enterprise

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

License

MIT © CodeSpar

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

工具

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

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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