Skip to main content
BR

Braspag

v0.2.1API Key

Braço de orquestração enterprise da Cielo — distinto do server Cielo Acquirer. Roteamento multi-credenciadora, Cartão Protegido (cofre de token), recorrência, split de marketplace, antifraude. Alvo: varejo BR enterprise.

22 ferramentas3 env vars🇧🇷 Brasilestável no npm

O que seu agente faz

O Braspag dá ao seu agente 22 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer 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.
Exemplo de chamada
// 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

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com 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>"
      }
    }
  }
}

Depois de reiniciar, seu agente pode chamar qualquer uma das 22 ferramentas abaixo — teste create_sale primeiro.

Variáveis de ambiente · 3

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

BRASPAG_MERCHANT_ID
obrigatóriosecret

Braspag MerchantId (UUID)

BRASPAG_MERCHANT_KEY
obrigatóriosecret

Braspag MerchantKey (secret)

BRASPAG_ENV
opcional

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

Ferramentas disponíveis · 22

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

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 compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

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

Perguntas frequentes

Rode `npx -y @codespar/mcp-braspag` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
Braspag — MCP server · 22 tools | CodeSpar