Mcp Btg

io.github.codespar由 GitHub 帳號 codespar 發布v0.1.0-alpha.3更新於 Oct 24, 2026

MCP server for BTG Pactual — Pix, Boleto, Account, Investments (CDB/LCI/LCA/funds), OAuth2 + mTLS

已驗證STDIO僅桌面金融商業與電商

概覽

AI 產生的概覽

針對 BTG Pactual 銀行與投資業務的 alpha 版 MCP 伺服器,讓助理取得 OAuth 權杖、建立 Pix 收款與 boleto、查詢餘額與明細、查看投資部位並申購或贖回基金。

可以做什麼
取得或重複使用快取的 OAuth2 client_credentials 存取權杖,用於 BTG 開發者入口。
適用情境
僅適合已與 BTG Pactual 完成簽約開通、想在沙箱環境試驗由助理執行 Pix、boleto、帳戶與投資操作的團隊。由於端點路徑與沙箱主機都是未經驗證的推測,目前不適合正式上線使用。
執行需求
本機 Node.js 程序,透過 npm 套件安裝。需要 BTG_CLIENT_ID、BTG_CLIENT_SECRET、BTG_CERT_PATH 與 BTG_KEY_PATH,皆須在合約開通後從 BTG 開發者入口取得;BTG_ENV 選擇 sandbox(預設)或 production。需要連線至 BTG 端點的網路。
安裝前請注意
涉及真實金融憑證:OAuth 用戶端密鑰與 mTLS 私鑰路徑。工具可建立 Pix 收款與 boleto、申購與贖回基金、讀取餘額與明細;在 production 下會動用真實資金。端點路徑與沙箱主機為未經驗證的推測,呼叫可能失敗或指向非預期路由。屬 alpha 軟體,請鎖定精確版本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Btg,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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)

ToolPurpose
get_oauth_tokenMint or return a cached OAuth2 client_credentials bearer token for the BTG Developer Portal.
create_pix_cobCreate an immediate Pix charge (cob) with QR code.
get_pix_cobRetrieve an immediate Pix charge (cob) by its txid.
create_boletoIssue a boleto via BTG Cobrança.
get_boletoRetrieve a boleto by its BTG identifier (id or nosso_numero).
get_account_balanceRetrieve the available balance for a BTG+ checking account (conta corrente).
get_account_statementRetrieve account statement transactions for a given period.
list_investment_positionsList the counterparty's investment positions held at BTG, scoped to fixed-income asset classes (CDB, LCI, L...
get_portfolio_summaryConsolidated portfolio summary across all asset classes held at BTG (fixed income, funds, equities, treasur...
list_funds_availableList funds available for distribution on BTG's platform.
subscribe_to_fundSubscribe (aplicar) to a fund on BTG's distribution platform.
redeem_from_fundRedeem (resgatar) from a fund.

Install

bash
npm install @codespar/[email protected]

Environment

bash
BTG_CLIENT_ID="..."       # OAuth client_id from BTG's Developer PortalBTG_CLIENT_SECRET="..."   # OAuth client_secretBTG_CERT_PATH="/abs/path/to/client.crt"   # mTLS client certificateBTG_KEY_PATH="/abs/path/to/client.key"    # mTLS private keyBTG_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 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

bash
# stdio (default)npx @codespar/mcp-btg
# HTTP transportMCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-btg

Caveats

  • Paths are unverified. See the TODO(verify) markers in src/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_URL if 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

來源:packages/banking/btg/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0-alpha.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分