About mcp-santander
mcp-santander is an MCP server for Santander Brasil, covering Pix, Cobrança (boleto), Arrecadação and account statements. It targets merchants that integrate directly with the bank rather than through a payment provider. The project is at 0.1.0-alpha.1, and several endpoint paths are not yet verified against the official portal.
Key features
- 01Pix immediate and due-date charges, refunds and DICT key management
- 02Boleto creation, lookup and cancellation
- 03Account balance, statements and TED transfers
- 04Open Finance consent creation and utility bill payment
- 05OAuth2 authentication combined with mutual TLS
Use cases
- 01Merchants receiving and refunding Pix payments directly through the bank
- 02Managing the boleto lifecycle from an AI agent
- 03Checking balances and statements for cash management
MCP support
The server exposes Santander Pix, collection and account operations as 23 MCP tools.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @codespar/mcp-santanderSANTANDER_CLIENT_IDSantander OAuth client_id issued via the Developer Portal (developer.santander.com.br) after contract onboarding.SANTANDER_CLIENT_SECRETSecretSantander OAuth client_secret.SANTANDER_CERT_PATHAbsolute path to the mTLS client certificate (.crt or .pem). BACEN mandates mTLS for Pix v2, and Santander's trust-open gateway enforces it across product families.SANTANDER_KEY_PATHSecretAbsolute path to the mTLS private key (.key or .pem).SANTANDER_ENVEnvironment: 'sandbox' or 'production'. Defaults to 'sandbox'.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
23Saved tool list · updated 2w ago
This tool takes no parameters.
Details
From the project README@codespar/mcp-santander
MCP server for Santander Brasil — 3rd largest private bank in Brazil.
Completes the top-3 BR private-bank trio: Itaú + Bradesco + Santander. Same OAuth2 + mTLS shape as its peers; different merchant contract.
Merchants with meaningful Pix, boleto, and cash-management volume integrate directly with Santander instead of going through a PSP.
Status: alpha (0.1.0-alpha.1)
Santander'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 following pieces are verified against Santander's public integration guides:
- Production host:
https://trust-open.api.santander.com.br - Sandbox host:
https://trust-sandbox.api.santander.com.br - OAuth2 token:
/auth/oauth/v2/token - Cobrança v2 base:
/collection_bill_management/v2/workspaces/{workspace_id}/bank_slips
Remaining paths (Pix, Arrecadação, Extrato) are best-guesses based on (a) BACEN Pix v2 standard paths, (b) Santander public marketing, and (c) conventions shared across Itaú / Bradesco / BB. Every unverified path is flagged TODO(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 (23)
| Tool | Purpose |
|---|---|
get_oauth_token | Mint or return a cached OAuth2 client_credentials bearer token for the Santander Developer Portal. |
send_pix | Initiate an outbound Pix payment from the merchant's Santander 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 Santander Cobrança (collection_bill_management v2). |
get_boleto | Retrieve a boleto by its Santander bill_id (SONDA query via collection_bill_management v2). |
cancel_boleto | Cancel (baixa) an outstanding boleto before payment. |
get_statement | Retrieve account statement transactions for a given period. |
create_pix_cobv | Create a Pix charge with due date (cobv — cobrança com vencimento). |
get_pix_cob | Retrieve a Pix immediate charge (cob) by its txid. |
list_pix_cob | List Pix immediate charges (cob) created in a given period. |
update_pix_cob | Update (PATCH) an existing Pix immediate charge. |
list_pix_received | List received Pix (Pix recebidos) in a given period. |
register_dict_key | Register a new DICT key for one of the merchant's Santander accounts. |
delete_dict_key | Remove (unregister) a DICT key previously registered for the merchant. |
download_boleto_pdf | Fetch the PDF (second copy / segunda via) of a registered boleto. |
get_account_balance | Get current available and blocked balance for a Santander merchant account. |
send_ted | Initiate a TED transfer from a Santander merchant account to an account at another bank. |
transfer_internal | Transfer between two Santander accounts (TEF / mesma instituição). |
create_openfinance_consent | Create an Open Finance consent (BACEN-regulated) for data access or payment initiation against a third-part... |
arrecadacao_pay | Pay a utility, tax, or concessionária bill via Santander Arrecadação / Pagamento de Contas. |
Install
npm install @codespar/[email protected]
Environment
SANTANDER_CLIENT_ID="..." # OAuth client_id from Santander's Developer Portal
SANTANDER_CLIENT_SECRET="..." # OAuth client_secret
SANTANDER_CERT_PATH="/abs/path/to/client.crt" # mTLS client certificate
SANTANDER_KEY_PATH="/abs/path/to/client.key" # mTLS private key
SANTANDER_ENV="sandbox" # or "production" (default: sandbox)
Authentication
Two factors are both required on every call:
- OAuth2
client_credentials— the server POSTs to/auth/oauth/v2/tokenon thetrust-open(ortrust-sandbox) gateway, caches the bearer until ~60s before expiry, and attachesAuthorization: Bearer <token>to downstream calls. - mTLS — BACEN mandates mutual TLS for Pix v2, and Santander's
trust-opengateway enforces it across product families. The server loads the client certificate and private key from the paths you set, builds a Nodehttps.Agent, and routes every request through it.
You obtain the cert + key bundle from the Santander Developer Portal after your merchant contract is signed. They are distinct from the OAuth credentials.
Cobrança: workspace model
Santander's Cobrança v2 is workspace-scoped. Before registering boletos you provision one or more workspace_ids via the Developer Portal — each binds a convênio, boleto/Pix billing mode, and webhook URL. The create_boleto, get_boleto, and cancel_boleto tools all take a workspace_id argument.
Run
# stdio (default)
npx @codespar/mcp-santander
# HTTP transport
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-santander
Caveats
- Pix / Arrecadação / Extrato paths are unverified. See the
TODO(verify)markers insrc/index.ts. Onboarded merchants should validate against their portal-issued OpenAPI spec and open a PR. - Cobrança cancel is modelled as a
PATCHwithstatus: "BAIXADO"; the covenant-specific cancellation semantics may differ. - 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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.