The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Ibge Br MCP listing page.
Live, exact Brazilian public data for your AI assistant — with provenance, not guesswork.
Ask an LLM "what was Belo Horizonte's population in the 2022 Census?" and you get a plausible number from its training data: maybe right, maybe outdated, with no source. ibge-br-mcp instead has your assistant query the official IBGE APIs in real time — returning the exact figure together with the table and period it came from.
This server implements the Model Context Protocol (MCP) to give AI assistants live, structured access to Brazil's public geographic, demographic, economic, and health data — sourced from the IBGE APIs (including health indicators served through IBGE's SIDRA system).
Ask your assistant, in English or Portuguese:
ibge_cidades / ibge_censoibge_municipiosibge_compararThe answers come live from the official IBGE APIs — exact figures with the table and period they came from, not numbers guessed from training data.
Want to see a whole analysis rather than a single answer? The end-to-end demo works one real question — which state grew most between the 2010 and 2022 Censuses, and what drove it — from first call to conclusion, with every figure as it came back. The practical examples are seven shorter recipes, including ranking all 5,570 municipalities in a single call.
ibge_* data tools plus search/fetch for ChatGPT Deep Research📖 Article (in Portuguese): Como achar a tabela certa no SIDRA — e como saber que é a certa — finding the right SIDRA table, the metadata that settles it, a full worked example on 2022 Census data, and the four traps that cost the most. Also published on the site, in Portuguese and English: sidneybissoli.com.
🔌 Tutorial: Querying SIDRA through MCP in Claude and ChatGPT — how to connect this server in claude.ai, Claude Desktop, Claude Code, ChatGPT (developer mode and Deep Research), Cursor, VS Code and Gemini CLI, then one real query end to end with the provenance block it returns. Em português.
Since v3.3.0 every successful tool response carries a provenance block (portfolio contract v1.0), so each number is citable, auditable, and reproducible. The block is emitted on three channels:
structuredContent.provenance (parseable, visible to the model) — exactly
six keys: source (the IBGE API queried), source_url (canonical URL that
reproduces the query), data_vintage (reference period when the source
exposes one; null otherwise), retrieved_at (the REAL upstream extraction
instant, preserved across cache hits, Brasília time), citation
("Fonte: IBGE — [pesquisa/tabela], [URL], extraído em [data]."), and
license — plus attribution, the canonical list of source URLs._meta under br.com.sidneybissoli.ibge/provenance and .../attribution
(out-of-band mirror for audit/UI, zero model tokens).The IBGE APIs declare no license of their own; the legal regime is Brazil's
open-data framework — Lei 12.527/2011 (LAI) and Decreto 8.777/2016
(unrestricted reuse, free use, obligation limited to crediting the source).
Statistics-mode responses (estatisticas=true) and ibge_comparar are marked
derived with an explanatory note in the canonical block, since the
aggregates are computed server-side from the raw IBGE values.
| Tool | Description |
|---|---|
ibge_estados | List Brazilian states with region filtering |
ibge_municipios | List municipalities by state or search by name |
ibge_localidade | Get details of a locality by IBGE code |
ibge_geocodigo | Decode IBGE codes or search codes by name |
ibge_vizinhos | Find neighboring municipalities |
| Tool | Description |
|---|---|
ibge_sidra | Query SIDRA tables (Census, PNAD, GDP, etc.) |
ibge_sidra_tabelas | List and search available SIDRA tables |
ibge_sidra_metadados | Get table metadata (variables, periods, levels) |
ibge_pesquisas | List IBGE research surveys and their tables |
| Tool | Description |
|---|---|
ibge_indicadores | Economic and social indicators (GDP, IPCA, unemployment) |
ibge_censo | Census data (1970-2022) with 16 themes |
ibge_comparar | Compare indicators across localities with rankings |
| Tool | Description |
|---|---|
ibge_cidades | Municipal indicators (population, HDI, GDP per capita, etc.) |
| Tool | Description |
|---|---|
ibge_paises | Country data following UN M49 methodology |
| Tool | Description |
|---|---|
ibge_nomes | Name frequency and rankings in Brazil |
| Tool | Description |
|---|---|
ibge_cnae | CNAE (National Classification of Economic Activities) |
| Tool | Description |
|---|---|
ibge_malhas | Geographic meshes (GeoJSON, TopoJSON, SVG) |
ibge_malhas_tema | What a thematic recorte contains (biomes, Legal Amazon, semi-arid, coastal, border strip, metro regions, RIDEs) + the URL to download its geometry |
| Tool | Description |
|---|---|
ibge_datasaude | Health indicators via IBGE's SIDRA |
| Tool | Description |
|---|---|
ibge_noticias | IBGE news and press releases |
ibge_calendario | IBGE release and collection calendar |
| Tool | Description |
|---|---|
search | Searches the IBGE catalog (SIDRA tables, municipalities, known indicators) — OpenAI Deep Research contract |
fetch | Returns one catalog document (table metadata, municipality hierarchy + population, indicator series) with its public URL for citation |
The two are the only tools without the ibge_ prefix: their names are fixed by the OpenAI contract. For data queries keep using the ibge_* tools.
With 23 tools, several can touch the same topic. Quick guide for the common overlaps:
| You want… | Use |
|---|---|
| A single municipality/state panel (population, HDI, GDP…) | ibge_cidades |
| Census data or historical series (1970–2022) | ibge_censo |
| Rank/compare 2–10 localities on one indicator | ibge_comparar |
| A macro indicator time series (GDP, IPCA, unemployment…) | ibge_indicadores |
| A specific SIDRA table / fine control | ibge_sidra |
| The largest/smallest/mean/median across a whole table | ibge_sidra/ibge_censo/ibge_indicadores/ibge_datasaude with estatisticas=true |
| You want… | Use |
|---|---|
| IPCA, INPC, GDP, unemployment (IBGE, primary source) | ibge_indicadores |
| You want… | Use |
|---|---|
| List/search municipalities | ibge_municipios |
| List states | ibge_estados |
| Resolve a name→code at any level, or decode a code's structure | ibge_geocodigo |
| Full record of one locality you already have the code for | ibge_localidade |
| Neighboring municipalities | ibge_vizinhos |
Discover → inspect → query: ibge_pesquisas / ibge_sidra_tabelas (find a table) → ibge_sidra_metadados (its structure) → ibge_sidra (query). For common data, the wrappers above (ibge_censo, ibge_indicadores, ibge_comparar, ibge_cidades) are usually easier.
| You want… | Use |
|---|---|
| Administrative outlines (Brazil/region/state/municipality) | ibge_malhas |
| Thematic areas (biomes, Legal Amazon, semi-arid, metro regions) | ibge_malhas_tema (IBGE Geosserviços WFS — the Malhas API does not publish these) |
engines.node)The server is also hosted, with the same tools, over Streamable HTTP and without a key:
It works with any client that accepts a remote MCP server — a custom connector in claude.ai (Settings → Connectors → Add custom connector), claude mcp add --transport http ibge https://ibge.sidneybissoli.com/mcp in Claude Code, an app in ChatGPT, the mcp.json of Cursor and VS Code. The step-by-step for each client is in the tutorial. The sections below cover the local form, via npx.
Add to your Claude Desktop configuration file (claude_desktop_config.json):
Or if installed from source:
ChatGPT deep research (and company knowledge, and research workflows over the Responses API) only uses an MCP server that exposes exactly search and fetch — this server does, on top of the ibge_* tools. Point the connector at the hosted endpoint, no key required:
search ranks the query against SIDRA tables, municipalities and the known indicators and returns { id, title, url }; fetch returns the document as readable Markdown with the canonical public URL (sidra.ibge.gov.br or cidades.ibge.gov.br), which is what ChatGPT cites. Both carry the same provenance block as every other tool. In ChatGPT's developer mode (Settings → Security and login → Developer mode) any tool is callable — the ibge_* tools remain the ones to use for data.
List all Brazilian states.
List Brazilian municipalities.
Query municipal indicators (similar to Cidades@ portal).
Available indicators: populacao, area, densidade, pib_per_capita, idh, escolarizacao, mortalidade, salario_medio, receitas, despesas
Query international country data.
Regions: americas, europa, africa, asia, oceania
Query SIDRA tables (IBGE's Automatic Recovery System).
Common tables:
| Code | Description |
|---|---|
| 6579 | Population estimates (annual) |
| 9514 | Census 2022 population |
| 4714 | Unemployment rate (PNAD) |
| 6706 | GDP at current prices |
Territorial levels:
| Code | Level |
|---|---|
| 1 | Brazil |
| 2 | Region (North, Northeast, etc.) |
| 3 | State (UF) |
| 6 | Municipality |
| 7 | Metropolitan Region |
| 106 | Health Region |
| 127 | Legal Amazon |
| 128 | Semi-arid |
Statistics mode (also on ibge_censo, ibge_indicadores, ibge_datasaude):
for largest/smallest/mean/median/distribution/ranking questions, pass
estatisticas=true — the server computes the full distribution (min/max/mean/
median/std-dev/labeled percentiles) over all rows before pagination and
returns top/bottom rankings (topN, default 10). agruparPor="<column label>" ranks groups by descending sum, each with its own mini-distribution.
Query Census data (1970-2022).
Available themes: populacao, alfabetizacao, domicilios, idade_sexo, religiao, cor_raca, rendimento, migracao, educacao, trabalho
Query economic and social indicators.
Available indicators:
| Category | Indicators |
|---|---|
| Economic | pib, pib_variacao, pib_per_capita, industria, comercio, servicos |
| Prices | ipca, ipca_acumulado, inpc |
| Labor | desemprego, ocupacao, rendimento, informalidade |
| Population | populacao, densidade |
| Agriculture | agricultura, pecuaria |
Query name frequency and rankings.
Get geographic meshes (maps).
Resolution levels:
| Value | Internal Divisions |
|---|---|
| 0 | No divisions (outline only) |
| 2 | States |
| 5 | Municipalities |
Query Brazilian health indicators served through IBGE's SIDRA (some originally produced by DataSUS, e.g. mortality and births).
Available indicators: mortalidade_infantil, esperanca_vida, nascidos_vivos, obitos, fecundidade, saneamento_agua, saneamento_esgoto, plano_saude
servicodados.ibge.gov.br/api/v1/localidadesservicodados.ibge.gov.br/api/v2/censos/nomesservicodados.ibge.gov.br/api/v3/agregadosapisidra.ibge.gov.br/valuesservicodados.ibge.gov.br/api/v3/malhasservicodados.ibge.gov.br/api/v3/noticiasservicodados.ibge.gov.br/api/v1/projecoes/populacaoservicodados.ibge.gov.br/api/v2/cnaeservicodados.ibge.gov.br/api/v3/calendarioservicodados.ibge.gov.br/api/v1/paisesservicodados.ibge.gov.br/api/v1/pesquisasThe project includes a comprehensive test suite with 565 tests covering:
This project maintains high code quality standards:
Run tests locally:
MIT
Sidney da Silva Pereira Bissoli