# mcp-rede

Wires 22 tools of Brazilian acquirer Rede into your AI agent: authorizations, captures, refunds, card tokens, recurrences, 3DS and boleto.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/payments/rede
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-rede

## What it does

The server exposes eRede to the agent. `authorize_transaction` runs a card charge, `capture_transaction` settles one that was authorized with capture off, and two more calls void or refund it. Separate tools validate a card with no charge (`zero_auth`), store a reusable token (`tokenize_card`, plus `get_token` and `delete_token`), and manage subscriptions through `create_recurrence`, `update_recurrence`, `disable_recurrence`. You also get transaction listings by date range, 3DS authentication, and boleto issuing.

Every request carries HTTP Basic credentials built from PV and token, so the agent never touches the header itself. You supply `REDE_PV` and `REDE_TOKEN` from a Rede merchant contract; `REDE_ENV` picks `sandbox` or `production` and defaults to `sandbox`. No working pair means no live calls, so confirm the contract before wiring anything into an app.

It runs with `npx` over stdio. Set `MCP_HTTP=true` and `MCP_PORT` to switch to HTTP.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `REDE_PV`, `REDE_TOKEN`, `REDE_ENV` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env REDE_PV=<REDE_PV> --env REDE_TOKEN=<REDE_TOKEN> --env REDE_ENV=<REDE_ENV> --transport stdio rede -- npx -y @codespar/mcp-rede
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add rede --env REDE_PV=<REDE_PV> --env REDE_TOKEN=<REDE_TOKEN> --env REDE_ENV=<REDE_ENV> -- npx -y @codespar/mcp-rede
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "rede": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-rede"
            ],
            "env": {
                "REDE_PV": "<REDE_PV>",
                "REDE_TOKEN": "<REDE_TOKEN>",
                "REDE_ENV": "<REDE_ENV>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "rede": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-rede"
            ],
            "env": {
                "REDE_PV": "<REDE_PV>",
                "REDE_TOKEN": "<REDE_TOKEN>",
                "REDE_ENV": "<REDE_ENV>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e REDE_PV=<REDE_PV> -e REDE_TOKEN=<REDE_TOKEN> -e REDE_ENV=<REDE_ENV> rede npx -y @codespar/mcp-rede
```
Replace <…> with your own values

## When to use it
- charge a card through Rede without leaving the chat
- refund a payment that has already been captured
- store a card token instead of keeping the number in code
- start a subscription and pause it later
- issue a boleto and cancel it if unpaid

## Example prompts
- Authorize a 150 BRL payment for order 4821 and give me the tid
- List Rede transactions from last week that were never captured
- Create a recurrence of 59.90 BRL using customer 7712's card token

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
