Adquirente cross-border para lojistas internacionais vendendo no Brasil: Pix, Pix Automático (PagStream) e boleto sem entidade local.
O PagBrasil dá ao seu agente 3 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer 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-pagbrasilAdicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).
{
"mcpServers": {
"pagbrasil": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-pagbrasil"
],
"env": {
"PAGBRASIL_PBTOKEN": "<your_pagbrasil_pbtoken>",
"PAGBRASIL_SECRET": "<your_pagbrasil_secret>"
}
}
}
}Depois de reiniciar, seu agente pode chamar qualquer uma das 3 ferramentas abaixo — teste create_order primeiro.
Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da 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 ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.
create_orderget_orderrefund_orderMCP é um protocolo — qualquer framework que o fale pode montar este server.