Skip to main content
BR

Braspag

v0.2.0API 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

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

All credentials are encrypted at rest in an isolated vault scoped per organization. OAuth2 tokens are automatically refreshed before expiry. Your agent code never sees raw secrets β€” it receives scoped, short-lived session tokens.
Servers β€” Every LatAm commerce API your agent needs | CodeSpar