Skip to main content
MCP server CX Codex

mcp-safrapay — Claude Code MCP server: what it does, how to install

Connects coding agents to Safrapay Brazilian payment infrastructure for Pix, boleto, card operations, and dispute tracking.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env SAFRAPAY_CLIENT_ID=<SAFRAPAY_CLIENT_ID> --env SAFRAPAY_CLIENT_SECRET=<SAFRAPAY_CLIENT_SECRET> --env SAFRAPAY_MERCHANT_ID=<SAFRAPAY_MERCHANT_ID> --env SAFRAPAY_ENV=<SAFRAPAY_ENV> --transport stdio safrapay -- npx -y @codespar/mcp-safrapay
Open on GitHub

What mcp-safrapay does

This MCP server exposes Banco Safra's acquirer endpoints on the Aditum engine to LLMs. It packs 22 tools covering credit charges, Pix generation, recurring subscriptions, and hosted payment links. Agents can query installment plans, inspect chargeback dispute deadlines, and manage webhook registrations directly in the conversation.

Safrapay routes traffic across four separate environments: gateway, portal, reconciliation, and webhook servers. Authentication relies on an initial CNPJ and MerchantToken exchange hashed via BCRYPT, which issues a temporary JWT. Because public Aditum documentation leaves the exact input string format ambiguous, verify the handshake against a real sandbox merchant account before running live transactions.

The server runs over stdio via npx or as an HTTP daemon. Configuration requires SAFRAPAY_CLIENT_ID, SAFRAPAY_CLIENT_SECRET, and SAFRAPAY_MERCHANT_ID passed as environment variables.

What it helps with

  • issue Pix charges and generate boleto slips
  • tokenize credit cards and initiate 3DS authentication
  • configure payment splits across merchant accounts
  • pull settlement reconciliation files and inspect chargebacks

Example prompts for the agent

  • Create a Pix charge for order 4821 with an expiration of 30 minutes.
  • Tokenize the card details for recurring billing using tokenize_card.
  • Query dispute reasons and evidence deadlines for chargeback ch_123.

How to install mcp-safrapay

Platform CLI

claude mcp add --env SAFRAPAY_CLIENT_ID=<SAFRAPAY_CLIENT_ID> --env SAFRAPAY_CLIENT_SECRET=<SAFRAPAY_CLIENT_SECRET> --env SAFRAPAY_MERCHANT_ID=<SAFRAPAY_MERCHANT_ID> --env SAFRAPAY_ENV=<SAFRAPAY_ENV> --transport stdio safrapay -- npx -y @codespar/mcp-safrapay

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-safrapay

How to install mcp-safrapay in Claude Code?

Run `claude mcp add mcp-safrapay -e SAFRAPAY_CLIENT_ID=<SAFRAPAY_CLIENT_ID> -e SAFRAPAY_CLIENT_SECRET=<SAFRAPAY_CLIENT_SECRET> -e SAFRAPAY_MERCHANT_ID=<SAFRAPAY_MERCHANT_ID> -- npx -y @codespar/mcp-safrapay`.

What does mcp-safrapay do?

It gives AI assistants direct access to the Safrapay Aditum gateway, handling card payments, Pix, boletos, settlement reconciliation, and dispute reviews.

Why is a sandbox account required for validation?

The BCRYPT string concatenation for gateway login is not explicitly defined in public Aditum docs. You need a test merchant account to confirm the auth handshake.

Similar MCP servers

Everything for Finance and business →

From the same set124

mcp-shopify Wires your agent to the Shopify Admin REST API for orders, products, customers, stock and fulfillment. Useful when merchant tooling has to talk to Shopify directly instead of a regional platform. CX Codex +1 ★ 274repo stars mcp-shopee Brings Shopee Partner API v2 to coding agents. It automates inventory updates, order tracking, returns processing, and chat communication. CX Codex +1 ★ 274repo stars mcp-sendgrid Connects SendGrid to an AI agent for transactional and marketing email, templates, contacts, suppression data, and delivery stats. CX Codex +1 ★ 274repo stars mcp-santander Wires Santander Brasil's banking API into your coding agent: Pix payments, boletos, account statement, balance. Built for projects that settle with the bank directly instead of a PSP. CX Codex +1 ★ 274repo stars mcp-rinne Connect an AI agent to Rinne for merchants, card and PIX payments, balances, payouts, and access management. CX Codex +1 ★ 274repo stars mcp-rede Wires 22 tools of Brazilian acquirer Rede into your AI agent: authorizations, captures, refunds, card tokens, recurrences, 3DS and boleto. CX Codex +1 ★ 274repo stars mcp-rd-station Connects RD Station CRM and marketing automation to your AI assistant. Useful for managing contacts, tracking deals, and triggering conversion webhooks from code. CX Codex +1 ★ 274repo stars mcp-rapyd Connects Rapyd to AI coding clients for payments, payouts, refunds, and managed wallets. Useful for global collection, cash pickup, and marketplace balances. CX Codex +1 ★ 274repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor