# mcp-open-finance

Connects a coding agent to Open Finance Brasil: accounts, transactions, consents, cards, loans and investments. Useful when your code talks to Brazilian banking APIs.

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

## What it does

The server exposes 18 tools to the agent. Accounts and balances, transaction history, overdraft limits, consents (reading, creating, revoking), card bills and card purchases, loan payment schedules, financing contracts, investment products. Qualifications come in two flavours: personal (income, occupation) and business. A separate pair handles payment initiation — creating a payment consent and pushing a payment through it, PIX included.

Auth is OAuth2 client credentials. Every institution hands out its own base URL and a client ID with secret, so the server stays down until `OPEN_FINANCE_BASE_URL`, `OPEN_FINANCE_CLIENT_ID` and `OPEN_FINANCE_CLIENT_SECRET` are set. Sign up with a participating financial institution to get them. Sandbox access depends on the bank — check that first if you plan to test an integration.

The tool list includes `revoke_consent` and payment calls, which means an agent can touch real money and personal data. Set scopes and limits on the bank side before you wire it into anything automated. Runs on Node.js via `npx`.

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

### Codex

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

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

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

## When to use it
- pull a customer's account list and balances through Open Finance
- read transaction history for one account
- fetch credit card bills and card purchases
- look up a loan repayment schedule
- create a PIX payment consent and send the payment

## Example prompts
- List the client's accounts and show the balance for each one
- Show transactions on this account for the last month
- Create a PIX payment consent and run the payment

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