Mcp Braspag

io.github.codesparPublished by GitHub account codesparv0.2.2Updated Oct 24, 2026

MCP server for Braspag — Cielo orchestration, token vault (Cartão Protegido), recurrence, split

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

Local MCP server for Braspag (Cielo Group) that lets an assistant create, capture, void and query payments, manage recurrence, vault cards and split…

What you can do
  • Create, capture and void sales, including boleto, Pix, 3DS and zero-dollar card validation
  • Look up sales by payment ID or merchant order ID
  • Tokenize, retrieve and delete cards in the Cartão Protegido vault
  • Create, deactivate, reactivate and update recurrent payment schedules, amounts and next payment dates
  • Create split sales and capture split sales with per-sub-merchant amounts
  • Submit standalone antifraud analyses
When to use it
Meant for merchants and teams already running Braspag Pagador who want an assistant to drive payment operations: charging, capturing, refunding, recurring billing, card vaulting, marketplace splits and antifraud checks, typically first in the sandbox environment.
Requirements
Runs locally via npx from the npm package @codespar/mcp-braspag (Node.js). Requires a Braspag merchant contract enabled by the Cielo/Braspag account team, with BRASPAG_MERCHANT_ID and BRASPAG_MERCHANT_KEY set as environment variables; BRASPAG_ENV selects sandbox (default) or production. Network access to Braspag APIs.
Before you install
Handles real money: tools create sales, capture, void, change recurring amounts and delete vault tokens, and BRASPAG_ENV=production points them at live endpoints. BRASPAG_MERCHANT_KEY is a secret credential; keep it out of shared configs. Card data and customer data are sent to Braspag and its antifraud orchestration. Test in sandbox first.

Installation

In SourceWeft

  1. Open Mcp Braspag in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@codespar/mcp-braspag

MCP server for Braspag — Cielo Group's enterprise orchestration layer: multi-acquirer routing, token vault (Cartão Protegido), recurrence, marketplace split, antifraud orchestration.

[npm] [License: MIT]

Braspag vs. Cielo (Acquirer)

CodeSpar ships two Cielo Group servers with different business contracts:

ServerProductWhat it isWho uses it
@codespar/mcp-cieloCielo AcquirerDirect card acquiring rails (credit, debit, boleto, Pix)Any merchant taking cards through Cielo
@codespar/mcp-braspag (this)Braspag / PagadorEnterprise orchestration on top of any acquirerEnterprise BR retail (Magalu-tier): multi-acquirer routing, token vault, marketplace split

Braspag orchestrates across acquirers. You keep your Cielo (or Rede, or Stone) acquiring contract and layer Braspag on top for: smart routing, failover, vaulting cards once and reusing across acquirers (Cartão Protegido), driving recurrence, and splitting marketplace capture across sub-merchants.

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

json
{  "mcpServers": {    "braspag": {      "command": "npx",      "args": ["-y", "@codespar/mcp-braspag"],      "env": {        "BRASPAG_MERCHANT_ID": "your-merchant-uuid",        "BRASPAG_MERCHANT_KEY": "your-merchant-key",        "BRASPAG_ENV": "sandbox"      }    }  }}

Claude Code

bash
claude mcp add braspag -- npx @codespar/mcp-braspag

Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

json
{  "servers": {    "braspag": {      "command": "npx",      "args": ["-y", "@codespar/mcp-braspag"],      "env": {        "BRASPAG_MERCHANT_ID": "your-merchant-uuid",        "BRASPAG_MERCHANT_KEY": "your-merchant-key",        "BRASPAG_ENV": "sandbox"      }    }  }}

Tools (22)

ToolPurpose
create_saleCreate a sale on the Braspag Transaction API (POST /sales).
capture_saleCapture a pre-authorized sale (PUT /sales/{paymentId}/capture).
void_saleVoid / cancel a sale (PUT /sales/{paymentId}/void).
create_recurrentCreate a recurrent payment schedule (POST /recurrentPayments).
disable_recurrentDeactivate a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Deactivate).
update_recurrent_amountUpdate the charged amount on a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Amount).
get_saleGet sale detail by PaymentId (GET /sales/{paymentId} — Query API).
get_sale_by_order_idLook up sale(s) by MerchantOrderId (GET /sales?merchantOrderId=X — Query API).
get_recurrentGet a recurrent payment's configuration and history (GET /recurrentPayments/{recurrentPaymentId} — Query API).
tokenize_cardTokenize a card into the Braspag vault / Cartão Protegido (POST /card).
get_card_tokenRetrieve the stored card data associated with a Cartão Protegido token (GET /card/{token}).
create_split_saleCreate a sale with marketplace split rules (POST /sales with Payment.SplitPayments).
create_sale_3dsCreate a 3DS-authenticated credit sale (POST /sales).
create_zero_authZero-dollar authorization / card validation (POST /zeroauth).
create_boleto_saleConvenience wrapper to create a Boleto sale (POST /sales with Payment.Type=Boleto).
create_pix_saleConvenience wrapper to create a Pix sale (POST /sales with Payment.Type=Pix).
reactivate_recurrentReactivate a previously deactivated recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Reactiva...
update_recurrent_next_paymentUpdate the NextPaymentDate on a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/NextPaymentD...
update_recurrent_paymentUpdate the Payment (CreditCard + Customer) on a recurrent schedule (PUT /recurrentPayments/{recurrentPaymen...
create_antifraud_analysisSubmit a standalone Antifraud analysis (POST /fraudanalysis) through Braspag's antifraud orchestration (Cyb...
delete_card_tokenDelete a Cartão Protegido vault token (DELETE /card/{token}).
create_split_captureCapture a previously authorized split sale with overridden per-sub-merchant amounts (PUT /sales/{paymentId}...

Authentication

Braspag uses MerchantId (UUID) and MerchantKey (secret) headers on both the Transaction API and the Query API.

Environments

EnvTransaction APIQuery API
sandbox (default)https://apisandbox.braspag.com.br/v2https://apiquerysandbox.braspag.com.br/v2
productionhttps://api.braspag.com.br/v2https://apiquery.braspag.com.br/v2

Set via BRASPAG_ENV=production to switch.

Get your credentials

  1. Reach out to your Cielo / Braspag account team to enable Braspag Pagador on your merchant contract.
  2. Receive your MerchantId (UUID) and MerchantKey.
  3. Set the environment variables below.

Environment Variables

VariableRequiredDescription
BRASPAG_MERCHANT_IDYesMerchant UUID
BRASPAG_MERCHANT_KEYYesMerchant secret key
BRASPAG_ENVNosandbox (default) or production

Roadmap

v0.2 (planned)

  • create_sale_with_card_token — convenience wrapper that uses a Cartão Protegido token
  • delete_card_token — revoke a vault token
  • get_sale_antifraud — Query API antifraud detail
  • update_recurrent_payment — update non-amount fields on a recurrent
  • create_zero_auth — zero-dollar auth for card validation

v0.3 (planned)

  • Marketplace: sub-merchant onboarding endpoints
  • Bank slip (boleto) registered-only helpers
  • Webhook verification helper

Want to contribute? Open a PR or request a tool.

Links

Enterprise

Need governance, budget limits, and audit trails for agent-driven payments on Braspag? CodeSpar Enterprise adds a policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Source: packages/payments/braspag/README.md at commit d0a519a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts