Banco Safra's acquirer — premium/enterprise private-banking segment. Operated on Aditum's payment platform. Authorize/capture/cancel, Pix, boleto, tokenization, split, digital statements. Alpha on npm — BCRYPT auth recipe and body casing pending sandbox validation.
Safrapay gives your agent 22 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.
authorize_payment — Authorize a credit-card payment on Safrapay. Set preauth=true to authorize only (use capture_payment later); false to authorize+capture atomically.capture_payment — Capture a previously authorized (pre-auth) payment.cancel_payment — Cancel (void) an authorized-but-uncaptured payment. Also used for full refund of a captured payment in Safrapay.// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("authorize_payment", { /* ... */ });$ npm install @codespar/mcp-safrapay@alphaAdd this entry to your claude_desktop_config.json (or any MCP-compatible client config).
{
"mcpServers": {
"safrapay": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-safrapay@alpha"
],
"env": {
"SAFRAPAY_CLIENT_ID": "<your_safrapay_client_id>",
"SAFRAPAY_CLIENT_SECRET": "<your_safrapay_client_secret>",
"SAFRAPAY_MERCHANT_ID": "<your_safrapay_merchant_id>"
}
}
}
}After restart, your agent can call any of the 22 tools below — try authorize_payment first.
Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.
SAFRAPAY_CLIENT_IDSafrapay merchant CNPJ (sent as merchantCredential header on auth)
SAFRAPAY_CLIENT_SECRETSafrapay MerchantToken used to compute the BCRYPT Authorization header on auth
SAFRAPAY_MERCHANT_IDSafrapay merchant id (used in request bodies where applicable)
SAFRAPAY_ENVEnvironment: 'sandbox' or 'production'. Defaults to sandbox.
Each tool is independent — your agent loads only what it needs to reduce context and response time.
authorize_paymentcapture_paymentcancel_paymentrefund_paymentcreate_pixcreate_boletoget_paymenttokenize_cardMCP is a protocol — any framework that speaks it can mount this server.