mcpField
M
mcp-caixa

mcp-caixa

Local
github.com/codesparFinance275Updated 4w ago

About mcp-caixa

mcp-caixa is an MCP server for Caixa Econômica Federal, covering Pix, SICOB boleto charges and account statements. It targets merchants who bank with a Brazilian state-owned bank. The package is in alpha, and endpoint paths are not yet checked against the official portal spec.

Key features

  1. 01Pix payments, QR charges and DICT key lookup
  2. 02SICOB boleto issuance, lookup and cancellation
  3. 03Account statement and balance queries
  4. 04OAuth2 client credentials with mTLS authentication
  5. 05Sandbox and production environment switch

Use cases

  1. 01Merchants collecting Pix or boleto payments through a Caixa account
  2. 02Retrieving Caixa account statements for reconciliation
  3. 03Connecting receivables flows tied to federal transfer programs to Caixa

MCP support

The server exposes 23 tools to MCP clients, covering Pix, boleto, statements, FGTS queries and tribute payments.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-caixa": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-caixa"
],
"env": {
"CAIXA_CLIENT_ID": "<CAIXA_CLIENT_ID>",
"CAIXA_CLIENT_SECRET": "<CAIXA_CLIENT_SECRET>",
"CAIXA_CERT_PATH": "<CAIXA_CERT_PATH>",
"CAIXA_KEY_PATH": "<CAIXA_KEY_PATH>",
"CAIXA_ENV": "<CAIXA_ENV>"
}
}
}
}
Run commandnpx -y @codespar/mcp-caixa
Environment variables to set
CAIXA_CLIENT_IDCaixa OAuth client_id issued via the Developer Portal after contract onboarding.
CAIXA_CLIENT_SECRETSecretCaixa OAuth client_secret.
CAIXA_CERT_PATHAbsolute path to the mTLS client certificate (.crt or .pem). BACEN mandates mTLS for Pix v2.
CAIXA_KEY_PATHSecretAbsolute path to the mTLS private key (.key or .pem).
CAIXA_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.

Packages
npm@codespar/mcp-caixa0.2.0-alpha.3

Tools

23

Saved tool list · updated 2w ago

This tool takes no parameters.

Details

From the project README

@codespar/mcp-caixa

MCP server for Caixa Econômica Federal — Brazil's largest state-owned bank.

Caixa occupies a segment none of the private tier-1 banks (Itaú, Bradesco, Santander, BB) can cover: it runs federal social programs (PIS/PASEP, FGTS, Bolsa Família / Auxílio Brasil), operates the national lottery (Loterias Caixa), and is the preferred bank for merchants that value state-bank credibility or serve beneficiaries of federal transfer programs. For the payment surface that matters to merchants — Pix, boleto (Cobrança / SICOB), and extrato — Caixa follows the BACEN Pix v2 standard shared across every tier-1 bank, so the integration shape mirrors its private-sector peers.

Status: alpha (0.1.0-alpha.1)

Caixa's Developer Portal is contract-gated, and as a state-owned institution the onboarding is additionally bureaucratic: vendor registration and credenciamento are required on top of the commercial merchant contract. Full OpenAPI specs for Pix, Cobrança (SICOB), 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) Caixa's public SICOB / Cobrança integration guides, and (c) conventions shared with 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)

ToolPurpose
get_oauth_tokenMint or return a cached OAuth2 client_credentials bearer token for the Caixa Developer Portal.
send_pixInitiate an outbound Pix payment from the merchant's Caixa account.
create_pix_qrCreate a dynamic Pix charge with QR code (cob).
get_pixRetrieve a Pix transaction by its BCB endToEndId (E).
resolve_dict_keyResolve a DICT key (CPF, CNPJ, email, phone, EVP) to the owner's account data before sending a Pix.
refund_pixRefund (devolução) a previously received Pix.
create_boletoIssue a boleto via Caixa Cobrança (SICOB).
get_boletoRetrieve a boleto by its Caixa identifier (id or nosso_numero).
cancel_boletoCancel (baixa) an outstanding boleto before payment.
get_statementRetrieve account statement transactions for a given period.
get_pix_chargeRetrieve a Pix immediate charge (cob) by its BCB txid.
update_pix_chargeUpdate (PATCH) a Pix immediate charge (cob) — e.g.
list_pix_chargesList Pix immediate charges (cob) filtered by date range and optional status / CPF / CNPJ.
create_pix_due_chargeCreate a Pix due-date charge (cobv) with mandatory payer data and due date.
get_pix_due_chargeRetrieve a Pix due-date charge (cobv) by its BCB txid.
list_pix_receivedList received Pix transactions (pix recebidos) by date range.
register_dict_keyRegister a DICT key (CPF, CNPJ, email, phone, or EVP) to an account owned by the merchant.
delete_dict_keyDelete (unregister) a DICT key owned by the merchant.
download_boleto_pdfFetch the rendered boleto PDF for an issued boleto.
get_account_balanceReturn the current balance for a Caixa merchant account, including available, blocked, and overdraft limit...
transfer_tedInitiate an outbound TED transfer from a Caixa merchant account to an external bank account.
consult_fgtsQuery FGTS balance / extrato.
pay_tributePay a federal tribute (DARF, GPS, GRU) or other guia de arrecadação via Caixa.

Why Caixa (vs. a private bank)

  • Social-program beneficiaries. If a meaningful slice of your customer base receives federal transfers, Caixa is where the money lands first.
  • State-bank credibility. Government-adjacent merchants, concessionárias, and regulated verticals often prefer — or are required — to hold accounts at a state-owned bank.
  • Lottery / Loterias Caixa corridor. Retailers in the lotérica network settle through Caixa.
  • Same Pix / boleto rails as the private banks. No technical tradeoff — the BACEN Pix v2 standard is identical.

Install

npm install @codespar/[email protected]

Environment

CAIXA_CLIENT_ID="..."       # OAuth client_id from Caixa's Developer Portal
CAIXA_CLIENT_SECRET="..."   # OAuth client_secret
CAIXA_CERT_PATH="/abs/path/to/client.crt"   # mTLS client certificate
CAIXA_KEY_PATH="/abs/path/to/client.key"    # mTLS private key
CAIXA_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 Caixa 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 Caixa Developer Portal after your merchant contract and credenciamento are approved. They are distinct from the OAuth credentials.

Run

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

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

Caveats

  • Paths are unverified. See the TODO(verify) markers in src/index.ts. Onboarded merchants should validate against their portal-issued OpenAPI spec and open a PR.
  • Sandbox host is a guess. Caixa issues a homologação subdomain per merchant; override by editing BASE_URL if your provisioned sandbox URL differs.
  • SICOB legacy. Older boleto contracts may still route through the legacy SIGCB surface. The create_boleto / get_boleto / cancel_boleto tools target Cobrança v2; if your contract predates it, paths will differ.
  • Onboarding timeline. Factor weeks, not days. State-owned vendor registration is the critical path — start it before you start coding.

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

Markdown supported

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.