io.github.codespar/mcp-banco-do-brasil
io.github.codespar/mcp-banco-do-brasil · 273 stars · TypeScript · MIT
MCP server MCP server for Banco do Brasil — Pix, Cobrança (boleto), Conta-Corrente, Arrecadação (OAuth2 + mTLS)
Install
The repo has no one-line install. Follow its README.
Published as
- npm
@codespar/mcp-banco-do-brasilstdio
From the server's entry in the official MCP Registry.
Configuration
| Name | Set as | What it is |
|---|---|---|
BB_CLIENT_IDRequired | Env var | Banco do Brasil OAuth client_id issued via developers.bb.com.br after contract onboarding. |
BB_CLIENT_SECRETRequired · Secret | Env var | Banco do Brasil OAuth client_secret. |
BB_DEVELOPER_APP_KEYRequired · Secret | Env var | BB Developer App Key (gw-dev-app-key) — appended as a query param on most BB API calls. |
BB_CERT_PATHOptional | Env var | Absolute path to the mTLS client certificate (.crt or .pem). BACEN mandates mTLS for Pix v2 in production. |
BB_KEY_PATHOptional · Secret | Env var | Absolute path to the mTLS private key (.key or .pem). |
BB_ENVOptional | Env var | Environment: 'sandbox' or 'production'. Defaults to 'sandbox'. |
Files
@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 TODO(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 atoauth.{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
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 273
- License
- MIT
- Language
- TypeScript
- Last push
- 2026-09-27
- Forks
- 50
- MCP Registry
- io.github.codespar/mcp-banco-do-brasil
- Homepage
- codespar.dev/servers
- Topics
- agentic-commerce, ai-agents, brazil, claude, fintech, latin-america, llm-tools, mcp, model-context-protocol, nfe, open-finance, payments, pix
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k