# mcp-celcoin

An MCP server that hands your agent Celcoin's payment API: Pix charges, boletos, TED/DOC transfers, top-ups. Handy when a Brazilian payment has to happen from the chat.

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

## What it does

Eighteen tools are exposed. The agent can open a Pix payment or an immediate cob charge with a QR code, issue and cancel a boleto, read a bill barcode and then confirm the payment, send a TED/DOC transfer. Lookups come along too: balance, statement for a date range, Brazilian banks by ISPB code, telecom operators for top-ups.

Auth is OAuth2 client credentials and the server refreshes the token on its own. You supply `CELCOIN_CLIENT_ID` and `CELCOIN_CLIENT_SECRET` from a Celcoin developer account. Testing runs against `sandbox.openfinance.celcoin.dev`, switched on with `CELCOIN_SANDBOX=true`.

Production is the awkward part. Celcoin only accepts live calls over mTLS using a certificate they issue, and only from IPs registered with them beforehand. This server presents no client certificate, so a direct production call answers 401. Point `CELCOIN_BASE_URL` at a proxy that holds the certificate and terminates mTLS.

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

### Codex

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

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

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

## When to use it
- open a Pix payment and hand over the QR code
- issue a boleto, then cancel it
- read a bill barcode before paying
- send a TED/DOC transfer from the agent
- top up a phone through a telecom operator

## Example prompts
- Create a Pix payment for 150 reais and show me the copia-e-cola
- Read the barcode in `boleto.txt` and tell me the amount and due date
- Pull my Celcoin statement for last week

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