
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
openfinance-br-mcp
Advanced tools
Experimental MCP server for Open Finance Brasil with typed tools and secure consent flows
English · Português
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.
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..."
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.
The server exposes 18 tools grouped by journey:
list_accounts, get_balance, list_transactionslist_credit_cards, get_credit_card_billslist_investments, list_funds,
list_variable_incomes, list_treasure_titleslist_pix_keys, initiate_pixstart_consent, complete_consent,
check_consent_status, revoke_consentstart_payment_consent, complete_payment_consent,
check_payment_consent_statusIt also exposes the openfinance://banks/ resource, the
analyze_monthly_spending prompt, and optional URL elicitation when starting
an authorization flow.
# Run the published release in credential-free mock mode
uvx --from openfinance-br-mcp==0.2.0 openfinance-mcp
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
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"]
}
}
}
# 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/
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.
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
| 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.
MIT
FAQs
Experimental MCP server for Open Finance Brasil with typed tools and secure consent flows
We found that openfinance-br-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.