Skip to main content
RE

Rede

v0.2.0-alpha.2API Keyalpha

Itaú-owned Brazilian card acquirer. Completes the big-four BR acquirer quadrant alongside Cielo, Stone, and Getnet. Authorize, capture, refund, zero-auth, tokenization, native recurrences. Alpha on npm — developer.userede.com.br is SPA-rendered, endpoints not live-verified.

22 tools3 env vars🇧🇷 Brazilalpha — pending validation

What your agent can do

Rede gives your agent 22 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • 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.
Example call
// 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", { /* ... */ });

Install

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

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

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>"
      }
    }
  }
}

After restart, your agent can call any of the 22 tools below — try authorize_transaction first.

Environment variables · 3

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

REDE_PV
required

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

REDE_TOKEN
requiredsecret

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

REDE_ENV
optional

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

Available tools · 22

Each tool is independent — your agent loads only what it needs to reduce context and response time.

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.

Compatible frameworks

MCP is a protocol — any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-rede` and add the config block above to your MCP client — Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Rede — MCP server · 22 tools | CodeSpar