Skip to main content
CA

Caixa

v0.2.0-alpha.2OAuth2alpha

Banco público estatal do BR. Distinto dos pares privados: a Caixa cuida de programas sociais (FGTS, PIS/PASEP, bolsa família), loterias e merchants que precisam da credibilidade de um banco estatal. OAuth2 + mTLS (Pix v2 do BACEN). Alpha no npm — onboarding estatal + docs fechadas por contrato.

23 ferramentas5 env vars🇧🇷 Brasilalpha — validação pendente

O que seu agente faz

O Caixa dá ao seu agente 23 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.

  • get_oauth_tokenMint or return a cached OAuth2 client_credentials bearer token for the Caixa 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 Caixa 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.
Exemplo de chamada
// 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", { /* ... */ });

Instalar

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

Quickstart

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "caixa": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-caixa@alpha"
      ],
      "env": {
        "CAIXA_CLIENT_ID": "<your_caixa_client_id>",
        "CAIXA_CLIENT_SECRET": "<your_caixa_client_secret>",
        "CAIXA_CERT_PATH": "<your_caixa_cert_path>",
        "CAIXA_KEY_PATH": "<your_caixa_key_path>"
      }
    }
  }
}

Depois de reiniciar, seu agente pode chamar qualquer uma das 23 ferramentas abaixo — teste get_oauth_token primeiro.

Variáveis de ambiente · 5

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

CAIXA_CLIENT_ID
obrigatório

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

CAIXA_CLIENT_SECRET
obrigatóriosecret

Caixa OAuth client_secret.

CAIXA_CERT_PATH
obrigatório

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

CAIXA_KEY_PATH
obrigatóriosecret

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

CAIXA_ENV
opcional

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

Ferramentas disponíveis · 23

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

READget_oauth_token
Mint or return a cached OAuth2 client_credentials bearer token for the Caixa 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 Caixa 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 Caixa Cobrança (SICOB). Returns nosso_numero, linha_digitável, barcode, and PDF URL.
READget_boleto
Retrieve a boleto by its Caixa identifier (id or nosso_numero).

Frameworks compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Qualquer cliente MCPProtocolo

Perguntas frequentes

Rode `npx -y @codespar/mcp-caixa` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
Caixa — MCP server · 23 tools | CodeSpar