Skip to main content
BD

Banco do Brasil

@codespar/mcp-banco-do-brasil · v0.1.0-alpha.5

🇧🇷 BrazilBankingAuth · OAuth2beta13 tools8 env varsprerelease

BR top public bank (largest by assets). OAuth2 + mTLS + gw-dev-app-key. Pix, DICT, boleto cobranças, conta-corrente. Alpha on npm — devportal contract-gated, paths follow BACEN standard.

Get started · freeView docs

MIT · runs locally with your own credentials

Limitations

  • v0.1.0-alpha.5 is a prerelease; npm has no stable release of this package.
  • The package manifest does not declare 2 of the 8 variables the code reads.
  • Hosted calls with a test key are not available: connecting this provider needs credentials it issues to an operator.
Package
@codespar/mcp-banco-do-brasil
Version
0.1.0-alpha.5 · prerelease
npm dist-tag
latest
Category
Banking
Auth
OAuth2
Country
🇧🇷 Brazil
License
MIT
Transport
stdio

Quickstart

Install, set the credentials, make the first call.

Pick your client. The server runs locally over stdio, with your own credentials.

Add the server to your clientOne config entry. No build step, no SDK required.
Set the environment variables8 variables read by this server's code, listed below.
Restart and make the first callThe agent can call any of the 13 tools. Try create_pix_cob first.
terminal
# Claude Code claude mcp add banco-do-brasil -e BB_AUTH_URL=… -e BB_BASE_URL=… -e BB_CERT_PATH=… -e BB_CLIENT_ID=… -e BB_CLIENT_SECRET=… -e BB_DEVELOPER_APP_KEY=… -e BB_ENV=… -e BB_KEY_PATH=… -- npx -y @codespar/mcp-banco-do-brasil@0.1.0-alpha.5 # then: /mcp to confirm the server is connected
Environment variables8 variables
BB_AUTH_URLRead by the code; the package manifest does not declare it.
BB_BASE_URLRead by the code; the package manifest does not declare it.
BB_CERT_PATHAbsolute path to the mTLS client certificate (.crt or .pem). BACEN mandates mTLS for Pix v2 in production.optional
BB_CLIENT_IDBanco do Brasil OAuth client_id issued via developers.bb.com.br after contract onboarding.required
BB_CLIENT_SECRETBanco do Brasil OAuth client_secret.requiredsecret
BB_DEVELOPER_APP_KEYBB Developer App Key (gw-dev-app-key) — appended as a query param on most BB API calls.requiredsecret
BB_ENVEnvironment: 'sandbox' or 'production'. Defaults to 'sandbox'.optional
BB_KEY_PATHAbsolute path to the mTLS private key (.key or .pem).optionalsecret

Names read from the package code (@codespar/mcp-banco-do-brasil@0.1.0-alpha.5). Descriptions and flags come from its manifest. Self-hosted, you hold the credentials.

First call democreate_pix_cob

"Create an immediate Pix charge"

tools/callcreate_pix_cobresult returned

Tools

What your agent can call.

13 tools, as the package's tools/list returns them.

create_pix_cob

Create an immediate Pix charge (cob) with QR code. Returns txid, EMV copy-paste payload, and location URL. BACEN Pix v2 standard.

get_pix_cob

Retrieve an immediate Pix charge by its txid.

list_pix_cob

List immediate Pix charges (cob) by date range. Paginated per BACEN Pix v2.

create_pix_devolucao

Refund (devolução) a previously received Pix. Must reference the original endToEndId and a merchant-side refund id.

get_pix_devolucao

Retrieve a Pix devolução by its endToEndId + refund id.

resolve_dict_key

Resolve a DICT key (CPF, CNPJ, email, phone, EVP) to the owner's account data before sending a Pix. Subject to BCB rate limits per consenting payer.

register_dict_key

Register a DICT key on a BB account owned by the merchant. Some key types (email/phone) require BCB confirmation flows.

delete_dict_key

Delete a DICT key owned by the merchant. Irreversible — key becomes available for re-registration after BCB lockout window.

register_boleto

Issue a boleto via BB Cobranças. Returns nosso_numero, linha digitável, barcode, and PDF URL.

get_boleto

Retrieve a boleto by nosso_numero.

cancel_boleto

Cancel (baixa) an outstanding boleto before payment.

get_account_balance

Retrieve the current balance of a BB conta-corrente (checking) account.

Names and descriptions come from the package's tools/list (@codespar/mcp-banco-do-brasil@0.1.0-alpha.5). A kind (read, write, delete) is shown only when the package annotates its tools or each tool was verified one by one; neither exists for this server yet.

Compatibility

MCP is a protocol. Any client that speaks it can mount this server.

codespar_discover lists this server's tools, but connecting it needs credentials the provider issues to an operator (a certificate, signed keys or paired headers), which a test key cannot produce.

Protocol

Any MCP client

stdio

Questions

Before you install.

How do I install the Banco do Brasil MCP server?

Run npx -y @codespar/mcp-banco-do-brasil@0.1.0-alpha.5 and add the config block above to your MCP client: Claude Code, Cursor, Claude Desktop, VS Code, or any MCP-compatible client. No build step, no SDK required.

What can my agent do with Banco do Brasil?

Banco do Brasil exposes 13 tools for banking. Your agent calls them directly; the full list is above.

How does Banco do Brasil authenticate, and how are credentials stored?

Banco do Brasil uses OAuth2. Self-hosted, you hold the credentials: the server reads them from its environment variables.

How does Banco do Brasil handle upstream API changes?

Every server is versioned independently on npm. The command on this page pins 0.1.0-alpha.5, the version whose tools are listed here; your agent keeps running it until you change the version.

Is Banco do Brasil open source? How do I report a bug?

Yes. Banco do Brasil is MIT-licensed and published on npm as @codespar/mcp-banco-do-brasil, source on GitHub (link in the Details panel). Report issues on the package repository; security issues go to security@codespar.dev, and we respond within 24 hours.

Start in seconds.

Add the config above, set the variables, and your agent calls the tools.

Start in seconds demo
Add the server to your client with the config above.
Set the environment variables listed above.
Ask your agent for the first call.
Banco do Brasil — MCP server · 13 tools | CodeSpar