
Mcp Btg
io.github.codesparPublished by GitHub account codesparv0.1.0-alpha.3Updated Oct 24, 2026
MCP server for BTG Pactual — Pix, Boleto, Account, Investments (CDB/LCI/LCA/funds), OAuth2 + mTLS
Overview
Alpha MCP server for BTG Pactual banking and investments, letting an assistant mint OAuth tokens, create Pix charges and boletos, read balances and statements,,
- What you can do
- Mint or reuse a cached OAuth2 client_credentials bearer token for the BTG Developer Portal.
- When to use it
- Only for teams already onboarded with BTG Pactual that want to experiment with agent-driven Pix, boleto, account and investment operations in sandbox. Not suitable for production use yet, since endpoint paths and the sandbox host are unverified guesses.
- Requirements
- Local Node.js process installed from the npm package. Requires BTG_CLIENT_ID, BTG_CLIENT_SECRET, BTG_CERT_PATH and BTG_KEY_PATH, all obtained from the BTG Developer Portal after contract onboarding; BTG_ENV selects sandbox (default) or production. Network access to BTG endpoints.
Installation
In SourceWeft
- Open Mcp Btg in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@codespar/mcp-btg
MCP server for BTG Pactual — Brazil's (and LatAm's) largest investment bank.
BTG runs a digital banking + investments stack (BTG+) on top of an institutional brokerage backbone. Merchants and fintechs integrate to BTG for the combination of Pix/boleto rails and an investment-account API surface (CDB, LCI, LCA, debêntures, funds) that no retail bank exposes at this depth.
Status: alpha (0.1.0-alpha.1)
BTG's Developer Portal is contract-gated — the full OpenAPI specs are only visible to onboarded counterparties. The endpoint paths in this server are best-guesses based on (a) BACEN Pix v2 standard paths, (b) BTG's public marketing pages, and (c) conventions shared with other Brazilian banks. 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 counterparty can validate.
Tools (12)
Install
Environment
Authentication
Two factors are both required on every call:
- OAuth2
client_credentials— the server calls the token endpoint, caches the bearer until ~60s before expiry, and attachesAuthorization: Bearer <token>to downstream calls. - mTLS — BACEN mandates mutual TLS for Pix v2, and BTG enforces it across product families (banking + investments). 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 BTG Developer Portal after contract onboarding. They are distinct from the OAuth credentials.
Run
Caveats
- Paths are unverified. See the
TODO(verify)markers insrc/index.ts. Onboarded counterparties should validate against their portal-issued OpenAPI spec and open a PR. - Sandbox host is a guess. BTG issues a sandbox subdomain per counterparty; override by editing
BASE_URLif your provisioned sandbox URL differs. - Investments surface (CDB/LCI/LCA/debêntures/funds) is differentiated vs. retail-bank MCPs in this repo, but the field shapes will move once the OpenAPI spec is byte-verified.
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
Source: packages/banking/btg/README.md at commit d0a519a
Tools
0Version history
1- v0.1.0-alpha.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts