# mcp-braspag

This MCP server lets an agent work with Braspag payments, recurring billing, card tokens, and marketplace splits.

- 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/braspag
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-braspag

## What it does

mcp-braspag exposes Braspag Transaction API and Query API operations to the agent. It can create, capture, void, and look up sales, start Pix or Boleto payments, submit 3DS credit transactions, and send standalone antifraud analyses.

The server includes tools for recurring payment schedules, Cartão Protegido vault tokens, marketplace split rules, and zero-dollar card validation. Agents can change recurring amounts and dates, deactivate or reactivate schedules, and remove stored card tokens.

Set `BRASPAG_MERCHANT_ID` and `BRASPAG_MERCHANT_KEY` before running it; Braspag checks these values in API headers. Your merchant contract must have Braspag Pagador enabled through Cielo or Braspag, or the server cannot use valid credentials.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `BRASPAG_MERCHANT_ID`, `BRASPAG_MERCHANT_KEY`, `BRASPAG_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 BRASPAG_MERCHANT_ID=<BRASPAG_MERCHANT_ID> --env BRASPAG_MERCHANT_KEY=<BRASPAG_MERCHANT_KEY> --env BRASPAG_ENV=<BRASPAG_ENV> --transport stdio braspag -- npx -y @codespar/mcp-braspag
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add braspag --env BRASPAG_MERCHANT_ID=<BRASPAG_MERCHANT_ID> --env BRASPAG_MERCHANT_KEY=<BRASPAG_MERCHANT_KEY> --env BRASPAG_ENV=<BRASPAG_ENV> -- npx -y @codespar/mcp-braspag
```
Replace <…> with your own values

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e BRASPAG_MERCHANT_ID=<BRASPAG_MERCHANT_ID> -e BRASPAG_MERCHANT_KEY=<BRASPAG_MERCHANT_KEY> -e BRASPAG_ENV=<BRASPAG_ENV> braspag npx -y @codespar/mcp-braspag
```
Replace <…> with your own values

## When to use it
- create a Braspag sale
- manage a recurring payment schedule
- store a card in Cartão Protegido
- split marketplace funds across sub-merchants
- look up a sale by `MerchantOrderId`

## Example prompts
- Use Braspag to create a sale from `order.json` and return the `PaymentId`.
- Look up the payment by `MerchantOrderId` and explain any decline returned by the API.
- Create a recurring payment with its amount and next payment date.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

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
