Skip to main content
BR

Braspag

v0.2.1API Key

El brazo de orquestación enterprise de Cielo — distinto del server Cielo Acquirer. Ruteo multi-adquirente, Cartão Protegido (vault de token), recurrencia, split de marketplace, antifraude. Objetivo: retail BR enterprise.

22 herramientas3 env vars🇧🇷 Brasilestable en npm

Qué puede hacer tu agente

Braspag le da a tu agente 22 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • 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.
Ejemplo de llamada
// 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", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-braspag

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

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>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 22 herramientas de abajo — probá create_sale primero.

Variables de entorno · 3

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

BRASPAG_MERCHANT_ID
obligatoriosecret

Braspag MerchantId (UUID)

BRASPAG_MERCHANT_KEY
obligatoriosecret

Braspag MerchantKey (secret)

BRASPAG_ENV
opcional

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

Herramientas disponibles · 22

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

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.

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-braspag` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
Braspag — MCP server · 22 tools | CodeSpar