mcpField
M
mcp-open-finance

mcp-open-finance

Local
github.com/codesparFinance275Updated 4w ago

About mcp-open-finance

mcp-open-finance is an MCP server for Open Finance Brasil, aimed at applications and developers who need to read Brazilian bank data or initiate PIX payments. It covers accounts, transactions, consents, credit cards, loans and investments, and each institution supplies its own base URL and credentials.

Key features

  1. 01Account balance, transaction and overdraft queries
  2. 02Credit card bill and transaction lookup
  3. 03Loan, financing and investment product listings
  4. 04Data and payment consent creation and revocation
  5. 05Payment initiation and customer qualification lookup

Use cases

  1. 01Viewing a customer's bank accounts and transactions from an AI assistant
  2. 02Managing data sharing consents
  3. 03Initiating PIX payments under an authorized consent

MCP support

This is an MCP server that exposes 18 tools to MCP clients for reading data and managing consents and payments through an institution's Open Finance API.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-open-finance": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-open-finance"
],
"env": {
"OPEN_FINANCE_CLIENT_SECRET": "<OPEN_FINANCE_CLIENT_SECRET>"
}
}
}
}
Run commandnpx -y @codespar/mcp-open-finance
Environment variables to set
OPEN_FINANCE_CLIENT_SECRETSecretAPI key for open-finance

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-open-finance0.2.2

Tools

18

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
pagenumberNoPage number
pageSizenumberNoItems per page
consentIdstringYesConsent ID (required for data access)

Details

From the project README

@codespar/mcp-open-finance

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

npm License: MIT

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)

ToolPurpose
list_accountsList customer bank accounts via Open Finance
get_account_balanceGet account balance via Open Finance
list_transactionsList account transactions via Open Finance
get_account_overdraft_limitsGet account overdraft (limites) via Open Finance
get_consentGet consent details by ID
create_consentCreate a new consent request for data access
revoke_consentRevoke an existing consent (data or payment)
list_credit_cardsList credit card accounts via Open Finance
get_credit_card_billsGet credit card bills (faturas) via Open Finance
get_credit_card_transactionsGet credit card transactions via Open Finance
list_loansList loan contracts (empréstimos) via Open Finance
get_loan_paymentsGet loan payment schedule via Open Finance
list_financingsList financing contracts (financiamentos) via Open Finance
list_investmentsList investment products via Open Finance
create_payment_consentCreate payment-initiation consent (e.g., PIX) via Open Finance
create_paymentInitiate a payment using an authorized payment consent
get_personal_qualificationsGet personal customer qualifications (income, occupation) via Open Finance
get_business_qualificationsGet 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

VariableRequiredDescription
OPEN_FINANCE_BASE_URLYesInstitution API base URL
OPEN_FINANCE_CLIENT_IDYesOAuth2 client ID
OPEN_FINANCE_CLIENT_SECRETYesOAuth2 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.