Skip to main content
BR

Braspag

v0.2.1API Key

Cielo's enterprise orchestration arm — distinct from the Cielo Acquirer server. Multi-acquirer routing, Cartão Protegido (token vault), recurrence, marketplace split, antifraude. Target: enterprise BR retail.

22 tools3 env vars🇧🇷 Brazilstable on npm

What your agent can do

Braspag gives your agent 22 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • create_saleCreate a sale on the Braspag Transaction API (POST /sales). Pass a full Braspag sale payload. Payment.Type may be CreditCard, DebitCard, Boleto, Pix, or EletronicTransfer. Braspag orchestrates routing across multiple acquirers based on merchant-level rules.
  • capture_saleCapture a pre-authorized sale (PUT /sales/{paymentId}/capture). Supports partial capture via amount, and optional serviceTaxAmount (airline / travel merchants).
  • void_saleVoid / cancel a sale (PUT /sales/{paymentId}/void). Supports full void (omit amount) or partial void.
Example call
// 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("create_sale", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-braspag

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "braspag": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-braspag"
      ],
      "env": {
        "BRASPAG_MERCHANT_ID": "<your_braspag_merchant_id>",
        "BRASPAG_MERCHANT_KEY": "<your_braspag_merchant_key>"
      }
    }
  }
}

After restart, your agent can call any of the 22 tools below — try create_sale first.

Environment variables · 3

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

BRASPAG_MERCHANT_ID
requiredsecret

Braspag MerchantId (UUID)

BRASPAG_MERCHANT_KEY
requiredsecret

Braspag MerchantKey (secret)

BRASPAG_ENV
optional

Environment: 'sandbox' or 'production'. Defaults to 'sandbox'.

Available tools · 22

Each tool is independent — your agent loads only what it needs to reduce context and response time.

WRITEcreate_sale
Create a sale on the Braspag Transaction API (POST /sales). Pass a full Braspag sale payload. Payment.Type may be CreditCard, DebitCard, Boleto, Pix, or EletronicTransfer. Braspag orchestrates routing across multiple acquirers based on merchant-level rules.
WRITEcapture_sale
Capture a pre-authorized sale (PUT /sales/{paymentId}/capture). Supports partial capture via amount, and optional serviceTaxAmount (airline / travel merchants).
DELETEvoid_sale
Void / cancel a sale (PUT /sales/{paymentId}/void). Supports full void (omit amount) or partial void.
WRITEcreate_recurrent
Create a recurrent payment schedule (POST /recurrentPayments). Used for subscriptions and any schedule where Braspag (not the merchant) drives the recurrence.
READdisable_recurrent
Deactivate a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Deactivate). Stops future charges; does not refund historical ones.
WRITEupdate_recurrent_amount
Update the charged amount on a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Amount). Body carries the new amount in cents.
READget_sale
Get sale detail by PaymentId (GET /sales/{paymentId} — Query API).
READget_sale_by_order_id
Look up sale(s) by MerchantOrderId (GET /sales?merchantOrderId=X — Query API). Returns an array of PaymentIds matching the merchant order.

Compatible frameworks

MCP is a protocol — any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-braspag` and add the config block above to your MCP client — Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Braspag — MCP server · 22 tools | CodeSpar