Open Finance

Finance and commerce

MCP server for Open Finance Brasil, accounts, transactions, consents, credit, loans, investments.

Your AI app calls the Open Finance MCP server, which does the finance and commerce work and sends the result back to the chat.

About Open Finance

Open Finance is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for Open Finance Brasil, accounts, transactions, consents, credit, loans, investments.

Open Finance runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-open-finance@0.2.2 and talks to it over standard input and output. It needs OPEN_FINANCE_CLIENT_SECRET set before Open Finance starts.

Open Finance is listed in the official MCP registry as io.github.codespar/mcp-open-finance, version 0.2.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-open-finance
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-open-finance

How to set up Open Finance

  1. Install Node.js on the machine that runs your AI app, because Open Finance starts with npx and downloads its package on first run.
  2. Create OPEN_FINANCE_CLIENT_SECRET for Open Finance in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Open Finance to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Open Finance tools to confirm the connection.
  5. Run one read-only task with Open Finance first, and keep your app asking before each tool call until the results look right.

Open Finance compared with similar servers

  • Openpay by codespar has fewer GitHub stars than Open Finance (278 against 278); both are community servers, and both run locally.
  • Onfido by codespar has fewer GitHub stars than Open Finance (278 against 278); both are community servers, and both run locally.
  • Pagar Me by codespar has fewer GitHub stars than Open Finance (278 against 278); both are community servers, and both run locally.

Before you connect Open Finance

  • Give Open Finance its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Open Finance tool call until you trust what it does with them.
  • Treat text that Open Finance fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Open Finance on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Open Finance

How marketing and sales teams put Open Finance to work, by company size. Pick the size closest to yours and start Open Finance on one use case.

Small business

  • A small business can ask Open Finance which products and customers drive margin, then plan promotions around them.
  • Owners can use Open Finance to check refunds, failed payments and churn reasons without opening three dashboards.
  • Open Finance runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Open Finance to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Open Finance to check spend against budget each week and move money to what's working.
  • Start Open Finance on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Open Finance read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Open Finance to answer revenue questions by channel and region with figures finance signs off on.
  • Open Finance is a community server, so have security review the code and pin a version before Open Finance touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Open Finance README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@codespar/mcp-open-finance

MCP server for Open Finance Brasil, open banking standard for accounts, transactions, and consents

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "open-finance": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-open-finance"],
      "env": {
        "OPEN_FINANCE_BASE_URL": "https://api.institution.com.br",
        "OPEN_FINANCE_CLIENT_ID": "your-client-id",
        "OPEN_FINANCE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}
Claude Code
claude mcp add open-finance -- npx @codespar/mcp-open-finance
Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "open-finance": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-open-finance"],
      "env": {
        "OPEN_FINANCE_BASE_URL": "https://api.institution.com.br",
        "OPEN_FINANCE_CLIENT_ID": "your-client-id",
        "OPEN_FINANCE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Tools (18)

Tool Purpose
list_accounts List customer bank accounts via Open Finance
get_account_balance Get account balance via Open Finance
list_transactions List account transactions via Open Finance
get_account_overdraft_limits Get account overdraft (limites) via Open Finance
get_consent Get consent details by ID
create_consent Create a new consent request for data access
revoke_consent Revoke an existing consent (data or payment)
list_credit_cards List credit card accounts via Open Finance
get_credit_card_bills Get credit card bills (faturas) via Open Finance
get_credit_card_transactions Get credit card transactions via Open Finance
list_loans List loan contracts (empréstimos) via Open Finance
get_loan_payments Get loan payment schedule via Open Finance
list_financings List financing contracts (financiamentos) via Open Finance
list_investments List investment products via Open Finance
create_payment_consent Create payment-initiation consent (e.g., PIX) via Open Finance
create_payment Initiate a payment using an authorized payment consent
get_personal_qualifications Get personal customer qualifications (income, occupation) via Open Finance
get_business_qualifications Get business customer qualifications via Open Finance

Authentication

Open Finance Brasil uses OAuth2 client credentials. Each financial institution provides its own base URL and credentials.

Sandbox / Testing

Sandbox availability varies by institution. Contact your financial institution for Open Finance sandbox access.

Get your credentials
  1. Go to Open Finance Brasil
  2. Register with a participating financial institution
  3. Obtain your OAuth2 client credentials
  4. Set the environment variables

Environment Variables

Variable Required Description
OPEN_FINANCE_BASE_URL Yes Institution API base URL
OPEN_FINANCE_CLIENT_ID Yes OAuth2 client ID
OPEN_FINANCE_CLIENT_SECRET Yes OAuth2 client secret

Roadmap

v0.2 (planned)
  • revoke_consent, Revoke a data sharing consent
  • list_payments, List initiated payments
  • create_payment_consent, Create a payment initiation consent
  • initiate_payment, Initiate a payment via Open Finance
  • get_payment_status, Get payment initiation status
v0.3 (planned)
  • insurance_products, List insurance products from institutions
  • pension_products, List pension products from institutions

Want to contribute? Open a PR or request a tool.

Links

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Questions about Open Finance

What is the Open Finance MCP server?

MCP server for Open Finance Brasil, accounts, transactions, consents, credit, loans, investments. Open Finance is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Open Finance MCP server?

Add Open Finance to your AI app's MCP config with the command npx -y @codespar/mcp-open-finance@0.2.2. In Claude Code, run claude mcp add --transport stdio codespar-open-finance -- npx -y @codespar/mcp-open-finance@0.2.2. To run Open Finance this way you need Node.js installed.

Does Open Finance need an API key?

Yes. Open Finance expects OPEN_FINANCE_CLIENT_SECRET to be set. Create the key for Open Finance in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Open Finance an official MCP server?

No. Open Finance is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Open Finance access to company data.

What license is Open Finance under?

Open Finance is released under the MIT license, according to its GitHub repository. The license covers the code of Open Finance; the service it connects to has its own terms.