Skip to main content
BR

Bradesco

v0.2.0-alpha.2OAuth2alpha

2nd largest private BR bank (after Itau). Direct banking API: Pix, boleto, statements. OAuth2 + mTLS. Alpha on npm — base URLs unverified.

22 tools5 env vars🇧🇷 Brazilalpha — pending validation

What your agent can do

Bradesco gives your agent 22 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • get_oauth_tokenMint or return a cached OAuth2 client_credentials bearer token for the Bradesco Developer Portal. Exposed so agents can inspect token freshness; normal tool calls obtain tokens implicitly.
  • send_pixInitiate an outbound Pix payment from the merchant's Bradesco account. Amount in BRL major units (e.g. '10.50').
  • create_pix_qrCreate a dynamic Pix charge with QR code (cob). Returns the txid, copy-paste EMV payload, and location URL.
Example call
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("get_oauth_token", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-bradesco@alpha

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "bradesco": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-bradesco@alpha"
      ],
      "env": {
        "BRADESCO_CLIENT_ID": "<your_bradesco_client_id>",
        "BRADESCO_CLIENT_SECRET": "<your_bradesco_client_secret>",
        "BRADESCO_CERT_PATH": "<your_bradesco_cert_path>",
        "BRADESCO_KEY_PATH": "<your_bradesco_key_path>"
      }
    }
  }
}

After restart, your agent can call any of the 22 tools below — try get_oauth_token first.

Environment variables · 5

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

BRADESCO_CLIENT_ID
required

Bradesco OAuth client_id issued via the Developer Portal after contract onboarding.

BRADESCO_CLIENT_SECRET
requiredsecret

Bradesco OAuth client_secret.

BRADESCO_CERT_PATH
required

Absolute path to the mTLS client certificate (.crt or .pem). BACEN mandates mTLS for Pix v2.

BRADESCO_KEY_PATH
requiredsecret

Absolute path to the mTLS private key (.key or .pem).

BRADESCO_ENV
optional

Environment: 'sandbox' or 'production'. Defaults to 'sandbox'.

Available tools · 22

Each tool is independent — your agent loads only what it needs to reduce context and response time.

READget_oauth_token
Mint or return a cached OAuth2 client_credentials bearer token for the Bradesco Developer Portal. Exposed so agents can inspect token freshness; normal tool calls obtain tokens implicitly.
WRITEsend_pix
Initiate an outbound Pix payment from the merchant's Bradesco account. Amount in BRL major units (e.g. '10.50').
WRITEcreate_pix_qr
Create a dynamic Pix charge with QR code (cob). Returns the txid, copy-paste EMV payload, and location URL.
READget_pix
Retrieve a Pix transaction by its BCB endToEndId (E<ispb><yyyymmddhhmm><sequence>).
READresolve_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.
DELETErefund_pix
Refund (devolução) a previously received Pix. Must reference the original endToEndId and a merchant-side refund id.
WRITEcreate_boleto
Issue a boleto via Bradesco Cobrança. Returns nosso_numero, linha_digitável, barcode, and PDF URL.
READget_boleto
Retrieve a boleto by its Bradesco identifier (id or nosso_numero).

Compatible frameworks

MCP is a protocol — any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-bradesco` and add the config block above to your MCP client — Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Bradesco — MCP server · 22 tools | CodeSpar