# Open Finance Brasil MCP

> Open Finance Brasil connects your AI agent to comprehensive Brazilian financial data. Access everything from checking real-time account balances (`get_accounts`) and transaction history (`get_transactions`) to tracking credit card limits, investment portfolios, and loan details. It gives your agent a full view of the customer's financial standing.

## Overview
- **Category:** other
- **Price:** Free

## Description

Listen up. You don't gotta log into seven different banking portals just to get a full picture of someone's money. This server connects your AI agent directly to core Brazilian financial sources, giving it access to everything from basic identity checks to investment portfolio values. It’s the single data pipeline you need.

To start, your agent first pulls the basics: customer identification details like their Name, CPF, and Address using `get_customer_data`. This context is critical for every other query you run against the system.

When it comes to liquid cash and spending, your agent can list all associated payment accounts. Using `get_accounts`, it pulls out the account type, agency, number, and what's currently sitting in that balance. If you wanna know how money moves through those accounts, you run `get_transactions`—you just gotta feed it an Account ID pulled from the previous step to get a full history of spending patterns.

Tracking debt is where this thing really shines. You can pull all linked credit card accounts with `get_credit_cards`, which gives you the brand, and the total, used, and available limits across the board. If you need specifics on what's due right now, running `get_credit_card_bills` lets your agent fetch outstanding bills after you provide a specific Credit Card Account ID.

For bigger picture debt—the stuff that lasts longer than a month—you use `get_financing`. This tool pulls records for long-term contracts, covering everything from auto loans to mortgages and other major financing agreements. It gives the full scope of their committed liabilities.

Then there's the wealth side of things. You can build out a complete investment profile using `get_investments`, which gathers data on various assets like funds, CDBs, or treasury bonds, showing you what they actually own and how much it's worth. This is your holistic view of their net worth.

By chaining these tools together—starting with identity, getting the current balances from `get_accounts`, reviewing spending history with `get_transactions`, checking credit limits via `get_credit_cards` while also pulling specific bills using `get_credit_card_bills`, understanding long-term debt through `get_financing`, and wrapping it all up with asset values from `get_investments`—your agent builds a complete, multi-layered financial profile. It’s not just data retrieval; you're performing full financial analysis right in the prompt. You don't need to juggle multiple API keys or write complex SQL queries. Your AI client handles it all through one clean protocol.

## Tools

### get_accounts
Retrieves a list of payment accounts, showing the type, agency, number, and current balance for each.

### get_credit_card_bills
Fetches outstanding credit card bills after you provide a specific Credit Card Account ID.

### get_credit_cards
Gets all linked credit card accounts, returning the brand and current limits (total, available, used).

### get_customer_data
Retrieves basic personal identification information for the customer: Name, CPF, and Address.

### get_financing
Gets details on long-term contracts, including loans, vehicle financing, or real estate mortgages.

### get_investments
Retrieves the portfolio holdings and values for various investments like funds, CDBs, and treasury bonds.

### get_transactions
Pulls a history of transactions after you specify an Account ID from `get_accounts`.

## Capabilities

### Determine Account Status and Balances
The agent lists all associated payment accounts, providing the account type, agency, number, and current available balance.

### Track Spending and Debt Obligations
You pull credit card accounts and their limits (total, used, available), or fetch specific outstanding bills for a given card ID.

### View Full Transaction History
The agent retrieves detailed transaction records for any specified account ID to analyze spending patterns.

### Access Personal and Identity Data
It pulls basic customer identification details, including name, CPF, and address, which is necessary context for all other queries.

### Analyze Investment Portfolios
The agent gathers data on various assets like funds, CDBs, and treasury holdings to build an investment picture.

### Assess Debt and Loan Obligations
You pull records for financing agreements, including loans, vehicle financing, or real estate mortgages.

## Use Cases

### Processing a New Loan Application
A loan officer needs to qualify a client. Instead of asking the user for statements, they prompt their agent: 'Run full profile check.' The agent runs `get_customer_data` -> `get_accounts` -> `get_credit_cards` and `get_financing`. The output is an immediate risk assessment.

### Identifying Spending Anomalies
A user suspects unauthorized charges. They prompt the agent to run `get_transactions` for their primary account ID, then use that data point to compare against known bills retrieved via `get_credit_card_bills`. The discrepancy is flagged instantly.

### Calculating Net Worth
A wealth manager needs a client's total net worth. They instruct the agent to run `get_accounts` (liquidity), `get_investments` (assets), and `get_financing` (liabilities). The combined result is the true, current net worth figure.

### Onboarding a New Corporate Client
A compliance team needs to verify company leadership. They first run `get_customer_data`, then pull all associated corporate accounts using `get_accounts`. This verifies the legal identity and operational financial standing simultaneously.

## Benefits

- Get real-time balances using `get_accounts`. You instantly see the current status of all payment accounts without needing to check multiple banking apps.
- Assess total risk by comparing limits. Combining `get_credit_cards` with `get_financing` gives a clear, unified picture of both revolving and installment debt.
- Analyze spending patterns immediately. Calling `get_transactions` for an account ID lets you see the flow of money that led to a specific balance drop.
- Build a full profile quickly. Starting with `get_customer_data` provides necessary identity context before running any financial queries, improving data integrity.
- Track wealth growth and debt simultaneously. You get two sides of the ledger: assets from `get_investments`, balanced against obligations from `get_credit_card_bills`.

## How It Works

The bottom line is: Your agent runs the multi-step financial check using natural language prompts, handles the API calling sequence, and returns a unified data object instead of requiring multiple manual tool calls.

1. Start by invoking `get_customer_data` to establish the user's identity (Name, CPF). This data acts as context for all subsequent calls.
2. The agent then executes a sequence of tools—for example, calling `get_accounts` and passing the resulting Account IDs into `get_transactions`. The system compiles these disparate results.
3. You receive a single, synthesized output stream that contains all requested balances, transaction lists, credit card limits, and investment values, ready for your AI client to analyze.

## Frequently Asked Questions

**How do I get my spending history using get_transactions?**
You must first call `get_accounts` to find the specific Account ID. Then, pass that ID into `get_transactions`. The tool retrieves a detailed list of all transactions for that account.

**Does Open Finance Brasil MCP Server show my investment growth?**
Yes. Use `get_investments` to pull data on funds, CDBs, and treasury holdings to see your current portfolio value.

**I need to check my credit card limits; which tool do I use? get_credit_cards?**
The `get_credit_cards` tool retrieves all linked cards. It gives you the total, available, and used limit for each brand.

**How can I check my current loan status?**
Run the `get_financing` tool. This returns specific details on any active loans or mortgages you have taken out.

**What information do I need to provide when calling get_customer_data?**
You must supply the customer's CPF, name, and current address. The tool returns basic identification info, which confirms your agent has correctly scoped the data to that specific person.

**If I use get_credit_card_bills but don't have a valid Credit Card Account ID, what happens?**
The process fails because it requires an explicit Credit Card Account ID. Your agent needs to run get_credit_cards first to retrieve the correct identifier before requesting bills.

**How do I make sure I pull all my accounts and balances using get_accounts?**
The tool lists payment account details, including type, agency, number, and balance. If you have many accounts, your agent will likely need to run the function multiple times or handle pagination to retrieve every entry.

**Can I use get_investments data to compare against my checking balances from get_accounts?**
Yes, you can compare them. You call get_accounts for liquid cash and then run get_investments to see the value of funds like CDBs or treasury holdings.