Skip to main content
RE

Rede

v0.2.0-alpha.2API Keyalpha

Credenciadora de cartões brasileira do Itaú. Completa o quadrante das quatro grandes credenciadoras do BR junto com Cielo, Stone e Getnet. Autorizar, capturar, reembolsar, zero-auth, tokenização, recorrências nativas. Alpha no npm — developer.userede.com.br é renderizado como SPA, endpoints não verificados ao vivo.

22 ferramentas3 env vars🇧🇷 Brasilalpha — validação pendente

O que seu agente faz

O Rede dá ao seu agente 22 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.

  • authorize_transactionAuthorize a credit card transaction on Rede. Set capture=true to authorize + capture atomically; capture=false to authorize only (use capture_transaction later).
  • capture_transactionCapture a previously authorized transaction (when capture=false was used). Pass amount for partial capture; omit for full.
  • cancel_transactionCancel an authorized-but-uncaptured transaction (void). Rede uses the refunds endpoint for both voids and refunds — cancel means full amount on an uncaptured transaction.
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("authorize_transaction", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-rede@alpha

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": {
    "rede": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-rede@alpha"
      ],
      "env": {
        "REDE_PV": "<your_rede_pv>",
        "REDE_TOKEN": "<your_rede_token>"
      }
    }
  }
}

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

Variáveis de ambiente · 3

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

REDE_PV
obrigatório

Rede merchant filiação (PV) — numeric merchant identifier issued with your commercial contract.

REDE_TOKEN
obrigatóriosecret

Rede API security token paired with PV. Used in HTTP Basic auth as the password.

REDE_ENV
opcional

Environment selector: 'sandbox' (default) or 'production'.

Ferramentas disponíveis · 22

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

WRITEauthorize_transaction
Authorize a credit card transaction on Rede. Set capture=true to authorize + capture atomically; capture=false to authorize only (use capture_transaction later).
WRITEcapture_transaction
Capture a previously authorized transaction (when capture=false was used). Pass amount for partial capture; omit for full.
DELETEcancel_transaction
Cancel an authorized-but-uncaptured transaction (void). Rede uses the refunds endpoint for both voids and refunds — cancel means full amount on an uncaptured transaction.
DELETErefund_transaction
Refund a captured transaction. Pass amount for a partial refund; omit for full. Same endpoint as cancel; amount controls the behaviour.
READget_transaction
Retrieve a transaction by Rede tid OR by merchant reference. Pass exactly one of tid or reference.
READzero_auth
Validate a card without charging (zero-auth / account verification). Returns whether the card is authorizable, without creating a transaction.
WRITEtokenize_card
Tokenize a card for PCI-safe reuse. Returns a token (storageCard) to pass into authorize_transaction.storageCard.
DELETEdelete_token
Delete a previously created card token.

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-rede` 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.
Rede — MCP server · 22 tools | CodeSpar