Bradesco

Finance and commerce

MCP server for Bradesco, Pix, Cobrança (boleto), Arrecadação, Extrato (OAuth2 + mTLS).

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

About Bradesco

Bradesco is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for Bradesco, Pix, Cobrança (boleto), Arrecadação, Extrato (OAuth2 + mTLS).

Bradesco runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-bradesco@0.2.0-alpha.3 and talks to it over standard input and output. It needs BRADESCO_CLIENT_ID, BRADESCO_CLIENT_SECRET, BRADESCO_CERT_PATH and BRADESCO_KEY_PATH set before Bradesco starts.

Bradesco is listed in the official MCP registry as io.github.codespar/mcp-bradesco, version 0.2.0-alpha.3.

At a glance

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

How to set up Bradesco

  1. Install Node.js on the machine that runs your AI app, because Bradesco starts with npx and downloads its package on first run.
  2. Create BRADESCO_CLIENT_ID, BRADESCO_CLIENT_SECRET, BRADESCO_CERT_PATH and BRADESCO_KEY_PATH for Bradesco in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Bradesco 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 Bradesco tools to confirm the connection.
  5. Run one read-only task with Bradesco first, and keep your app asking before each tool call until the results look right.

Bradesco compared with similar servers

  • Braintree by codespar has fewer GitHub stars than Bradesco (278 against 278); both are community servers, and both run locally.
  • Bold Co by codespar has fewer GitHub stars than Bradesco (278 against 278); both are community servers, and both run locally.
  • Brasil API by codespar has fewer GitHub stars than Bradesco (278 against 278); both are community servers, and both run locally.

Before you connect Bradesco

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

Marketing use cases for Bradesco

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

Small business

  • A small business can ask Bradesco which products and customers drive margin, then plan promotions around them.
  • Owners can use Bradesco to check refunds, failed payments and churn reasons without opening three dashboards.
  • Bradesco 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 Bradesco to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Bradesco to check spend against budget each week and move money to what's working.
  • Start Bradesco on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Bradesco read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Bradesco to answer revenue questions by channel and region with figures finance signs off on.
  • Bradesco is a community server, so have security review the code and pin a version before Bradesco 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

Bradesco 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-bradesco

MCP server for Bradesco, Brazil's 2nd largest private bank (after Itaú).

Together with @codespar/mcp-itau, @codespar/mcp-banco-inter, and @codespar/mcp-stark-bank, this covers the major BR private-bank API landscape. Merchants with meaningful Pix, boleto, and cash-management volume integrate directly with Bradesco instead of going through a PSP.

Status: alpha (0.1.0-alpha.1)

Bradesco's Developer Portal is contract-gated, the full OpenAPI specs for Pix, Cobrança, Arrecadação, and Extrato are only visible to onboarded merchants. The endpoint paths in this server are best-guesses based on (a) BACEN Pix v2 standard paths, (b) Bradesco's public integration guides, and (c) conventions shared across Itaú / Santander / BB. Every unverified path is flagged To do(verify) in the source.

Pin to exact versions during 0.1.x; paths will be corrected to match the portal spec once an onboarded merchant can validate.

Tools (22)

Tool Purpose
get_oauth_token Mint or return a cached OAuth2 client_credentials bearer token for the Bradesco Developer Portal.
send_pix Initiate an outbound Pix payment from the merchant's Bradesco account.
create_pix_qr Create a dynamic Pix charge with QR code (cob).
get_pix Retrieve a Pix transaction by its BCB endToEndId (E).
resolve_dict_key Resolve a DICT key (CPF, CNPJ, email, phone, EVP) to the owner's account data before sending a Pix.
refund_pix Refund (devolução) a previously received Pix.
create_boleto Issue a boleto via Bradesco Cobrança.
get_boleto Retrieve a boleto by its Bradesco identifier (id or nosso_numero).
cancel_boleto Cancel (baixa) an outstanding boleto before payment.
get_statement Retrieve account statement transactions for a given period.
arrecadacao_pay Pay a utility, tax, or concessionária bill via Bradesco Arrecadação.
list_pix_received List Pix transactions received by the merchant during a period.
create_pix_due_charge Create a Pix charge with a due date (cobv), commonly used for installments and scheduled invoices.
get_pix_due_charge Retrieve a Pix due charge (cobv) by txid.
update_pix_due_charge Patch a Pix due charge (cobv), revise amount, due date, discount, or debtor before payment.
register_dict_key Register a DICT key (CPF, CNPJ, email, phone, or EVP) pointing to a merchant account at Bradesco.
delete_dict_key Delete (unlink) a DICT key that points to a merchant account at Bradesco.
list_boletos List boletos issued by the merchant filtered by status and issue/due period.
get_boleto_pdf Download the boleto PDF as base64.
get_account_balance Retrieve the current available balance (saldo disponível) for a merchant account.
transfer_ted Execute a TED (or TEF when intra-Bradesco) transfer from the merchant's account to a beneficiary bank account.
pay_tax_darf Pay a federal tax (DARF) or union fee (GRU) via Bradesco Arrecadação.

Install

npm install @codespar/mcp-bradesco@0.1.0-alpha.1

Environment

BRADESCO_CLIENT_ID="..."       # OAuth client_id from Bradesco's Developer Portal
BRADESCO_CLIENT_SECRET="..."   # OAuth client_secret
BRADESCO_CERT_PATH="/abs/path/to/client.crt"   # mTLS client certificate
BRADESCO_KEY_PATH="/abs/path/to/client.key"    # mTLS private key
BRADESCO_ENV="sandbox"                          # or "production" (default: sandbox)

Authentication

Two factors are both required on every call:

  1. OAuth2 client_credentials, the server calls the token endpoint, caches the bearer until ~60s before expiry, and attaches Authorization: Bearer <token> to downstream calls.
  2. mTLS, BACEN mandates mutual TLS for Pix v2, and Bradesco enforces it across product families. The server loads the client certificate and private key from the paths you set, builds a Node https.Agent, and routes every request through it.

You obtain the cert + key bundle from the Bradesco Developer Portal after your merchant contract is signed. They are distinct from the OAuth credentials.

Base URLs

  • Production: https://proxy.api.prebanco.com.br (Bradesco's standard external proxy)
  • Sandbox: https://apihom-bradescorip.bradesco.com.br (homologação)

Both hosts are marked To do(verify), Bradesco provisions per-merchant subdomains in some product families and the exact homologação host may differ. Fork and override BASE_URL if your portal provisioning differs.

Run

# stdio (default)
npx @codespar/mcp-bradesco

# HTTP transport
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-bradesco

Caveats

  • Paths are unverified. See the To do(verify) markers in src/index.ts. Onboarded merchants should validate against their portal-issued OpenAPI spec and open a PR.
  • Base URLs are best-guess. See above, override if your provisioning differs.
  • Arrecadação barcode validation is server-side in this alpha, no client-side mod-10 / mod-11 check yet.

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 Bradesco

What is the Bradesco MCP server?

MCP server for Bradesco, Pix, Cobrança (boleto), Arrecadação, Extrato (OAuth2 + mTLS). Bradesco 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 Bradesco MCP server?

Add Bradesco to your AI app's MCP config with the command npx -y @codespar/mcp-bradesco@0.2.0-alpha.3. In Claude Code, run claude mcp add --transport stdio codespar-bradesco -- npx -y @codespar/mcp-bradesco@0.2.0-alpha.3. To run Bradesco this way you need Node.js installed.

Does Bradesco need an API key?

Yes. Bradesco expects BRADESCO_CLIENT_ID, BRADESCO_CLIENT_SECRET, BRADESCO_CERT_PATH and BRADESCO_KEY_PATH to be set. Create the key for Bradesco in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Bradesco an official MCP server?

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

What license is Bradesco under?

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