Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

MCP Dados Brasil

by lucianoonversion 0.6.0i★ 3iRuns on your computerRepository ↗
Registry nameio.github.lucianoon/mcp-dados-br

How to install

What it does

Servidor MCP com dados oficiais brasileiros: IBGE, Banco Central, INMET, Câmara e Senado.

  • Connects Runs on your computer
  • Account or key Needs INMET_TOKEN
  • Category Other

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity7/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score19/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install MCP Dados Brasil. Follow https://mcp.popnx.com/i/lucianoon-mcp-dados-br.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

You need a MCP Dados Brasil key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server MCP Dados Brasil for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "dados-br": { "command": "uvx", "args": [ "mcp-dados-br" ], "env": { "INMET_TOKEN": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For INMET_TOKEN, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the MCP Dados Brasil tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a MCP Dados Brasil key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the MCP Dados Brasil site ↗

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "dados-br": {
          "command": "uvx",
          "args": [
            "mcp-dados-br"
          ],
          "env": {
            "INMET_TOKEN": "your-value"
          }
        }
      }
    }

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Quit Claude and open it again

  6. Try it

    Use MCP Dados Brasil and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using MCP Dados Brasil or shows a MCP Dados Brasil tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MCP_LOG_LEVEL Nível de log em stderr (DEBUG, INFO, WARNING) · default WARNING

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect MCP Dados Brasil yet

MCP Dados Brasil runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect MCP Dados Brasil

  • You need a MCP Dados Brasil key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • You need a MCP Dados Brasil key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a MCP Dados Brasil key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a MCP Dados Brasil key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

B · Others in Other that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

You need a MCP Dados Brasil key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server MCP Dados Brasil for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user dados-br --env INMET_TOKEN=your-value -- uvx mcp-dados-br 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For INMET_TOKEN, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the MCP Dados Brasil tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a MCP Dados Brasil key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the MCP Dados Brasil site ↗

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user dados-br --env INMET_TOKEN=your-value -- uvx mcp-dados-br

    Replace “your-value” with your key before pressing Enter

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Type /mcp in Claude Code

    You should see MCP Dados Brasil listed as connected

  6. Try it

    Use MCP Dados Brasil and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using MCP Dados Brasil or shows a MCP Dados Brasil tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MCP_LOG_LEVEL Nível de log em stderr (DEBUG, INFO, WARNING) · default WARNING

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

You need a MCP Dados Brasil key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server MCP Dados Brasil for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "dados-br": { "command": "uvx", "args": [ "mcp-dados-br" ], "env": { "INMET_TOKEN": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For INMET_TOKEN, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the MCP Dados Brasil tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a MCP Dados Brasil key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the MCP Dados Brasil site ↗

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the MCP Dados Brasil settings, INMET_TOKEN is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use MCP Dados Brasil and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using MCP Dados Brasil or shows a MCP Dados Brasil tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MCP_LOG_LEVEL Nível de log em stderr (DEBUG, INFO, WARNING) · default WARNING

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

You need a MCP Dados Brasil key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server MCP Dados Brasil for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "dados-br": { "type": "stdio", "command": "uvx", "args": [ "mcp-dados-br" ], "env": { "INMET_TOKEN": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For INMET_TOKEN, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the MCP Dados Brasil tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a MCP Dados Brasil key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the MCP Dados Brasil site ↗

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the MCP Dados Brasil settings, INMET_TOKEN is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use MCP Dados Brasil and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using MCP Dados Brasil or shows a MCP Dados Brasil tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MCP_LOG_LEVEL Nível de log em stderr (DEBUG, INFO, WARNING) · default WARNING

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use MCP Dados Brasil💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user dados-br --env INMET_TOKEN=your-value -- uvx mcp-dados-br

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "dados-br": {
      "command": "uvx",
      "args": [
        "mcp-dados-br"
      ],
      "env": {
        "INMET_TOKEN": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "dados-br": {
      "command": "uvx",
      "args": [
        "mcp-dados-br"
      ],
      "env": {
        "INMET_TOKEN": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "dados-br": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-dados-br"
      ],
      "env": {
        "INMET_TOKEN": "your-value"
      }
    }
  }
}

Values you fill in

  • INMET_TOKEN secret required env
    Token opcional do INMET para dados horários observados
  • MCP_LOG_LEVEL env
    Nível de log em stderr (DEBUG, INFO, WARNING)

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
27/wk
Connection
Runs on your computer
Latest versioni
0.6.0
Categoryi
Other
Published to registryi
Sep 23, 2026
Code last changedi
Nov 1, 2026
Maker
lucianoon
Packages
pypi: mcp-dados-br
Website
github.com
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 19, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account lucianoon, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 18 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for mcp-dados-br@0.6.0

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/lucianoon-mcp-dados-br.svg)](https://mcp.popnx.com/en/servers/lucianoon-mcp-dados-br)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Otheri

  • More stars than 93% of the other 20653 servers in this category
  • Published to the registry more recently than 43% of the other 20653 servers in this category
  • Basic checks equal to or better than 99% of the other 20653 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is MCP Dados Brasil safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

You need to fill in: INMET_TOKEN

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 18 days ago, and the latest version (0.6.0) reached the registry 2 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.

by koala73Widely used★ 90.9KUpdated 3 days ago

Runs in the cloud✓ service owner · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

by openstatusHQWidely used★ 9.3KUpdated 2 months ago

Runs in the cloud✓ service owner · openstatus.dev

Oh My Posh Validator

Validate oh-my-posh configurations and segment snippets against the official schema.

by JanDeDobbeleerWidely used★ 23.8K Stars for the whole repoUpdated 30 days ago

Runs in the cloud✓ service owner · ohmyposh.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

by Klavis-AIGrowing★ 5.8KUpdated 14 months ago

Runs in the cloudRepo archived✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

by jitsucomWidely used★ 5.1KUpdated 4 months ago

Runs in the cloud✓ service owner · jitsu.com
Compared with similar ones
This one
MCP Dados Brasil
World MonitoropenstatusOh My Posh ValidatorStrataJitsu
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyYesNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/34/44/44/41/44/4
LicenseMITAGPL-3.0AGPL-3.0MITApache-2.0MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

mcp-dados-br

*English version*

Servidor MCP (Model Context Protocol) que expõe dados públicos brasileiros como ferramentas para assistentes de IA: Claude Desktop, Claude Code, Cursor e qualquer cliente MCP.

Instalação

A forma mais simples, sem instalar nada permanentemente:

uvx mcp-dados-br

Configuração no Claude Desktop:

{

"mcpServers": { "dados-brasil": { "command": "uvx", "args": ["mcp-dados-br"] } } }

Ou no Claude Code:

claude mcp add dados-brasil -- uvx mcp-dados-br
A partir do código-fonte
git clone https://github.com/lucianoon/mcp-dados-br

cd mcp-dados-br uv sync

Ferramentas disponíveis

FonteToolsDescrição
IBGE/SIDRAibge_populacao, ibge_pib, ibge_municipios, ibge_sidraPopulação, PIB, busca de municípios e consulta genérica a qualquer agregado SIDRA
Banco Centralbcb_serie, bcb_cambio, bcb_moedas, bcb_focusSéries SGS com atalhos nomeados (selic, ipca, cdi...), cotações PTAX, lista de moedas e expectativas do Boletim Focus
INMETinmet_estacoes, inmet_dadosLista de estações meteorológicas e dados horários observados (dados observacionais exigem token)
Câmara dos Deputadoscamara_deputados, camara_detalhes_deputado, camara_proposicoes, camara_votacoes_proposicao, camara_agenda, camara_tramitacaoDeputados, proposições, votações, agenda e tramitações
Senado Federalsenado_senadores, senado_materias, senado_votacoesSenadores em exercício, matérias legislativas e votações nominais com placar

Todas as fontes são APIs oficiais abertas — nenhuma chave de API necessária, exceto os dados horários do INMET (veja abaixo).

Configuração

Claude Desktop / Cursor

Adicione ao arquivo de configuração (claude_desktop_config.json ou mcp.json):

{

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

Claude Code
claude mcp add mcp-dados-br -- uv run --directory /caminho/para/mcp-dados-br mcp-dados-br

Token opcional do INMET

A listagem de estações (inmet_estacoes) é aberta. Já os dados horários observados (inmet_dados) exigem um token fornecido pelo INMET — solicite em portal.inmet.gov.br e configure a variável de ambiente no cliente MCP:

{

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

Sem o token, as demais 18 ferramentas funcionam normalmente.

Transporte streamable-http

Além do stdio padrão, o servidor pode rodar em modo HTTP remoto:

MCP_TRANSPORTE=streamable-http MCP_PORTA=8000 mcp-dados-br

Aponte clientes para http://localhost:8000/mcp. Útil para Docker ou compartilhar o servidor na rede local. Por padrão o servidor escuta só em 127.0.0.1; defina MCP_HOST=0.0.0.0 para aceitar conexões de outras máquinas (a imagem Docker já faz isso).

VariávelPadrãoFunção
MCP_TRANSPORTEstdiostreamable-http liga o modo HTTP
MCP_HOST127.0.0.1Interface de escuta (0.0.0.0 na imagem Docker)
MCP_PORTA8000Porta HTTP
MCP_AUTH_TOKENvazioSe definido, exige Authorization: Bearer em toda requisição
Autenticação (bearer opcional)

Risco: sem MCP_AUTH_TOKEN, o modo HTTP não tem autenticação. Escutando

em 0.0.0.0 (como na imagem Docker), qualquer pessoa que alcance a porta pode

chamar as 19 tools, consumir a sua cota nas APIs públicas e usar o seu

INMET_TOKEN. O servidor registra um aviso no log quando sobe assim. Não

publique a porta na internet sem token e prefira um proxy reverso com TLS na

frente: sobre HTTP puro o token trafega em texto claro.

Gere um token longo e aleatório e passe-o ao servidor:

export MCP_AUTH_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')"

MCP_TRANSPORTE=streamable-http mcp-dados-br

Requisições sem o cabeçalho, com outro esquema ou com token diferente recebem 401 com WWW-Authenticate: Bearer. A comparação usa secrets.compare_digest (tempo constante). No cliente, envie o cabeçalho, por exemplo no Claude Code:

claude mcp add --transport http dados-brasil http://localhost:8000/mcp \

--header "Authorization: Bearer $MCP_AUTH_TOKEN"

Em stdio o token não se aplica: o processo só fala com o cliente que o iniciou.

Docker
docker build -t mcp-dados-br .

docker run -p 8000:8000 \ -e MCP_AUTH_TOKEN="$MCP_AUTH_TOKEN" \ -e INMET_TOKEN=seu-token \ mcp-dados-br

Para uso só na própria máquina, publique a porta apenas no loopback: docker run -p 127.0.0.1:8000:8000 mcp-dados-br.

Exemplos de uso

Depois de configurar, pergunte diretamente ao assistente:

  • "Qual foi o IPCA dos últimos 6 meses?"
  • "O que o mercado espera para a Selic nas próximas reuniões?" (Boletim Focus)
  • "Quem são os deputados federais de Minas Gerais do partido X?"
  • "Qual a população de São Paulo em 2022? E o PIB?"
  • "Como está o dólar PTAX nos últimos dias?"
  • "Busque projetos de lei de 2025 sobre saúde mental"
  • "O que está na agenda da Câmara esta semana?"
  • "Como o Senado votou a PEC X? Qual o placar?"
  • "Quem são os senadores de Minas Gerais?"
  • "Quais estações automáticas do INMET existem no Amazonas?"

Desenvolvimento

uv sync --dev

uv run pytest # suíte unitária (mocks) uv run pytest -m integration # consulta as APIs reais uv run ruff check . uv run mypy src

Logs de depuração: configure MCP_LOG_LEVEL=DEBUG no cliente MCP. Para contribuir, leia o CONTRIBUTING.md.

Arquitetura
src/mcp_dados_br/

├── server.py # Servidor MCP, registro das tools e escolha do transporte ├── auth.py # Middleware ASGI de autenticação bearer (modo HTTP) ├── validacao.py # Validação dos argumentos das tools (UF, moeda, datas, limites) ├── saida.py # Resultado com texto + structuredContent ├── http.py # Cliente HTTP compartilhado, retry e tratamento de erros ├── payload.py # Leitura defensiva das respostas das APIs (fonte e campo no erro) ├── 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 └── senado.py # Dados Abertos do Senado (LegisSaber)

  • Dois transportes: stdio (padrão dos clientes desktop) e streamable-http (Docker/rede), este com autenticação bearer opcional via MCP_AUTH_TOKEN
  • Validação de entrada antes de montar qualquer URL: UF entre as 27 siglas, moeda ISO 4217 de 3 letras, datas ISO, códigos IBGE/SIDRA numéricos, IDs positivos e limites de dias/ultimas. Os limites também aparecem no inputSchema das tools, e o erro chega ao cliente MCP dizendo o que foi recebido e o que é aceito
  • Cache TTL de 10 minutos por requisição idêntica, com chave inequívoca (JSON ordenado de URL e parâmetros)
  • Retry automático em falhas de rede e em 429/502/503/504
  • Mudança de formato numa API upstream (campo renomeado, tipo trocado) vira erro da tool (isError: true) com a fonte e o campo, ex.: Resposta inesperada de BCB/PTAX: campo 'cotacaoCompra' ausente
  • Saídas formatadas como texto legível pelo modelo; bcb_serie, bcb_cambio e camara_deputados também devolvem structuredContent com outputSchema (datas ISO, valores numéricos), mantendo o texto como fallback
  • User-Agent com a versão instalada do pacote

Roadmap

  • v0.2 — INMET (estações + observacional com token) e Boletim Focus
  • v0.3 — Agenda da Câmara, transporte streamable-http e testes de integração agendados no CI
  • v0.4 — Tramitações, atalhos nomeados no SGS, imagem Docker
  • v0.5 — Publicação no PyPI (uvx mcp-dados-br), MCP Registry e Smithery
  • v0.6 — Validação de entrada, autenticação bearer no modo HTTP e saída estruturada
  • DOU: busca no Diário Oficial da União (aguardando API pública estável)
  • TSE: resultados eleitorais

Licença

MIT