mcp-safrapay MCP Server
MCP server for Safrapay — Banco Safra acquirer: credit, Pix, boleto + split, 3DS, chargebacks
mcp-safrapay scores 45 (Fair), with no SPDX license recorded. It installs as a local process. It declares 22 tools. Filed under Uncategorized. Package registries report about 52 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
45 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- No license recorded.
License, quality and maintenance
Quality: Grade A
85/100 for listing completeness. Lost points: 5 of 22 tools barely described, short summary, no docs link.
How quality is graded
Where the 45 comes from
22 + 10 + 0 + 0 + 10 + 3 = 45. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 10 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 0 of 20 points.A clear, OSI-style open-source license.
License: 0 of 10 points.Not archived, a secure install path, a pinned version.
Security: 10 of 10 points.A real summary, a README with depth, listed tools.
Docs: 3 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "codespar-safrapay": { "command": "npx", "args": [ "-y", "@codespar/mcp-safrapay@0.2.0-alpha.3" ], "env": { "SAFRAPAY_CLIENT_ID": "", "SAFRAPAY_CLIENT_SECRET": "YOUR_SAFRAPAY_CLIENT_SECRET", "SAFRAPAY_MERCHANT_ID": "", "SAFRAPAY_ENV": "" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
SAFRAPAY_CLIENT_ID | Required | Safrapay merchant CNPJ (sent as merchantCredential header on auth) |
SAFRAPAY_CLIENT_SECRETSecret | Required | Safrapay MerchantToken used to compute the BCRYPT Authorization header on auth |
SAFRAPAY_MERCHANT_ID | Required | Safrapay merchant id (used in request bodies where applicable) |
SAFRAPAY_ENV | Optional | Environment: 'sandbox' or 'production'. Defaults to sandbox. |
Tools22Tool docs quality grade D
All capabilitiesauthenticate_3dstoolKick off 3-D Secure authentication before authorizepayment.
Authorize a credit-card payment on Safrapay.
cancel_paymenttoolCancel (void) an authorized-but-uncaptured payment.
Cancel an active recurrence.
capture_paymenttoolCapture a previously authorized (pre-auth) payment.
create_boletotoolCreate a boleto charge.
Create a hosted-checkout payment link.
create_pixtoolCreate a Pix charge.
Create a recurring-billing subscription.
Configure split distribution for an existing charge.
Revoke a stored card token.
get_paymenttoolRetrieve a charge by Safrapay chargeId.
About
@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)
| Tool | Purpose |
|---|---|
authorize_payment | Authorize a credit-card payment on Safrapay. |
capture_payment | Capture a previously authorized (pre-auth) payment. |
cancel_payment | Cancel (void) an authorized-but-uncaptured payment. |
refund_payment | Refund a captured payment. |
create_pix | Create a Pix charge. |
create_boleto | Create a boleto charge. |
get_payment | Retrieve a charge by Safrapay chargeId. |
tokenize_card | Tokenize a card for PCI-safe reuse. |
create_split_rule | Configure split distribution for an existing charge. |
get_statement | Retrieve the digital statement (extrato). |
list_transactions | List charges with optional filters. |
delete_card_token | Revoke a stored card token. |
search_by_merchant_order | Look up charges by the merchant-side order identifier (the order_id supplied at creation). |
query_chargeback | Retrieve chargeback (contestacao) detail for a charge: reason code, acquirer deadline, dispute amount, evid... |
query_installments | Simulate an installment plan for a given amount. |
authenticate_3ds | Kick off 3-D Secure authentication before authorize_payment. |
create_recurrence | Create a recurring-billing subscription. |
get_recurrence | Retrieve a recurrence by id: schedule, next-charge date, charge history, status. |
cancel_recurrence | Cancel an active recurrence. |
get_settlement_report | Retrieve a settlement (liquidacao) report from the reconciliation host. |
create_payment_link | Create a hosted-checkout payment link. |
register_webhook | Bulk-register webhook subscriptions on the Safrapay webhook product. |
Install
npm install @codespar/mcp-safrapay@alpha
Environment
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:
| Product | Sandbox | Production |
|---|---|---|
| Gateway (payments) | https://payment-dev.aditum.com.br | https://payment.aditum.com.br |
| Portal (management) | https://portal-dev.aditum.com.br | https://portal-api.aditum.com.br |
| Reconciliation | https://reconciliation-dev.aditum.com.br | https://reconciliation-api.aditum.com.br |
| Webhook | https://webhook-dev.aditum.com.br | https://webhook.aditum.com.br |
Authentication
Gateway uses a two-step bootstrap:
POST {gateway}/v2/merchant/authwith headersAuthorization: <BCRYPT(CNPJ+MerchantToken)>andmerchantCredential: <CNPJ>to exchange for a JWT access token.- 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
# stdio (default)
npx @codespar/mcp-safrapay
# HTTP
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-safrapay
Endpoint map (used by tools)
| Tool | Method | Path (under gateway, unless noted) |
|---|---|---|
authorize_payment | POST | /v2/charge/authorization or /v2/charge/preauthorization |
capture_payment | PUT | /v2/charge/capture/{chargeId} |
cancel_payment | PUT | /v2/charge/cancelation/{chargeId} |
refund_payment | PUT | /v2/charge/cancelation/{chargeId} (partial amount) |
create_pix | POST | /v2/charge/pix |
create_boleto | POST | /v2/charge/boleto |
get_payment | GET | /v2/charge/{chargeId} |
tokenize_card | POST | /v2/card (or /v2/temporary/card) |
create_split_rule | PUT | /v2/charge/split/{chargeId} |
get_statement | GET | /v2/Account/Movement/Extract |
list_transactions | GET | /v2/charges |
register_webhook | POST | {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
Frequently asked questions
What is mcp-safrapay MCP Server?
MCP server for Safrapay — Banco Safra acquirer: credit, Pix, boleto + split, 3DS, chargebacks
How do I install mcp-safrapay MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. mcp-safrapay MCP Server runs locally from the npm package @codespar/mcp-safrapay with the command npx -y @codespar/mcp-safrapay@0.2.0-alpha.3.
Does mcp-safrapay MCP Server support remote (HTTP) connections?
No remote endpoint is listed for mcp-safrapay MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does mcp-safrapay MCP Server provide?
mcp-safrapay MCP Server provides 22 tools, including authenticate_3ds, authorize_payment, cancel_payment, and cancel_recurrence. See the full tool list for descriptions and parameters.
How is mcp-safrapay MCP Server's trust score calculated?
mcp-safrapay MCP Server scores 45 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.