BCB BR MCP

by SidneyBissoli

319 downloads
Not rated
GitHub

About

MCP server for Brazilian Central Bank (BCB) economic data. Query 18,000+ time series including Selic, IPCA, exchange rates, GDP, employment, credit, and 150+ curated indicators via the SGS/BCB public API.

Details

Author
SidneyBissoli
Downloads
319
Categories
Other, Finance

- Historical time series values with date filtering
- Latest N values for any series
- Metadata (frequency, source) for each series
- Catalog of 150+ indicators in 12 categories
- Accent‑insensitive keyword search
- Variation percentage calculation with statistics
- Comparison of up to 5 series over the same period

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name BCB BR MCP
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via Smithery (recommended), use the HTTP endpoint (https://bcb.sidneybissoli.workers.dev), or run via npx with a Claude Desktop configuration. Eight tools are available: bcb_serie_valores, bcb_serie_ultimos, bcb_serie_metadados, bcb_series_populares, bcb_buscar_serie, bcb_indicadores_atuais, bcb_variacao, and bcb_comparar.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "bcb br mcp": {
            "bcb-br": {
                "command": "npx",
                "args": [
                    "-y",
                    "bcb-br-mcp"
                ]
            }
        }
    }
}

McpServers

{
    "bcb-br": {
        "command": "npx",
        "args": [
            "-y",
            "bcb-br-mcp"
        ]
    }
}

MCP (Model Context Protocol) server for theBrazilian Central Bank(Banco Central do Brasil,BCB) time series data (SGS/BCB).

Query economic and financial indicators such asSelic(interest rate),IPCA(inflation),exchange rates,GDP, and more, directly from AI assistants like Claude.

If you find this project useful, please consider giving it astar on GitHub. It helps others discover the project!

Capabilities:15 tools (skills) · 3 resources · 3 prompts — everything an MCP client needs to query the Brazilian Central Bank: SGS/BCB time series, theFocusmarket-expectations survey andPTAXexchange rates.

Ask your assistant, in plain Portuguese:

- "Qual a taxa Selic atual?"bcb_indicadores_atuais
- "Mostre o IPCA mês a mês em 2024."bcb_serie_valores
- "Qual foi a variação do dólar nos últimos 12 meses?"bcb_variacao
- "O que o mercado espera do IPCA em 2027?"bcb_focus_expectativas
- "Qual a Selic esperada na próxima reunião do Copom?"bcb_focus_selic
- "Qual foi a PTAX de fechamento do euro na sexta?"bcb_cambio_cotacao

The answers come live from the Brazilian Central Bank's SGS API — exact figures with provenance, not numbers guessed from training data.

- Historical data- Query time series values by code with date filters
- Latest values- Get the most recent N values of any series
- Metadata- Detailed information about series (frequency, source, etc.)
- Popular series catalog- 139 economic indicators verified against the source, organized by category
- Smart search- Find series by keyword (accent-insensitive)
- Current indicators- Latest values for key economic indicators
- Long periods, handled- The BCB API caps daily series at a 10-year window (HTTP 406) and refuses open windows; requests are sliced, fetched and merged automatically, so a 15-year daily query just works
- Frequency harmonisation- Resample a series to monthly, quarterly or annual with an explicit convention, including geometric compounding for series that already are percentage changes (monthly IPCA into annual IPCA)
- Variation calculation- Percentage change between periods with statistics
- Series comparison- Compare multiple series over the same period, with a warning when their periodicities differ
- Focus survey- Market expectations (mean, median, std. deviation, min, max, respondents) for IPCA, GDP, FX and more, by monthly/quarterly/annual horizon or rolling 12/24-month inflation, plus Selic by Copom meeting
- PTAX exchange rates- Official closing quotes for any currency the BCB publishes, single day or date range

Reference catalogs the server exposes as MCPresources(read-only contextual data that clients can attach):

Ready-made templates the server provides as MCPprompts:

Visitbcb-br-mcp on Smitheryand follow the installation instructions for your MCP client.

Via URL (Claude.ai, Claude Desktop, any MCP client)

Use the HTTP endpoint directly, no installation required:

The legacy hostnamehttps://bcb.sidneybissoli.workers.devkeeps working, and so does the olderPOST /route — clients configured before the endpoint moved to/mcpare rewritten transparently, so nothing that used to work stopped working. New setups should use the URL above.

Add to your Claude Desktop configuration file:

Windows:%APPDATA%\Claude\claude_desktop_config.json

macOS:~/Library/Application Support/Claude/claude_desktop_config.json

{ "mcpServers": { "bcb-br": { "command": "npx", "args": ["-y", "bcb-br-mcp"] } } }
{ "mcpServers": { "bcb-br": { "command": "bcb-br-mcp" } } }
What is the current Selic interest rate? → Uses bcb_indicadores_atuais
Show me the monthly IPCA for 2024 → Uses bcb_serie_valores with code 433, dataInicial 2024-01-01, dataFinal 2024-12-31
What inflation series are available? → Uses bcb_series_populares with category "Inflação"
Search for series related to the dollar → Uses bcb_buscar_serie with term "dolar" (works without accents)
What was the USD/BRL variation over the last 12 months? → Uses bcb_variacao with code 1 and periodos 12
Compare IPCA, IGP-M, and INPC in 2024 → Uses bcb_comparar with codes [433, 189, 188], dataInicial 2024-01-01, dataFinal 2024-12-31

The curated catalog holds139 series, each verified against the sourceon 2026-08-13.

ThefonteNomefield on every entry says where its name comes from:

- portal(82 series) — the name is transcribed from the series' dataset on the BCB Open Data Portal, andunidadecarries the published unit of measure.
- medido(57 series) — the series has no dataset on the portal, so the name is inherited; what was verified against the source is its periodicity and order of magnitude.

Periodicity is always themeasuredone (from the spacing between observations), never an inherited label. Market expectations arenothere — usebcb_focus_expectativas.

The full machine-readable catalog is served as thebcb://series/popularesresource and bybcb_series_populares. Thousands of further series are reachable throughbcb_buscar_serie, which also queries the BCB Open Data Portal index.

The SGS database contains over 18,000 time series. To find codes for other series:
- Visit theBCB SGS Portal
- Search for the desired series
- Note the series code
- Use that code with this server's tools

- Timeout: 30 seconds per request (prevents hanging)
- Auto-retry: 3 attempts with exponential backoff (1s, 2s, 4s) for transient failures; client errors (4xx) are not retried, since they are deterministic
- Error handling: Clear error messages

Measured against the live API, not inferred from documentation:

- Adate window over 10 years on a daily seriesis refused with HTTP406, and so is an open window (nodataInicial, or no dates at all). The limit applies to theimplicitwindow: with nodataFinalthe API assumes today. Requests are sliced into windows of up to3 years, fetched with bounded concurrency and merged in date order without duplicating the seams; the response reports it inchunking. The slice is 3 years rather than the allowed 10 because a 10-year daily window costs 10–20 s upstream and may be cut off around 30 s.
- dados/ultimos/Nis capped at 20by the API, in every periodicity. Above 20, the server infers the series' periodicity and fetches by date window instead.
- There is no per-series metadata endpoint(/metadadosanswers 404). Frequency is inferred from the spacing of the observations and flagged withperiodicidadeInferida; unit of measure is not available from any source.

Anything this server computes — variation, descriptive statistics, harmonised series — is markedderived: trueand carries a note with the conventions used. Statistics come from@sbissoli/mcp-stats. A value published by the BCB is always returned verbatim; only computed values are rounded (to 4 decimals).

bcb_buscar_seriesearches two layers: the curated curated catalog of 139 verified series (which ranks first, with the name source declared names) and the index of the BCB Open Data Portal, with thousands of series identified by code. Terms are accent- and case-insensitive, and several terms are combined with AND:

- "inflacao"→ finds "Inflação"
- "cambio"→ finds "Câmbio"
- "ipca servicos"→ both terms must match

The portal index is served from a 24-hour cache, renewed by the first search after it expires (one request to the portal, only metadata — series codes and names, never observations). Every answer carriescatalogo.cobertura: the index isnotthe whole SGS, so not finding a series here is not proof it does not exist.

Data obtained from the Banco Central do Brasil (SGS / Olinda-Expectativas / PTAX), published under theOpen Data Commons Open Database License (ODbL) v1.0https://opendatacommons.org/licenses/odbl/1-0/. Re-verified against the source on 2026-08-13: 4,259 of the portal's 4,260 datasets declarelicense_id: "odc-odbl". This isnotCC0, CC BY, or public domain — ODbL carries attribution, share-alike (on derived databases) and anti-DRM clauses. Exchange-rate answers pass through the BCB's own liability disclaimer verbatim; cross-currency parities arenotcompiled by the BCB — they come from an information agency (Refinitiv) and are redistributed by the BCB, and the tools say so.

The server's own code is MIT; the data is not. SeeNOTICE.md. Privacy: no user data is logged, by either channel — seePRIVACY.md.

Every successful tool response carries a provenance block (portfolio contract v1.0) in two channels:structuredContent.provenance+attribution(visible to the model) and a_metamirror underbr.com.sidneybissoli.bcb/*(out of band, zero tokens). Each block names the source, the canonical URL that reproduces the query, the data vintage, therealupstream extraction instant, and the licence.

Two details that are easy to get wrong and are handled here:

- retrieved_atis the real extraction instant, not "now".The portal index is served from a 24-hour cache, so a search answered from cache reports the instant the index was actually fetched — which can be a day old, and is the legally relevant date.
- One block per provenance, never merged.bcb_buscar_serieseparates the BCB portal index from the server's own curated catalogue;bcb_serie_metadadosseparates the live SGS reading from the catalogue;bcb_cambio_cotacaoseparates BCB-compiled dollar rates from agency-sourced cross-currency parities.

git clone https://github.com/SidneyBissoli/bcb-br-mcp.git cd bcb-br-mcp npm install
npx @modelcontextprotocol/inspector npm run dev

This server uses the Brazilian Central Bank's public API:

- Base endpoint:https://api.bcb.gov.br/dados/serie/bcdata.sgs.{code}/dados
- Format:JSON
- Authentication:None (public API)
- Documentation:
BCB Open Data

- bcb_focus_referencias: the parameter is nowescopo, nothorizonte, and the response array isescopos. The scopes are the five horizons ofbcb_focus_expectativasplusselic— andselicis not a horizon: its axis is the Copom meeting. Each block names thetoolthat consumes it. The previous name impliedselicwas a queryable horizon ofbcb_focus_expectativas, which it is not. Never published to npm under the old name.

- Three APIs under one contract, 8 tools → 13.Focus market-expectations survey (bcb_focus_expectativas,bcb_focus_selic,bcb_focus_referencias) and PTAX exchange rates (bcb_cambio_cotacao,bcb_cambio_moedas), consolidated by parameter rather than mirroring the source's ~18 OData resources.
- Real search.bcb_buscar_serienow queries the Open Data Portal index (3,500+ series, 24-hour cache, metadata only) on top of the curated catalog, and states the index's coverage instead of claiming a series does not exist.
- Every Focus and PTAX field name verified against the live API, including the Top 5 Selic resource, which publishes its fields in a different case from the other twelve.
- ODbL obligations shipped with the exchange-rate tools: the BCB disclaimer is passed through verbatim, and non-USD parities are qualified as third-party (Refinitiv) data redistributed by the BCB.

- HTTP endpoint via Cloudflare Workers (https://bcb.sidneybissoli.workers.dev)
- Published on Smithery.ai
- Refactored: tool logic extracted tosrc/tools.ts(shared between stdio and HTTP)

- New toolbcb_variacaofor percentage variation calculation
- New toolbcb_compararfor comparing multiple series
- 30-second timeout on requests
- Auto-retry with exponential backoff (3 attempts)
- Normalized search (accent-insensitive)
- Additional statistics (max, min, average, range)

- Initial release
- 6 basic tools
- Catalog with 139 verified series
- Fork the repository
- Create a feature branch (git checkout -b feature/new-feature)
- Commit your changes (git commit -m 'Add new feature')
- Push to the branch (git push origin feature/new-feature)
- Open a Pull Request

- GitHub:@SidneyBissoli
- Email:
sbissoli76@gmail.com

- BCB SGS Portal
-
BCB Open Data
-
Model Context Protocol
-
MCP Registry
-
Smithery: bcb-br-mcp
-
npm: bcb-br-mcp

MCP server for Indian APIs — GSTIN, IFSC, PAN, UPI, pincode, HSN/SAC. Zero auth. Offline-first. For AI agents.

Institutional research and manager diligence reports on hedge funds, venture capital and private equity managers. Summary of filings, personnel changes, media screening and social signals delivered to you in minutes.

MCP to interface with multiple blockchains, staking, DeFi, swap, bridging, wallet management, DCA, Limit Orders, Coin Lookup, Tracking and more.

Financial intelligence for AI agents — 31 tools across 8 data sources including regime, derivatives, stablecoin flows, momentum, macro, weather patterns, and political cycles.

AI-powered property zoning, buildability, and ADU eligibility analysis for any U.S. address via 20+ government data sources.

Deep fundamental data from SEC filings, including operational KPIs not found on Bloomberg, built for your financial AI agents.

Connect to any financial, utility, billing accounts; retrieve balance, transactions, payment and identity data instantly.

Execute stock and crypto trades via Trade Agent

AI trading memory layer for MT5/forex with 15 MCP tools — store/recall trades, pattern discovery, strategy evolution, and Outcome-Weighted Memory.

MCP server for Aave — lending pool data, reserve info, user positions, and liquidation thresholds.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.