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 分