Banco Central do Brasil (BCB) — SGS Time Series MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Leia em Português
MCP (Model Context Protocol) server for the **Brazilian Central Bank** (Banco Central do Brasil, **BCB**): **SGS** time series (SGS/BCB), the **Focus** market-expectations survey (served over the **Olinda** OData API) and **PTAX** exchange rates.
Query economic and financial indicators such as **Selic** (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 a star on GitHub. It helps others discover the project!
**Capabilities:** 17 tools (skills) · 3 resources · 3 prompts — everything an MCP client needs to query the Brazilian Central Bank: SGS/BCB time series, the **Focus** market-expectations survey and **PTAX** exchange rates.
See it in action
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.
Features
- **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** - 135 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
📖 **Article (in Portuguese):** Séries do Banco Central: como consultar o SGS, a Focus e a PTAX sem cair nas armadilhas — the three API limits measured live, level vs. rate series, the Focus scopes, and what the ODbL requires. Also published on the site, in Portuguese and English: sidneybissoli.com.
Available Tools
| Tool | Description |
|------|-------------|
| bcb_serie_valores | Query series values by code and date range; slices long windows automatically and can harmonise the series to a coarser frequency |
| bcb_serie_ultimos | Get the last N values of a series (any N — the upstream cap of 20 is worked around) |
| bcb_serie_metadados | Get series metadata (name, frequency, category, last value) |
| bcb_series_populares | List popular series grouped by category |
| bcb_buscar_serie | Search series by name or description (accent-insensitive, AND between words; everyday words resolved to the BCB's wording, and the response says so) |
| bcb_indicadores_atuais | Latest values: Selic, IPCA, USD/BRL, IBC-Br |
| bcb_variacao | Percentage variation of one series over a period: level change for level series, **compounded accumulation** for series that are already period-on-period rates (IPCA, IGP-M, INPC…); analise.metodo says which |
| bcb_comparar | Compare 2 to 5 series over the same period with ranking (same level/compounding rule per series, declared in metodo) |
| bcb_focus_expectativas | Focus survey expectations for one indicator, horizon as a parameter (monthly, quarterly, annual, rolling 12m/24m inflation); top5 flag |
| bcb_focus_selic | Focus expectations for the Selic rate, by Copom meeting (R1/2026 form) |
| bcb_focus_referencias | Which indicators and reference dates the Focus survey actually publishes, **broken down per scope** (the five horizons plus selic, whose axis is the Copom meeting) — the indicator set differs by scope (9 monthly vs 26 annual) |