Skip to main content
PI

Pix BCB

v0.2.1OAuth2

Official Pix API from Banco Central do Brasil. Instant transfers, QR codes, DICT key lookup, and devolution flows.

18 tools1 env vars🇧🇷 Brazilstable on npm

What your agent can do

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

  • create_cobCreate an immediate Pix charge (cobranca imediata)
  • get_cobGet immediate charge details by txid
  • list_cobsList immediate charges with date range and filters
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("create_cob", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-pix-bcb

Quickstart

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

claude_desktop_config.json
{
  "mcpServers": {
    "pix-bcb": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-pix-bcb"
      ],
      "env": {
        "PIX_CLIENT_SECRET": "<your_pix_client_secret>"
      }
    }
  }
}

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

Environment variables · 1

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

PIX_CLIENT_SECRET
requiredsecret

API key for pix-bcb

Available tools · 18

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

WRITEcreate_cob
Create an immediate Pix charge (cobranca imediata)
READget_cob
Get immediate charge details by txid
READlist_cobs
List immediate charges with date range and filters
WRITEupdate_cob
Revise an existing immediate charge (PATCH /cob/{txid}). Common updates: status REMOVIDA_PELO_USUARIO_RECEBEDOR to cancel, or change valor/solicitacaoPagador.
WRITEcreate_cobv
Create a due-date Pix charge (cobranca com vencimento)
READlist_cobv
List due-date charges (cobv) within a date range
WRITEupdate_cobv
Revise an existing due-date charge (PATCH /cobv/{txid})
READget_pix
Get a received Pix payment by e2eid (endToEndId)

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-pix-bcb` 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.
Pix BCB — MCP server · 18 tools | CodeSpar