# io.github.codespar/mcp-btg (npm · @codespar/mcp-btg)

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

- Trust score: 69/100 (medium)
- Change this week: +43
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-04

## Components

- npm · `@codespar/mcp-btg`: 69/100 (this document), [markdown](https://verifymcp.io/servers/codespar-mcp-btg/codespar-mcp-btg.md), [page](https://verifymcp.io/servers/codespar-mcp-btg/codespar-mcp-btg)

## Channel facts

- Registry: `npm`
- Package: `@codespar/mcp-btg`
- Version: `0.1.0-alpha.3`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-04.

- **Supply Chain Security**: 86/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 42 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 73/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 1405 tokens (~117/item across 12 items; 12 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 30/100
  - Stability observed for 9 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 98/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 95% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add codespar-mcp-btg -- npx -y @codespar/mcp-btg
```

### Codex

```bash
codex mcp add codespar-mcp-btg -- npx -y @codespar/mcp-btg
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "codespar-mcp-btg": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@codespar/mcp-btg"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add codespar-mcp-btg --command npx --arg -y --arg @codespar/mcp-btg
```

### Hermes

```yaml
mcp_servers:
  codespar-mcp-btg:
    command: "npx"
    args: ["-y", "@codespar/mcp-btg"]
```

### Other

```json
{
  "mcpServers": {
    "codespar-mcp-btg": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-btg"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-04 (score 69, +1)

No change was recorded against any check on this day. Stability & Change Management went from 27 to 30. That category is still filling its 30-day observation window: 8 days of observed history at the previous scan, 9 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-03 (score 68, +4)

- [functional improvement] Stability: unverified → 0.27

### 2026-08-02 (score 64, +29)

- [security regression] Provenance: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] License: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Schema quality: unverified → good
- [functional] Licence: MIT

### 2026-08-01 (score 35, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-07-31 (score 20, −25)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 45, +19)

- [functional regression] Dependency health: partial → unverified
- [functional improvement] Tool coverage: unverified → 100

### 2026-07-28 (score 26, −19)

- [functional regression] Tool coverage: 100 → unverified
- [functional improvement] Dependency health: unverified → partial
- [functional] First check of Schema quality: unverified

### 2026-07-27 (score 45)

First indexed and scored.

## MCP tools (12)

### `get_oauth_token` (~44 tokens)

Mint or return a cached OAuth2 client_credentials bearer token for the BTG Developer Portal. Exposed so agents can inspect token freshness; normal tool calls obtain tokens implicitly.

### `create_pix_cob` (~138 tokens)

Create an immediate Pix charge (cob) with QR code. Returns the txid, copy-paste EMV payload, and location URL. BACEN Pix v2 standard surface.

Input parameters:

- `additional_info` (array): Optional free-text key/value info shown to the payer
- `amount` (string, required): Amount in BRL major units, e.g. '99.90'
- `description` (string): Payer-visible description (max 140 chars)
- `expires_in` (number): QR lifetime in seconds (default 3600)
- `payer` (object): Payer identification (recommended for cob; required for cobv)

### `get_pix_cob` (~48 tokens)

Retrieve an immediate Pix charge (cob) by its txid.

Input parameters:

- `txid` (string, required): Pix charge txid (BACEN-format alphanumeric, 26-35 chars)

### `create_boleto` (~166 tokens)

Issue a boleto via BTG Cobrança. Returns nosso_numero, linha_digitável, barcode, and PDF URL.

Input parameters:

- `amount` (string, required): Amount in BRL major units, e.g. '150.00'
- `due_date` (string, required): Due date ISO-8601 (YYYY-MM-DD)
- `fine` (object): Multa (fine after due date): { percentage?, amount?, days_after_due? }
- `instructions` (array): Free-text instructions printed on the boleto
- `interest` (object): Juros (daily interest after due date): { percentage?, amount? }
- `our_number` (string): Nosso_numero. Omit to have BTG assign one.
- `payer` (object, required): Payer (sacado) data

### `get_boleto` (~38 tokens)

Retrieve a boleto by its BTG identifier (id or nosso_numero).

Input parameters:

- `id` (string, required): Boleto id or nosso_numero

### `get_account_balance` (~54 tokens)

Retrieve the available balance for a BTG+ checking account (conta corrente). Returns available, blocked, and total balances in BRL.

Input parameters:

- `account` (string, required): Agência-conta identifier of the BTG+ account

### `get_account_statement` (~100 tokens)

Retrieve account statement transactions for a given period. Paginated.

Input parameters:

- `account` (string, required): Agência-conta identifier of the BTG+ account
- `from` (string, required): Start date ISO-8601 (YYYY-MM-DD)
- `page` (number): Page number (1-indexed)
- `page_size` (number): Items per page (default 50)
- `to` (string, required): End date ISO-8601 (YYYY-MM-DD)

### `list_investment_positions` (~174 tokens)

List the counterparty's investment positions held at BTG, scoped to fixed-income asset classes (CDB, LCI, LCA, LF, LFSN, debêntures, CRI, CRA). Each position includes issuer, indexer (CDI/IPCA/Prefixado), gross value, net value (after IR/IOF), and maturity.

Input parameters:

- `account` (string, required): Investment account identifier (BTG investor code, distinct from checking agência-conta)
- `asset_class` (string): Optional filter: CDB | LCI | LCA | LF | LFSN | DEBENTURE | CRI | CRA
- `maturity_from` (string): Optional maturity filter — earliest YYYY-MM-DD
- `maturity_to` (string): Optional maturity filter — latest YYYY-MM-DD

### `get_portfolio_summary` (~90 tokens)

Consolidated portfolio summary across all asset classes held at BTG (fixed income, funds, equities, treasury, crypto). Returns gross value, net value, % allocation per class, and total IR/IOF estimate.

Input parameters:

- `account` (string, required): Investment account identifier (BTG investor code)
- `reference_date` (string): Optional reference date YYYY-MM-DD; defaults to D-1 close

### `list_funds_available` (~152 tokens)

List funds available for distribution on BTG's platform. Returns fund CNPJ, name, manager, class (Renda Fixa | Multimercado | Ações | Cambial | Previdência | FIDC | FII), benchmark, fee schedule, minimum subscription, and liquidity (cotização / liquidação D+n).

Input parameters:

- `asset_class` (string): Optional filter: RF | MM | ACOES | CAMBIAL | PREV | FIDC | FII
- `manager` (string): Optional manager name filter
- `min_subscription_max` (string): Optional cap on minimum subscription (BRL major units)
- `page` (number)
- `page_size` (number)

### `subscribe_to_fund` (~162 tokens)

Subscribe (aplicar) to a fund on BTG's distribution platform. Settlement follows the fund's cotização/liquidação rule (typically D+0 cotização, D+1 liquidação for RF; D+30 for some FIDC). Requires a suitability profile on file.

Input parameters:

- `account` (string, required): Investment account identifier (BTG investor code)
- `amount` (string, required): Subscription amount in BRL major units, e.g. '5000.00'
- `fund_cnpj` (string, required): CNPJ of the fund (digits only)
- `idempotency_key` (string, required): Counterparty-side idempotency key (UUID recommended)
- `source_account` (string, required): BTG+ checking account to debit (agência-conta)

### `redeem_from_fund` (~172 tokens)

Redeem (resgatar) from a fund. Total or partial. Settlement follows the fund's cotização/liquidação rule. Returns the request id, redemption type (total/parcial), and projected liquidation date.

Input parameters:

- `account` (string, required): Investment account identifier (BTG investor code)
- `amount` (string): Redemption amount in BRL major units. Omit for total redemption.
- `destination_account` (string, required): BTG+ checking account to credit (agência-conta)
- `fund_cnpj` (string, required): CNPJ of the fund (digits only)
- `idempotency_key` (string, required): Counterparty-side idempotency key (UUID recommended)
- `redemption_type` (string): TOTAL | PARCIAL — defaults to PARCIAL when amount is given, TOTAL otherwise

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/codespar-mcp-btg/codespar-mcp-btg#diagnostics

## Score history

- 2026-08-04: 69
- 2026-08-03: 68
- 2026-08-02: 64
- 2026-08-01: 35
- 2026-07-31: 20
- 2026-07-30: 45
- 2026-07-28: 26
- 2026-07-27: 45

## Links

- npm package: https://www.npmjs.com/package/@codespar/mcp-btg
- Socket report: https://socket.dev/npm/package/@codespar/mcp-btg
- Repository: https://github.com/codespar/mcp-dev-latam
- Changelog RSS feed: https://verifymcp.io/servers/codespar-mcp-btg/codespar-mcp-btg/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/codespar-mcp-btg/codespar-mcp-btg/changelog.json
- HTML version of this page: https://verifymcp.io/servers/codespar-mcp-btg/codespar-mcp-btg
