Skip to main content
Glama
query-ptax-bcb

query-ptax-bcb

by mastermils

query-ptax-bcb

MCP (Model Context Protocol) server that exposes the official PTAX dollar exchange rate by directly querying the open data API of the Central Bank of Brazil (BCB): https://olinda.bcb.gov.br/olinda/servico/PTAX/versao/v1/odata/

Tools

  • get_ptax_by_date(date) — official PTAX closing rate for a specific date (YYYY-MM-DD).

  • get_ptax_by_period(startDate, endDate) — series of closing rates between two dates.

  • get_ptax_latest(lookbackDays?) — most recent available closing rate (searches the last lookbackDays days, default 7).

All returned rates are the closing (official PTAX) bulletin, with buy, sell, and quote time (Brasília time).

Related MCP server: MCP BACEN

Build

npm install
npm run build

Testing with the MCP Inspector

npm run inspector

Configure in Claude Desktop / Claude Code

Add to the MCP configuration file (claude_desktop_config.json or equivalent):

{
  "mcpServers": {
    "query-ptax-bcb": {
      "command": "node",
      "args": ["D:/GitHub/master-mils/query-ptax-bcb/dist/index.js"]
    }
  }
}

Available Tools

3 tools
get_ptax_by_dateA

Get the official closing USD/BRL PTAX exchange rate (Banco Central do Brasil) for a specific date.

Inputs: date (required).

get_ptax_by_periodA

Get the official closing USD/BRL PTAX exchange rate series (Banco Central do Brasil) for each business day in a date range.

Inputs: endDate (required), startDate (required).

get_ptax_latestA

Get the most recent official closing USD/BRL PTAX exchange rate (Banco Central do Brasil).

Inputs: lookbackDays.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: individual date lookup, date-range series lookup, and latest available rate. There is no meaningful overlap or ambiguity between them.

    Naming Consistency5/5

    All tool names follow the same get_ptax_by_* and get_ptax_latest pattern, with consistent snake_case and a clear verb-noun structure. The naming is predictable and readable.

    Tool Count5/5

    Three tools is well-scoped for a focused PTAX exchange-rate server. Each tool covers a distinct query mode without unnecessary bloat or missing core access.

    Completeness5/5

    For a read-only USD/BRL PTAX exchange-rate server, the surface is complete: specific date, date range, and latest rate are all covered. There are no obvious dead ends or missing operations within the stated domain.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time and historical foreign exchange rates for 31+ currencies, enabling currency conversion, historical rate lookups, and time series analysis using data from the Frankfurter API.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides tools to query Brazilian Central Bank public data, including SGS time series and PTAX exchange rates.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides access to Chilean economic indicators (dolar, UF, IPC, etc.) via the mindicador.cl API, enabling queries for current values, historical series, and specific dates.
      MIT