# mcp-pix-bcb

An MCP server that lets the agent run Pix BCB operations: charges, refunds, DICT keys and webhooks against your bank's API.

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

## What it does

Eighteen tools map onto the Pix BCB endpoints. From a chat the agent can open an immediate charge with `create_cob`, set up a due-date one via `create_cobv`, pull received payments by `e2eid`, file a refund through `create_devolucao`, and point a webhook at a key. The DICT side covers registering a key, looking one up, portability requests and resolving a pending claim.

Auth is OAuth2 client credentials over mTLS, and that is where setup usually stalls. Your PSP issues the client ID and secret and tells you the base URL; a certificate goes into `PIX_CERT_PATH`. Until those exist the server cannot reach the API. Sandbox access depends on the bank, so ask about a homologation environment before promising a demo.

Key registration needs PSP support for DICT. If your bank does not offer it, those tools are dead weight. The package ships under MIT and runs with `npx @codespar/mcp-pix-bcb`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `PIX_CLIENT_SECRET` — 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 mcp-pix-bcb -e PIX_CLIENT_SECRET=<PIX_CLIENT_SECRET> -- npx -y @codespar/mcp-pix-bcb
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add pix-bcb --env PIX_CLIENT_SECRET=<PIX_CLIENT_SECRET> -- npx -y @codespar/mcp-pix-bcb
```
Replace <…> with your own values

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PIX_CLIENT_SECRET=<PIX_CLIENT_SECRET> pix-bcb npx -y @codespar/mcp-pix-bcb
```
Replace <…> with your own values

## When to use it
- create an immediate Pix charge from an agent chat
- look up a received payment by endToEndId
- refund a received Pix payment
- register a Pix key in DICT
- attach a webhook to a Pix key

## Example prompts
- Create an immediate Pix charge for 150.00 BRL and show the qrcode
- Find the payment received with this e2eid yesterday
- Request a refund on that payment and print the status

## 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
