Skip to main content
Glama
lucianoon

mcp-brasil

by lucianoon

mcp-brasil

MCP (Model Context Protocol) server that exposes Brazilian public data as tools for AI assistants: Claude Desktop, Claude Code, Cursor, and any MCP client.

Available tools

Source

Tools

Description

IBGE/SIDRA

ibge_populacao, ibge_pib, ibge_municipios, ibge_sidra

Population, GDP, municipality search, and generic query to any SIDRA aggregate

Central Bank

bcb_serie, bcb_cambio, bcb_moedas, bcb_focus

SGS time series (Selic, IPCA...), PTAX exchange rates, currency list, and Focus Bulletin expectations

INMET

inmet_estacoes, inmet_dados

List of weather stations and observed hourly data (observational data requires a token)

Chamber of Deputies

camara_deputados, camara_detalhes_deputado, camara_proposicoes, camara_votacoes_proposicao

Deputies, legislative bills, and votes

All sources are official open APIs — no API key required, except for INMET hourly data (see below).

Related MCP server: ibge-data-mcp

Installation

Requirements: uv (or Python 3.12+ with pip).

git clone https://github.com/lucianoon/mcp-brasil
cd mcp-brasil
uv sync

Configuration

Claude Desktop / Cursor

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

{
  "mcpServers": {
    "mcp-brasil": {
      "command": "uv",
      "args": ["run", "--directory", "/caminho/para/mcp-brasil", "mcp-brasil"]
    }
  }
}

Claude Code

claude mcp add mcp-brasil -- uv run --directory /caminho/para/mcp-brasil mcp-brasil

Optional INMET token

Station listing (inmet_estacoes) is open. However, observed hourly data (inmet_dados) requires a token provided by INMET — request it at portal.inmet.gov.br and set the environment variable in the MCP client:

{
  "mcpServers": {
    "mcp-brasil": {
      "command": "uv",
      "args": ["run", "--directory", "/caminho/para/mcp-brasil", "mcp-brasil"],
      "env": { "INMET_TOKEN": "seu-token" }
    }
  }
}

Without the token, the other 13 tools work normally.

Usage examples

After configuring, ask the assistant directly:

  • "What was the IPCA for the last 6 months?"

  • "What does the market expect for Selic at the next meetings?" (Focus Bulletin)

  • "Who are the federal deputies from Minas Gerais of party X?"

  • "What is the population of São Paulo in 2022? And the GDP?"

  • "How is the PTAX dollar doing in recent days?"

  • "Search for 2025 bills on mental health"

  • "Which automatic INMET stations exist in Amazonas?"

Development

uv sync --dev
uv run pytest
uv run ruff check .
uv run mypy src

Architecture

src/mcp_brasil/
├── server.py        # Servidor MCP e registro das tools
├── http.py          # Cliente HTTP compartilhado, retry e tratamento de erros
├── cache.py         # Cache TTL em memória para as respostas das APIs
└── tools/
    ├── ibge.py      # SIDRA v3 + localidades v1
    ├── bcb.py       # SGS + Olinda (PTAX e Boletim Focus)
    ├── inmet.py     # Estações e dados observacionais
    └── camara.py    # Dados Abertos da Câmara v2
  • stdio transport (MCP desktop standard)

  • 10-minute TTL cache per identical request

  • Automatic retry on network failures

  • Outputs formatted as model-readable text

Roadmap

  • v0.2 — INMET (stations + observational with token) and Focus Bulletin

  • DOU: search in the Official Gazette of the Union (waiting for a stable public API)

  • TSE: election results

  • Publication on PyPI (uvx mcp-brasil)

  • Optional streamable-http transport

License

MIT

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Connects AI agents to 28 Brazilian public APIs, providing over 200 tools to access data on economy, legislation, transparency, and the judiciary. It enables complex queries and cross-referencing of government datasets like IBGE, the Central Bank, and the National Congress through natural language.
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to access Brazilian IBGE statistical data (population, economy, agriculture) via natural language, with tools for querying aggregated data and metadata.
  • A
    license
    A
    quality
    C
    maintenance
    Exposes the BrasilAPI as MCP tools, enabling AI agents to query Brazilian public data such as CEP, CNPJ, DDD, IBGE, banks, PIX, FIPE, NCM, exchange rates, taxes, weather, CVM information, holidays, ISBN, domains, stock tickers, and TUSS.
    41
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Cross-asset market data for AI agents: forex, equities, Brazil macro (BCB/B3), crypto.

  • Brazilian Open Finance MCP — 30+ banks (Itaú, Nubank, etc.) to Claude/Cursor. Read-only.

  • Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lucianoon/mcp-brasil'

If you have feedback or need assistance with the MCP directory API, please join our Discord server