mcp-open-finance — Claude Code MCP server: what it does
Connects a coding agent to Open Finance Brasil: accounts, transactions, consents, cards, loans and investments. Useful when your code talks to Brazilian banking APIs.
claude mcp add mcp-open-finance -e OPEN_FINANCE_CLIENT_SECRET=<OPEN_FINANCE_CLIENT_SECRET> -- npx -y @codespar/mcp-open-financeWhat mcp-open-finance 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.
What it helps with
- 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 for the agent
- 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
How to install mcp-open-finance
Platform CLI
claude mcp add mcp-open-finance -e OPEN_FINANCE_CLIENT_SECRET=<OPEN_FINANCE_CLIENT_SECRET> -- npx -y @codespar/mcp-open-financeReplace <…> with your own values
Platform CLI
codex mcp add open-finance --env OPEN_FINANCE_CLIENT_SECRET=<OPEN_FINANCE_CLIENT_SECRET> -- npx -y @codespar/mcp-open-financeReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
gemini mcp add -e OPEN_FINANCE_CLIENT_SECRET=<OPEN_FINANCE_CLIENT_SECRET> open-finance npx -y @codespar/mcp-open-financeReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-open-finance
How do I install mcp-open-finance in Claude Code?
Run claude mcp add mcp-open-finance -e OPEN_FINANCE_CLIENT_SECRET=<OPEN_FINANCE_CLIENT_SECRET> -- npx -y @codespar/mcp-open-finance, with the remaining values set in the server config.
What does mcp-open-finance do?
It gives the agent 18 Open Finance Brasil tools: accounts, transactions, consents, credit cards, loans, financings, investments, customer qualifications and payments.
What do I need before the server will start?
An institution's API base URL plus OAuth2 client credentials. A participating bank issues the client ID and secret.