mcpField
M
mcp-rede

mcp-rede

Local
github.com/codesparFinance275Updated 4w ago

About mcp-rede

mcp-rede is an MCP server for Rede, a Brazilian card acquirer owned by Itaú. It covers credit and debit authorization, capture and refunds, plus zero-auth, card tokens, recurrences and 3DS. It is intended for merchants with an Itaú contract who integrate directly with eRede.

Key features

  1. 01Credit and debit authorization, capture, void and refund
  2. 02Zero-auth card validation
  3. 03Card tokenization and token metadata lookup
  4. 04Recurrence (subscription) management
  5. 053DS authentication flow
  6. 06Boleto issuance, lookup and cancellation

Use cases

  1. 01Creating and managing recurring charges for subscriptions
  2. 02Validating a customer card before authorization
  3. 03Submitting authorizations after a successful 3DS check

MCP support

The server exposes 22 tools to MCP clients for Rede transactions, tokens, recurrences, 3DS and boleto operations.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-rede": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-rede"
],
"env": {
"REDE_PV": "<REDE_PV>",
"REDE_TOKEN": "<REDE_TOKEN>",
"REDE_ENV": "<REDE_ENV>"
}
}
}
}
Run commandnpx -y @codespar/mcp-rede
Environment variables to set
REDE_PVRede merchant filiação (PV) — numeric merchant identifier issued with your commercial contract.
REDE_TOKENSecretRede API security token paired with PV. Used in HTTP Basic auth as the password.
REDE_ENVEnvironment selector: 'sandbox' (default) or 'production'.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-rede0.2.0-alpha.3

Tools

22

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
urlsarrayNoOptional callback/notification URL objects ({ url, kind })
amountnumberYesAmount in cents
capturebooleanYestrue = authorize + capture; false = authorize only
referencestringYesMerchant-side order reference (unique per merchant)
cardNumberstringNoPAN; never log this value. Prefer storageCard (token) instead.
storageCardstringNoToken from tokenize_card (alternative to cardNumber)
installmentsnumberYesNumber of installments (1 for à vista)
securityCodestringNoCVV
subscriptionbooleanNoFlag as a recurring charge (MIT)
cardHolderNamestringNoName on card
expirationYearnumberNoExpiration year (4 digits)
softDescriptorstringNoStatement descriptor shown on the cardholder bill
expirationMonthnumberNoExpiration month (1-12)

Details

From the project README

@codespar/mcp-rede

MCP server for Rede — Itaú-owned Brazilian card acquirer.

Rede closes the "big four" BR acquirer quadrant alongside Cielo, Stone, and Getnet. Merchants with an Itaú commercial contract integrate directly via eRede instead of going through a PSP.

Tools (22)

ToolPurpose
authorize_transactionAuthorize a credit card transaction on Rede.
capture_transactionCapture a previously authorized transaction (when capture=false was used).
cancel_transactionCancel an authorized-but-uncaptured transaction (void).
refund_transactionRefund a captured transaction.
get_transactionRetrieve a transaction by Rede tid OR by merchant reference.
zero_authValidate a card without charging (zero-auth / account verification).
tokenize_cardTokenize a card for PCI-safe reuse.
delete_tokenDelete a previously created card token.
create_recurrenceCreate a native Rede recurrence (subscription).
get_recurrenceRetrieve a recurrence by Rede recurrence id.
disable_recurrenceDisable (cancel) an active recurrence.
authorize_debitAuthorize a debit card transaction on Rede.
list_transactionsList transactions in a date range.
get_tokenRetrieve metadata for a previously stored card token (brand, last 4, expiration).
update_recurrenceUpdate an existing recurrence — change amount, card (storageCard), end date, or pause/resume.
get_recurrence_transactionsList transactions generated by a recurrence (one row per billing cycle executed).
authenticate_3dsInitiate a 3DS (EMV 3-D Secure) authentication for a card charge.
get_3ds_statusCheck the current status of a 3DS authentication by its reference id.
authorize_with_3dsAuthorize a transaction after a successful 3DS authentication, attaching the 3DS reference for liability sh...
create_boletoIssue a boleto registrado via Rede.
get_boletoRetrieve a boleto by Rede boleto id or by merchant reference.
cancel_boletoCancel an unpaid boleto.

Install

npm install @codespar/mcp-rede@alpha

Environment

REDE_PV="..."       # Merchant filiação (PV)
REDE_TOKEN="..."    # Security token (paired with PV)
REDE_ENV="sandbox"  # Optional. 'sandbox' (default) or 'production'

Authentication

HTTP Basic auth with base64(PV:TOKEN). The server builds the Authorization header on every request — transparent to callers.

Base URLs

  • Production: https://api.userede.com.br/erede/v1
  • Sandbox: https://sandbox-erede.useredecloud.com.br/v1

Run

# stdio (default)
npx @codespar/mcp-rede

# HTTP
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-rede

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.