Adquirente cross-border para comercios internacionales que venden en Brasil: Pix, Pix Automático (PagStream) y boleto sin entidad local.
PagBrasil le da a tu agente 3 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.
create_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.get_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.refund_order — Request a refund for a settled order (POST /order/refund). Pass amount_brl for a partial refund; omit for a full refund.// 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", { /* ... */ });$ npm install @codespar/mcp-pagbrasilAgregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).
{
"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.
Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.
PAGBRASIL_PBTOKENMerchant token (pbtoken) from the PagBrasil Dashboard
PAGBRASIL_SECRETSecret phrase from the PagBrasil Dashboard
PAGBRASIL_BASE_URLAPI base URL. Defaults to https://sandbox.pagbrasil.com/api; production hosts are issued per-merchant.
Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.
create_orderget_orderrefund_orderMCP es un protocolo — cualquier framework que lo hable puede montar este server.