Skip to main content
PA

PagBrasil

v0.1.0API Key

Adquirente cross-border para comercios internacionales que venden en Brasil: Pix, Pix Automático (PagStream) y boleto sin entidad local.

3 herramientas3 env vars🇧🇷 Brasilestable en npm

Qué puede hacer tu agente

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

  • create_orderCreate an order / request a payment (POST /order/add, form-urlencoded). payment_type selects the method (pix | boleto | creditcard). Returns XML: for Pix it carries pix_code (copy-paste) and pix_image; for boleto, the bar code and PDF URL. order_number must be unique per customer_taxid.
  • get_orderRequest information about an order (POST /order/get). Returns the same XML order shape as create_order, including current payment status — poll this to detect Pix/boleto settlement.
  • refund_orderRequest a refund for a settled order (POST /order/refund). Pass amount_brl for a partial refund; omit for a full refund.
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_order", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-pagbrasil

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": {
    "pagbrasil": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-pagbrasil"
      ],
      "env": {
        "PAGBRASIL_PBTOKEN": "<your_pagbrasil_pbtoken>",
        "PAGBRASIL_SECRET": "<your_pagbrasil_secret>"
      }
    }
  }
}

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

Variables de entorno · 3

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

PAGBRASIL_PBTOKEN
obligatoriosecret

Merchant token (pbtoken) from the PagBrasil Dashboard

PAGBRASIL_SECRET
obligatoriosecret

Secret phrase from the PagBrasil Dashboard

PAGBRASIL_BASE_URL
opcional

API base URL. Defaults to https://sandbox.pagbrasil.com/api; production hosts are issued per-merchant.

Herramientas disponibles · 3

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

WRITEcreate_order
Create an order / request a payment (POST /order/add, form-urlencoded). payment_type selects the method (pix | boleto | creditcard). Returns XML: for Pix it carries pix_code (copy-paste) and pix_image; for boleto, the bar code and PDF URL. order_number must be unique per customer_taxid.
READget_order
Request information about an order (POST /order/get). Returns the same XML order shape as create_order, including current payment status — poll this to detect Pix/boleto settlement.
DELETErefund_order
Request a refund for a settled order (POST /order/refund). Pass amount_brl for a partial refund; omit for a full refund.

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-pagbrasil` 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.
PagBrasil — MCP server · 3 tools | CodeSpar