Mcp Safrapay

io.github.codespar由 GitHub 帳號 codespar 發布v0.2.0-alpha.3更新於 Oct 24, 2026

MCP server for Safrapay — Banco Safra acquirer: credit, Pix, boleto + split, 3DS, chargebacks

已驗證STDIO僅桌面金融商業與電商

概覽

AI 產生的概覽

針對 Safrapay(Banco Safra 收單機構)的在地 MCP 伺服器,讓助理建立與管理信用卡、Pix、boleto 收款、退款、分帳、訂閱與對帳查詢。

可以做什麼
授權、請款、取消與退款信用卡付款,並在授權前完成 3-D Secure 驗證。建立 Pix 與 boleto 收款、付款連結、分帳規則與循環扣款訂閱,並可取消訂閱。依 chargeId 或商家訂單編號查詢收款、列出交易、試算分期,取得對帳單與結算報告。將卡片權杖化、撤銷已儲存的卡權杖、查詢拒付明細,並批次註冊 webhook。
適用情境
適合使用 Safrapay/Aditum 支付的巴西商家或開發者,希望由助理完成收款建立、退款、對帳查詢或 webhook 設定。目前為早期 alpha 版本,較適合在沙箱中試驗,而非用於真實付款作業。
執行需求
以 npm 套件形式在本機執行(需要 Node.js),預設使用 stdio,設定 MCP_HTTP 後可透過 HTTP 執行。需要 SAFRAPAY_CLIENT_ID(商家 CNPJ)、SAFRAPAY_CLIENT_SECRET(商家權杖)、SAFRAPAY_MERCHANT_ID,以及選用的 SAFRAPAY_ENV(預設 sandbox)。需要能連線到 Aditum 代管的 Safrapay 各主機。
安裝前請注意
涉及真實付款憑證:SAFRAPAY_CLIENT_SECRET 是用來計算驗證標頭的商家權杖,切勿寫入日誌。相關工具會動用金流與變更資料——授權、請款、退款、取消、建立收款與訂閱、撤銷卡權杖、註冊 webhook。README 說明驗證流程與端點路徑尚未驗證、屬於推測,請先在沙箱測試,驗證前不要用於正式環境。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Safrapay,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@codespar/mcp-safrapay

MCP server for Safrapay — Banco Safra's acquirer. B2B-banking crossover focused on mid-to-large BR merchants and private-banking clientele.

Safrapay's API surface is operated on Aditum's payment platform (documented at safrapay-docs.aditum.com.br). The gateway, portal, reconciliation, and webhook products are split across separate base hosts.

Status: 0.1.0-alpha.1. The endpoint paths here were derived from the Aditum-hosted Safrapay developer docs (publicly reachable). Auth flow (BCRYPT + CNPJ on gateway, JWT Bearer thereafter) is best-effort: the BCRYPT hash input format is not fully specified in public docs and very likely requires a sandbox account to finalize. Treat all tools as scaffolding until validated against a live sandbox merchant.

Tools (22)

ToolPurpose
authorize_paymentAuthorize a credit-card payment on Safrapay.
capture_paymentCapture a previously authorized (pre-auth) payment.
cancel_paymentCancel (void) an authorized-but-uncaptured payment.
refund_paymentRefund a captured payment.
create_pixCreate a Pix charge.
create_boletoCreate a boleto charge.
get_paymentRetrieve a charge by Safrapay chargeId.
tokenize_cardTokenize a card for PCI-safe reuse.
create_split_ruleConfigure split distribution for an existing charge.
get_statementRetrieve the digital statement (extrato).
list_transactionsList charges with optional filters.
delete_card_tokenRevoke a stored card token.
search_by_merchant_orderLook up charges by the merchant-side order identifier (the order_id supplied at creation).
query_chargebackRetrieve chargeback (contestacao) detail for a charge: reason code, acquirer deadline, dispute amount, evid...
query_installmentsSimulate an installment plan for a given amount.
authenticate_3dsKick off 3-D Secure authentication before authorize_payment.
create_recurrenceCreate a recurring-billing subscription.
get_recurrenceRetrieve a recurrence by id: schedule, next-charge date, charge history, status.
cancel_recurrenceCancel an active recurrence.
get_settlement_reportRetrieve a settlement (liquidacao) report from the reconciliation host.
create_payment_linkCreate a hosted-checkout payment link.
register_webhookBulk-register webhook subscriptions on the Safrapay webhook product.

Install

bash
npm install @codespar/mcp-safrapay@alpha

Environment

bash
SAFRAPAY_CLIENT_ID="..."      # Merchant CNPJ (sent as merchantCredential)SAFRAPAY_CLIENT_SECRET="..."  # MerchantToken (used to compute BCRYPT)SAFRAPAY_MERCHANT_ID="..."    # Safrapay merchant id (body field where required)SAFRAPAY_ENV="sandbox"        # 'sandbox' (default) or 'production'

Base URLs

Safrapay splits its API into four products hosted on distinct domains:

ProductSandboxProduction
Gateway (payments)https://payment-dev.aditum.com.brhttps://payment.aditum.com.br
Portal (management)https://portal-dev.aditum.com.brhttps://portal-api.aditum.com.br
Reconciliationhttps://reconciliation-dev.aditum.com.brhttps://reconciliation-api.aditum.com.br
Webhookhttps://webhook-dev.aditum.com.brhttps://webhook.aditum.com.br

Authentication

Gateway uses a two-step bootstrap:

  1. POST {gateway}/v2/merchant/auth with headers Authorization: <BCRYPT(CNPJ+MerchantToken)> and merchantCredential: <CNPJ> to exchange for a JWT access token.
  2. Subsequent calls send Authorization: Bearer <jwt>.

The server caches the JWT in memory until 60 s before expiry. The BCRYPT input concatenation is an informed guess; refine once you have a sandbox account.

Run

bash
# stdio (default)npx @codespar/mcp-safrapay
# HTTPMCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-safrapay

Endpoint map (used by tools)

ToolMethodPath (under gateway, unless noted)
authorize_paymentPOST/v2/charge/authorization or /v2/charge/preauthorization
capture_paymentPUT/v2/charge/capture/{chargeId}
cancel_paymentPUT/v2/charge/cancelation/{chargeId}
refund_paymentPUT/v2/charge/cancelation/{chargeId} (partial amount)
create_pixPOST/v2/charge/pix
create_boletoPOST/v2/charge/boleto
get_paymentGET/v2/charge/{chargeId}
tokenize_cardPOST/v2/card (or /v2/temporary/card)
create_split_rulePUT/v2/charge/split/{chargeId}
get_statementGET/v2/Account/Movement/Extract
list_transactionsGET/v2/charges
register_webhookPOST{webhook}/v1/webhook/bulk

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/safrapay/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.0-alpha.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分