Skip to main content
Glama
brunovicco

openfinance-br-mcp

by brunovicco

English · Português

openfinance-br-mcp

Experimental MCP server for Open Finance Brasil, with a complete mock environment and evolving FAPI-BR integration. It is not certified or validated against real institutions; see VALIDATION.md before using it outside environment=mock.

Python 3.12 uv Code style: black Ruff


What it is

An MCP Server that abstracts away the complexity of Open Finance Brasil (FAPI 1.0 Advanced, OAuth2, consent, mTLS) and exposes simple tools to Claude:

Claude → "how much did I spend on food in March?"
Claude uses list_transactions(bank=nubank, categorize=true, date_from=2024-03-01)
Claude → "You spent R$ 847.30 on food in March..."

Related MCP server: Bradesco MCP

Supported banks

The mock environment simulates Nubank, Sicoob, Caixa, Banco do Brasil, Bradesco, Itaú, Santander, XP, PicPay, and BTG Pactual with in-memory data and no network access. These are simulations, not certified integrations.

Real adapters and the Payments API journey are experimental and unvalidated. Payments use the v5 payments-consents/payments-pix Directory families, dedicated per-consent tokens, verified response JWS, PAR/JAR, consent-payload binding, and persistent idempotency. list_pix_keys is a demonstration extension rather than a standardized Open Finance Brasil endpoint. See VALIDATION.md for the exact scope.

Available MCP tools

The server exposes 18 tools grouped by journey:

  • Accounts: list_accounts, get_balance, list_transactions

  • Cards: list_credit_cards, get_credit_card_bills

  • Investments: list_investments, list_funds, list_variable_incomes, list_treasure_titles

  • PIX: list_pix_keys, initiate_pix

  • Data consent: start_consent, complete_consent, check_consent_status, revoke_consent

  • Payment consent: start_payment_consent, complete_payment_consent, check_payment_consent_status

It also exposes the openfinance://banks/ resource, the analyze_monthly_spending prompt, and optional URL elicitation when starting an authorization flow.

Quick start

Prerequisites

  • Python 3.12 or 3.13

  • uv installed

# Run the published release in credential-free mock mode
uvx --from openfinance-br-mcp==0.2.0 openfinance-mcp

From source

git clone https://github.com/brunovicco/openfinance-br-mcp.git
cd openfinance-br-mcp

# Optional: needed only for sandbox/production or DSPy categorization
cp .env.example .env

# Install dependencies
uv sync

# Run the server
uv run openfinance-mcp

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "openfinance-br": {
      "command": "uvx",
      "args": ["--from", "openfinance-br-mcp==0.2.0", "openfinance-mcp"]
    }
  }
}

Development

# Install with dev-dependencies
uv sync

# Run the tests
uv run pytest tests/ -v

# Lint and formatting
uv run ruff check src/ tests/
uv run black src/ tests/

# Type check
uv run mypy src/

Containers and Kubernetes

docker compose up openfinance-mcp
docker compose --profile test up

The k8s/ directory contains a two-replica Streamable HTTP example with Redis-backed state. Replace every credential, signing-key, OAuth issuer, resource-server, and domain placeholder before applying it. The server fails closed when HTTP is exposed outside loopback without MCP client OAuth.

Architecture

Claude (MCP Client)
        │ stdio or streamable-http
        ▼
openfinance-br-mcp (MCP Server)
  ├── Auth + Consent  (FAPI-BR 2.2.0: private_key_jwt, PAR/JAR, PKCE, mTLS)
  ├── MCP Primitives  (18 tools + 1 resource + 1 prompt)
  │   ├── Pydantic v2 input/output schemas
  │   ├── Optional URL elicitation for bank authorization
  │   └── Categorizer (DSPy + Claude for transaction classification)
  ├── Bank Adapters   (10 banks - extensible)
  └── Directory Client (resolves real bank endpoints from the BCB
                         Directory of Participants)
        │ HTTPS/mTLS
        ▼
Open Finance BR (BCB) - Directory of Participants
        │
        ▼
  Nubank · Sicoob · Caixa · + 100 participating institutions

Environment variables

Variable

Required

Description

ENVIRONMENT

mock (default, no credentials needed), sandbox, or production

CLIENT_ID

⚠️ non-mock

Client ID registered with the institution

PRIVATE_KEY_PATH

⚠️ non-mock

RSA private key for private_key_jwt/JAR signing

PRIVATE_KEY_KID

⚠️ non-mock

kid matching the registered client JWKS

MTLS_CERT_PATH

⚠️ prod

Path to the mTLS certificate

MTLS_KEY_PATH

⚠️ prod

mTLS private key

ANTHROPIC_API_KEY

⚠️ DSPy

Required for categorize=true

REDIS_URL

Shares TokenStore/ConsentManager state across replicas

MCP_TRANSPORT

stdio (default) or streamable-http

MCP_HTTP_ALLOWED_ORIGINS

⚠️ remote HTTP

Required allowlist for any non-loopback bind

LANGFUSE_OTLP_ENDPOINT

Enables tracing to Langfuse (with LANGFUSE_PUBLIC_KEY/LANGFUSE_SECRET_KEY)

LOG_LEVEL

INFO, DEBUG, WARNING (default: INFO)

LOG_FORMAT

json or console (default: json)

See .env.example for the full list.

Documentation

  • Authorization - the two token universes and why they can never cross

  • Contributing - dev setup, CI checks, and adding an adapter

  • Security - scope, disclaimer, and vulnerability reporting

  • Sources - specifications and RFCs followed by the implementation

  • Validation - what has and has not been validated

  • Changelog - release history

  • Releasing - maintainer release procedure

License

MIT

Available Tools

18 tools
get_balanceA
Read-only

Returns the available, blocked, and automatically invested balance of a specific bank account on Open Finance Brasil.

Args: subject_id: User's CPF. bank: Identifier of the participating bank. account_id: Account ID returned by list_accounts. ctx: MCP request context, providing access to shared adapters.

Returns: The account's current balance.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
account_idYes
subject_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
balanceYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint annotation already declares this as a safe read operation. The description adds context about the specific balance components (available, blocked, automatically invested) and that it returns the current balance, which enriches behavioral understanding without contradicting the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured with an opening sentence, Args list, and Returns section. It is front-loaded with the primary purpose. The Args/Returns format adds a bit of verbosity but remains efficient and scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with three parameters and an output schema. The description covers purpose, parameters, and return value adequately. The mention of account_id linkage to list_accounts adds the necessary context for the interaction flow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides no descriptions (0% coverage), so the description carries the full burden. It clearly explains each parameter: subject_id as CPF, bank as identifier, and account_id as returned by list_accounts, adding meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the available, blocked, and automatically invested balance of a specific bank account. It uses a specific verb ('Returns') and resource ('balance'), distinguishing it from sibling tools like list_accounts and list_transactions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies a workflow by noting that account_id is returned by list_accounts, which guides when to use this tool. However, it does not explicitly mention when not to use it or alternatives beyond that hint.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_credit_card_billsA
Read-only

Returns the bills (open and past) of a credit card via Open Finance Brasil, including total amount, minimum payment, and due date.

Args: subject_id: User's CPF. bank: Identifier of the participating bank. credit_card_account_id: ID returned by list_credit_cards. ctx: MCP request context, providing access to shared adapters.

Returns: The bills of the given credit card account.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
subject_idYes
credit_card_account_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
billsYes
credit_card_account_idYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations include readOnlyHint=true, which the description respects ('Returns'). The description adds behavioral context beyond the annotation by specifying that it returns both open and past bills and lists relevant fields (total amount, minimum payment, due date). However, it does not mention potential pagination or consent requirements, which would be useful in an Open Finance context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with purpose, args, and returns sections. It front-loads the core functionality and provides parameter explanations. Minor redundancy exists (the Returns section restates the opening line), and the extra ctx parameter adds noise, but overall it is efficient and organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, the description need not detail return values. It covers prerequisites and parameter semantics. Missing context includes consent requirements (common in Open Finance Brasil) and pagination behavior, but these are partially implied by sibling tools. Thus it is sufficiently complete for straightforward invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains all three schema parameters: subject_id as 'User's CPF', bank as 'Identifier of the participating bank', and credit_card_account_id as 'ID returned by list_credit_cards'. However, it also lists a 'ctx' argument not present in the input schema, which could confuse an agent about what to pass.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Returns'), a specific resource ('bills (open and past) of a credit card'), and context ('via Open Finance Brasil'). It also includes key fields returned (total amount, minimum payment, due date). This distinguishes it from sibling tools like list_credit_cards and list_transactions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by noting that credit_card_account_id is 'ID returned by list_credit_cards', which establishes a prerequisite and invocation order. However, it does not explicitly state when to use this tool over alternatives or provide exclusions, so it falls slightly short of full guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

initiate_pixA
DestructiveIdempotent

Initiates a PIX payment via Open Finance Brasil. Requires an active payment consent. The idempotency_key field prevents duplicate charges on retries.

Outside environment='mock', requires an AUTHORISED payment consent for this subject/bank, obtained beforehand via start_payment_consent + complete_payment_consent (tools/payments.py) - a data-sharing consent alone is not sufficient. In mock mode this check is skipped entirely, since the mock adapter has no payment-consent resource to check against.

Args: subject_id: Payer's CPF. bank: Identifier of the participating bank. amount: Canonical amount in BRL (e.g. "150.00"). creditor_key: PIX key of the recipient. creditor_key_type: Type of the recipient's key. debtor_account_id: ID of the account to debit, returned by list_accounts. idempotency_key: Client-generated UUID to prevent duplicates. ctx: MCP request context, providing access to shared adapters and the persistent idempotency store. description: Payment description/reason (max 140 chars). consent_id: Payment consent returned by start_payment_consent. Required outside mock mode.

Returns: Status of the initiated (or previously cached) payment.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
amountYesBRL amount serialized with exactly two decimal places.
consent_idNo
subject_idYes
descriptionNo
creditor_keyYes
idempotency_keyYes
creditor_key_typeYes
debtor_account_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
paymentYes

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate idempotent and destructive hints, but the description adds rich context: it explains the role of idempotency_key in preventing duplicate charges, the requirement for an AUTHORISED consent, and the mock mode exception. This goes beyond the annotations, though it does not detail all side effects like account balance changes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with an overview, prerequisite details, and a clear argument list. It is longer than strictly necessary but every sentence adds value; the arg descriptions are concise and the return note is useful. Slightly verbose but not wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 9 parameters, an output schema, and complex prerequisites, the description is complete. It explains the consent flow, mock mode behavior, idempotency, and the meaning of each parameter, making the tool usable without external context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 11%, but the description provides meaningful explanations for nearly every parameter (subject_id, bank, amount, creditor_key, creditor_key_type, debtor_account_id, idempotency_key, description, consent_id). It also clarifies the format for amount and the source for debtor_account_id, fully compensating for the sparse schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Initiates a PIX payment via Open Finance Brasil.' This specific verb+resource (initiate payment) distinguishes it from sibling tools like start_payment_consent, which handle the consent flow, not the actual payment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance: it requires an AUTHORISED payment consent obtained via start_payment_consent + complete_payment_consent, and explicitly warns that a data-sharing consent alone is insufficient. It also clarifies behavior in mock mode, which is critical for correct usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_accountsA
Read-only

Lists all bank accounts (checking, savings, prepaid) of a user at an institution participating in Open Finance Brasil.

Args: subject_id: User's CPF (digits only) or internal ID. bank: Identifier of the participating bank. ctx: MCP request context, providing access to shared adapters.

Returns: The user's accounts at the given bank.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
subject_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
accountsYes
total_recordsYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint annotation already discloses the read-only nature. The description adds a bit of context ('participating in Open Finance Brasil' and 'all bank accounts'), but it does not disclose additional behaviors such as consent requirements, error conditions, pagination, or what happens if the user has no accounts. With annotations present, the bar is lower, yet the description adds limited behavioral nuance.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a concise first line followed by Args and Returns sections. It is not overly long, though the Returns line somewhat repeats the first line. The extra 'ctx' parameter could be seen as unnecessary detail, but overall it is efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only listing tool with an output schema and readOnlyHint annotation, the description covers the core purpose and parameters. It does not mention consent prerequisites or error handling, but these are not critical for a simple list operation. The tool's role among siblings is clear enough, though explicit usage guidance would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero description coverage, so the description carries the full burden. It provides useful meaning for the two schema parameters: subject_id ('User's CPF (digits only) or internal ID') and bank ('Identifier of the participating bank'). However, it also lists a 'ctx' parameter not present in the input schema, which could mislead agents into thinking it must be passed as an argument.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb ('Lists') and resource ('all bank accounts'), and includes account types (checking, savings, prepaid), distinguishing it from sibling tools like get_balance or list_transactions. The scope ('of a user at an institution participating in Open Finance Brasil') adds clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (to retrieve all accounts for a user at a bank), but it does not explicitly mention alternatives or exclusions. It does not state 'use this instead of get_balance' or provide when-not-to-use guidance, which would help an agent choose appropriately among sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_credit_cardsA
Read-only

Lists all credit card accounts of a user at an institution participating in Open Finance Brasil, including available and total credit limit.

Args: subject_id: User's CPF. bank: Identifier of the participating bank. ctx: MCP request context, providing access to shared adapters.

Returns: The user's credit card accounts at the given bank.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
subject_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
credit_cardsYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, and description adds scope details (including available and total credit limit, Open Finance Brasil). However, it does not disclose any additional behavioral traits such as consent requirements, pagination, or rate limits; it also mentions a ctx arg not present in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is fairly concise with an Args/Returns structure, but the Returns section redundantly restates the first sentence, and the ctx parameter adds an unnecessary line.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing tool with readOnly annotation and output schema, the core purpose and parameters are covered. Missing is explicit guidance on when to choose this over sibling tools and any mention of consent/authorization context in Open Finance Brasil, leaving some ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by clarifying subject_id as User's CPF and bank as Identifier of the participating bank, matching schema's enum. However, the inclusion of ctx, which is not in the input schema, introduces some noise.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'Lists' with resource 'credit card accounts of a user at an institution participating in Open Finance Brasil', including limits. This clearly distinguishes it from sibling tools like get_credit_card_bills and list_accounts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It implies usage context (user at participating bank, listing credit card accounts) but does not explicitly state when to use this tool versus alternatives such as get_credit_card_bills or list_accounts, nor mention any exclusions or prerequisites like consent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_fundsA
Read-only

Lists a user's investment fund positions via Open Finance Brasil Fase 4 (P1.3), including quota quantity/price and gross/net amount.

Args: subject_id: User's CPF. bank: Participating bank. ctx: MCP request context, providing access to shared adapters.

Returns: The user's investment funds and aggregate totals.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
subject_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
fundsNo
summaryYes
total_recordsYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint annotation, the description discloses return content (quota quantity/price, gross/net amount) and aggregate totals. It does not mention consent prerequisites or error behavior, but adds useful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with Args and Returns sections, provides all needed information in a concise manner, and front-loads the primary purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main purpose, parameters, and return values, but omits important contextual information such as consent requirements (siblings like start_consent exist) and any preconditions or error handling. Given the Open Finance context, this is a notable gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, the description provides essential parameter explanations: subject_id is the user's CPF and bank is a participating bank with an enum. It compensates for the schema's lack of descriptions, though some details (CPF format) are missing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Lists' and clearly identifies the resource as 'a user's investment fund positions' via Open Finance Brasil, which distinguishes it from sibling tools like list_variable_incomes and list_treasure_titles.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for investment fund positions but does not explicitly state when to use this tool instead of list_investments or other list tools. No exclusions or alternative recommendations are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_investmentsA
Read-only

Lists a user's bank fixed-income investments (CDB, LCI, LCA, RDB) via Open Finance Brasil Fase 4, including gross amount, net amount, contracted rate, and indexer.

Args: subject_id: User's CPF. bank: Participating bank. ctx: MCP request context, providing access to shared adapters.

Returns: The user's fixed-income investments and aggregate totals.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
subject_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
summaryYes
investmentsNo
total_recordsYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide readOnlyHint=true, so the description doesn't need to restate safety. It adds useful behavioral context by naming the data source (Open Finance Brasil Fase 4) and the returned fields (gross amount, net amount, contracted rate, indexer). It stops short of disclosing consent/auth prerequisites, but the read-only behavior is well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a clear purpose, then structured into concise Args and Returns sections. Every sentence adds value, and it avoids redundantly restating the schema enum values.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema covers return values, and annotations cover safety, so the description focuses on purpose and parameters effectively. However, it omits the critical prerequisite of establishing an Open Finance consent before listing investments, which is likely necessary given the sibling consent-management tools. It also doesn't clarify that ctx is framework-injected, not a user param.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions are missing (0% coverage), and the description compensates by defining subject_id as the user's CPF and bank as a participating bank. The bank enum is self-documenting. The mention of ctx is somewhat confusing because ctx is not in the schema, but it clarifies that it provides access to shared adapters rather than being a user-supplied parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Lists a user's bank fixed-income investments' and enumerates exact product types (CDB, LCI, LCA, RDB). This clearly distinguishes it from sibling tools like list_funds, list_variable_incomes, and list_treasure_titles.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The fixed-income framing and product enumeration make it clear when to use this tool versus sibling asset-class listing tools. However, it does not explicitly mention that an Open Finance consent must be established first (via sibling consent tools), so exclusionary guidance is incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_pix_keysA
Read-only

Lists the PIX keys (CPF, email, phone, EVP) registered to a bank account via Open Finance Brasil.

Only available in environment='mock' - see module docstring.

Args: subject_id: User's CPF. bank: Identifier of the participating bank. account_id: Account ID. ctx: MCP request context, providing access to shared adapters.

Returns: The PIX keys registered to the given account.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
account_idYes
subject_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
pix_keysYes
account_idYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, and the description consistently says 'Lists,' so there is no contradiction. The description adds the environment limitation ('Only available in environment='mock'') and the Open Finance context, which go beyond the annotation. It does not disclose error scenarios or consent requirements, but the output schema reduces the need for return-format details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a one-sentence purpose, a usage notice, and clearly labeled Args/Returns sections. It is front-loaded and free of fluff. Minor deductions for the 'see module docstring' note and the extraneous ctx parameter, but overall it is appropriately compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, an output schema, and readOnlyHint annotation, the description covers the essential elements: what the tool does, the mock-only restriction, and all parameters. It could strengthen completeness by mentioning that consent must exist for the bank account, especially since sibling consent tools are present, but the description is sufficient for selecting and invoking the tool in the intended environment.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0%, the description must compensate. It does explain subject_id as 'User's CPF' and bank as 'Identifier of the participating bank,' but account_id is merely restated as 'Account ID,' adding little meaning. The inclusion of ctx as an argument is confusing because it is not in the input schema, diluting the clarity of the actual exposed parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Lists the PIX keys (CPF, email, phone, EVP) registered to a bank account via Open Finance Brasil.' This clearly distinguishes it from sibling tools like initiate_pix or list_accounts by naming both the data type and the exact scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states 'Only available in environment='mock'' which is a clear usage constraint. It implies this tool is for mock testing rather than production, and the context signals show no competing PIX-key-listing sibling, so the primary use case is evident. It does not explicitly name alternatives, but the unique resource makes them unnecessary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_transactionsA
Read-only

Returns the bank statement of an account on Open Finance Brasil with date and type filters. Supports automatic transaction categorization via AI (categorize=true, requires ANTHROPIC_API_KEY).

Args: subject_id: User's CPF. bank: Identifier of the participating bank. account_id: Account ID returned by list_accounts. ctx: MCP request context, providing access to shared adapters and the categorizer. date_from: Start date of the period. date_to: End date of the period. credit_debit_type: Restrict to credits or debits only. page: Page number (1-based). page_size: Records per page (1-1000). categorize: If true, categorizes each transaction via AI.

Returns: The account's transactions for the requested period.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
pageNo
date_toNo
date_fromNo
page_sizeNo
account_idYes
categorizeNo
subject_idYes
credit_debit_typeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
categorizedYes
total_pagesYes
transactionsYes
total_recordsYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotation readOnlyHint=true already indicates a safe read operation. The description adds useful behavioral context, such as the AI categorization feature requiring ANTHROPIC_API_KEY and the role of ctx in providing adapters and categorizer. However, it does not mention consent requirements, rate limits, pagination behavior beyond the parameters, or error handling for missing API keys or invalid date ranges.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a clear one-sentence summary, followed by a well-organized Args block. It is appropriately sized for a tool with 9 parameters, but the inclusion of 'ctx' as an argument (not present in the schema) adds unnecessary noise and could confuse the agent. The structure is otherwise tight and each parameter earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of Open Finance Brasil and the presence of sibling consent tools, the description is adequate but has gaps. It explains the main purpose, parameters, and AI categorization, but does not mention that consent must be established before listing transactions, nor does it address potential edge cases like very large date ranges, pagination limits, or timezone handling. The existence of an output schema covers return values, so that is not a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0%, the description fully compensates by providing a clear explanation for every schema parameter: subject_id ('User's CPF'), bank ('Identifier of the participating bank'), date_from/date_to ('Start date of the period'), credit_debit_type ('Restrict to credits or debits only'), page ('Page number (1-based)'), page_size ('Records per page (1-1000)'), and categorize ('If true, categorizes each transaction via AI'). It also documents the ctx argument, though this is not in the schema, and links account_id to list_accounts.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Returns the bank statement of an account on Open Finance Brasil with date and type filters,' which clearly identifies the tool's specific verb, resource, and filtering capabilities. This also differentiates it from sibling tools such as get_balance, list_credit_cards, and initiate_pix by focusing on transaction history rather than balances, cards, or payments.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage guidance is implied rather than explicit. The description notes that 'account_id: Account ID returned by list_accounts,' suggesting a prerequisite dependency on list_accounts, but it does not explicitly state when to choose this tool over alternatives or mention exclusions. There is no direct comparison to sibling tools or guidance on scenarios where other lists (e.g., investments, credit cards) would be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_treasure_titlesA
Read-only

Lists a user's treasury bond (Tesouro Direto) positions via Open Finance Brasil Fase 4 (P1.3), including quantity, updated unit price, and gross/net amount.

Args: subject_id: User's CPF. bank: Participating bank. ctx: MCP request context, providing access to shared adapters.

Returns: The user's treasury bonds and aggregate totals.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
subject_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
titlesNo
summaryYes
total_recordsYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint annotation declares read-only behavior, and the description adds value by specifying the data source (Open Finance Brasil Fase 4) and the return contents (quantity, unit price, gross/net amount, aggregate totals). No contradictions detected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear summary and Args/Returns sections. It is not overly verbose, though the 'ctx' line is boilerplate. Overall, efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has an output schema, so return details are not strictly needed, but the description still provides them. It covers the purpose, parameters, and returns. With readOnlyHint annotation and a simple two-parameter schema, the description is complete enough for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description compensates by explaining subject_id as 'User's CPF' and bank as 'Participating bank', adding meaning beyond the schema's 'Subject Id' and 'Bank'. This is sufficient for the two parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists a user's Tesouro Direto positions via Open Finance Brasil Fase 4, including specific fields. The verb 'lists' plus the specific resource (treasury bonds) distinguishes it from sibling tools like list_funds or list_variable_incomes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While there is no explicit alternative-comparison, the description clearly scopes the tool to treasury bonds (Tesouro Direto), implying it should be used when the asset type is a treasury bond. This provides contextual guidance, though it does not explicitly name when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_variable_incomesA
Read-only

Lists a user's variable income asset positions (stocks, ETFs, and other exchange-traded assets) via Open Finance Brasil Fase 4 (P1.3), including quantity, closing price, and gross amount.

No net_amount is returned here (unlike list_investments/list_funds/ list_treasure_titles): the real Variable Incomes spec's balance data only publishes a gross amount - taxes/fees on these assets are reported per-transaction (broker notes), not as a running net position.

Args: subject_id: User's CPF. bank: Participating bank. ctx: MCP request context, providing access to shared adapters.

Returns: The user's variable income assets and an aggregate gross total.

ParametersJSON Schema
NameRequiredDescriptionDefault
bankYes
subject_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
bankYes
assetsNo
total_recordsYes
total_gross_amountYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With readOnlyHint already set, the description adds valuable context beyond the annotation: it discloses that only a gross amount is returned, explains why (real spec publishes no net amount), and clarifies that taxes/fees are reported per-transaction. This goes beyond the annotation's simple read-only signal, though it does not discuss pagination, consent, or error behavior, preventing a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear opening sentence, a focused explanatory paragraph about net_amount, and labeled Args/Returns sections. Every sentence contributes meaning without redundancy, and the length is appropriate for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description fully covers the tool's purpose, output fields, key behavioral nuance (gross vs. net), and return aggregate. With an output schema present and readOnlyHint annotation, the description adds the necessary spec context and differentiators, making the tool's behavior clear and complete for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It briefly explains subject_id as 'User's CPF' and bank as 'Participating bank', adding some meaning, but the bank explanation is generic and the enum already lists valid values. The description also mentions a 'ctx' arg that is not in the schema, which could confuse. Overall, partial compensation but with gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states it 'Lists a user's variable income asset positions (stocks, ETFs, and other exchange-traded assets)' and specifies the data included: quantity, closing price, and gross amount. It also distinguishes this tool from siblings (list_investments, list_funds, list_treasure_titles) by noting the absence of net_amount, making its purpose clear and unique.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear when-not-to-use guidance by explicitly contrasting with siblings: 'unlike list_investments/list_funds/list_treasure_titles' and explaining the spec-based reason for the difference. It implies use cases (needing variable income positions) without explicitly stating 'use when...', so it earns a 4 rather than 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 18 tool updatesv0.2.0
    • First observedcheck_consent_status
    • First observedcheck_payment_consent_status
    • First observedcomplete_consent
    • First observedcomplete_payment_consent
    • First observedget_balance
    • First observedget_credit_card_bills
    • First observedinitiate_pix
    • First observedlist_accounts
    • First observedlist_credit_cards
    • First observedlist_funds
    • First observedlist_investments
    • First observedlist_pix_keys
    • First observedlist_transactions
    • First observedlist_treasure_titles
    • First observedlist_variable_incomes
    • First observedrevoke_consent
    • First observedstart_consent
    • First observedstart_payment_consent

TDQS

A4.1/5.0

Scored across 18 tools

Disambiguation5/5

Every tool targets a distinct resource or lifecycle step. list_* tools clearly separate accounts, credit cards, Pix keys, and each investment type; consent tools have explicit data vs payment distinction. No two tools appear to perform the same operation.

Naming Consistency4/5

Names follow a consistent verb_noun pattern: list_ for collections, get_ for single items, start_/complete_/check_ for consent flows. Minor deviation: get_credit_card_bills returns a collection rather than a singular item, but this is a small and understandable exception.

Tool Count4/5

18 tools is slightly above the ideal 3-15 range but justified by the breadth of Open Finance Brasil (accounts, cards, PIX, investments, consent flows). Each tool addresses a meaningful use case without redundancy.

Completeness4/5

The tool surface covers core account, payment, and investment workflows, plus the required consent lifecycles. Obvious gap: credit_card_transactions scope is offered in consent but no tool retrieves credit card transactions; also no revoke_payment_consent, though less critical.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects Brazilian banks (Itaú, Bradesco, Nubank, etc.) to AI agents, enabling natural language queries about expenses, statements, investments, and credit cards via regulated Open Finance.
    20
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to query Bradesco bank accounts via Open Finance Brazil, providing read-only access to balances, statements, credit card bills, and investments.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects Claude, ChatGPT, and other AI agents to Caixa Econômica Federal accounts via Open Finance Brasil, enabling natural language queries about balances, transactions, credit card bills, and investments in read-only mode.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects Nubank accounts to Claude, ChatGPT, and AI agents via Open Finance Brasil, enabling natural language queries about balances, statements, credit card bills, and investments in read-only mode.
    MIT