Banco Do Brasil

Finance and commerce

MCP server for Banco do Brasil, Pix, Cobrança (boleto), Conta-Corrente, Arrecadação (OAuth2 + mTLS).

Your AI app calls the Banco Do Brasil MCP server, which does the finance and commerce work and sends the result back to the chat.

About Banco Do Brasil

Banco Do Brasil is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for Banco do Brasil, Pix, Cobrança (boleto), Conta-Corrente, Arrecadação (OAuth2 + mTLS).

Banco Do Brasil runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-banco-do-brasil@0.1.0-alpha.5 and talks to it over standard input and output. It needs BB_CLIENT_ID, BB_CLIENT_SECRET and BB_DEVELOPER_APP_KEY set before Banco Do Brasil starts.

Banco Do Brasil is listed in the official MCP registry as io.github.codespar/mcp-banco-do-brasil, version 0.1.0-alpha.5.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-banco-do-brasil
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-banco-do-brasil

How to set up Banco Do Brasil

  1. Install Node.js on the machine that runs your AI app, because Banco Do Brasil starts with npx and downloads its package on first run.
  2. Create BB_CLIENT_ID, BB_CLIENT_SECRET and BB_DEVELOPER_APP_KEY for Banco Do Brasil in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Banco Do Brasil to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Banco Do Brasil tools to confirm the connection.
  5. Run one read-only task with Banco Do Brasil first, and keep your app asking before each tool call until the results look right.

Banco Do Brasil compared with similar servers

  • Bcra by codespar has fewer GitHub stars than Banco Do Brasil (278 against 278); both are community servers, and both run locally.
  • Asaas by codespar has fewer GitHub stars than Banco Do Brasil (278 against 278); both are community servers, and both run locally.
  • Belvo by codespar has fewer GitHub stars than Banco Do Brasil (278 against 278); both are community servers, and both run locally.

Before you connect Banco Do Brasil

  • Give Banco Do Brasil its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Banco Do Brasil tool call until you trust what it does with them.
  • Treat text that Banco Do Brasil fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Banco Do Brasil on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Banco Do Brasil

How marketing and sales teams put Banco Do Brasil to work, by company size. Pick the size closest to yours and start Banco Do Brasil on one use case.

Small business

  • A small business can ask Banco Do Brasil which products and customers drive margin, then plan promotions around them.
  • Owners can use Banco Do Brasil to check refunds, failed payments and churn reasons without opening three dashboards.
  • Banco Do Brasil runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Banco Do Brasil to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Banco Do Brasil to check spend against budget each week and move money to what's working.
  • Start Banco Do Brasil on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Banco Do Brasil read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Banco Do Brasil to answer revenue questions by channel and region with figures finance signs off on.
  • Banco Do Brasil is a community server, so have security review the code and pin a version before Banco Do Brasil touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Banco Do Brasil README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@codespar/mcp-banco-do-brasil

MCP server for Banco do Brasil, Brazil's top public bank.

BB exposes one of the broadest public-bank API surfaces in the country across Pix, Cobranças, Conta-Corrente, Open Finance, and Arrecadação. Merchants doing high-volume Pix and boleto operations integrate directly with BB instead of going through a PSP.

Status: alpha (0.1.0-alpha.1)

BB's Developer Portal is contract-gated, the full OpenAPI specs are visible only after merchant onboarding. Pix paths follow the BACEN Pix v2 standard; boleto, account, and statement paths are best-guesses based on BB's public marketing pages and conventions shared with peers (Itaú, Santander, Bradesco). Every unverified path is flagged To do(verify) in src/index.ts. Pin to exact versions during 0.1.x.

Tools (13)

Tool Purpose
create_pix_cob Create an immediate Pix charge (cob) with QR code.
get_pix_cob Retrieve an immediate Pix charge by its txid.
list_pix_cob List immediate Pix charges (cob) by date range.
create_pix_devolucao Refund (devolução) a previously received Pix.
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.
register_dict_key Register a DICT key on a BB account owned by the merchant.
delete_dict_key Delete a DICT key owned by the merchant.
register_boleto Issue a boleto via BB Cobranças.
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.
get_statement Retrieve account statement transactions for a BB conta-corrente over a date range.

Install

npm install @codespar/mcp-banco-do-brasil@0.1.0-alpha.1

Environment

BB_CLIENT_ID="..."             # OAuth client_id from developers.bb.com.br
BB_CLIENT_SECRET="..."         # OAuth client_secret
BB_DEVELOPER_APP_KEY="..."     # gw-dev-app-key, required on most calls
BB_CERT_PATH="/abs/path/client.crt"   # mTLS cert (production only)
BB_KEY_PATH="/abs/path/client.key"    # mTLS key  (production only)
BB_ENV="sandbox"                       # or "production" (default: sandbox)
BB_BASE_URL="..."                      # optional; default api.hm.bb.com.br (sandbox) / api.bb.com.br
BB_AUTH_URL="..."                      # optional; default https://oauth.hm.bb.com.br/oauth/token (sandbox) / oauth.bb.com.br

Authentication

  • OAuth2 client_credentials, token endpoint at oauth.{env}.bb.com.br. Bearer cached until ~60s before expiry.
  • mTLS, required by BACEN for Pix v2 in production. Sandbox typically allows TLS-only; cert/key are optional in sandbox and required in production.
  • gw-dev-app-key, BB API gateway key, appended as a query param on all calls.

Run

npx @codespar/mcp-banco-do-brasil

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

Questions about Banco Do Brasil

What is the Banco Do Brasil MCP server?

MCP server for Banco do Brasil, Pix, Cobrança (boleto), Conta-Corrente, Arrecadação (OAuth2 + mTLS). Banco Do Brasil is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Banco Do Brasil MCP server?

Add Banco Do Brasil to your AI app's MCP config with the command npx -y @codespar/mcp-banco-do-brasil@0.1.0-alpha.5. In Claude Code, run claude mcp add --transport stdio codespar-banco-do-brasil -- npx -y @codespar/mcp-banco-do-brasil@0.1.0-alpha.5. To run Banco Do Brasil this way you need Node.js installed.

Does Banco Do Brasil need an API key?

Yes. Banco Do Brasil expects BB_CLIENT_ID, BB_CLIENT_SECRET and BB_DEVELOPER_APP_KEY to be set. Create the key for Banco Do Brasil in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Banco Do Brasil an official MCP server?

No. Banco Do Brasil is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Banco Do Brasil access to company data.

What license is Banco Do Brasil under?

Banco Do Brasil is released under the MIT license, according to its GitHub repository. The license covers the code of Banco Do Brasil; the service it connects to has its own terms.