Skip to main content
Glama
lucianoon

mcp-brasil

by lucianoon

mcp-brasil

ブラジルの公開データをAIアシスタント向けツールとして公開するMCP(Model Context Protocol)サーバーです。Claude Desktop、Claude Code、Cursor、その他あらゆるMCPクライアントに対応しています。

利用可能なツール

ソース

Tools

説明

IBGE/SIDRA

ibge_populacaoibge_pibibge_municipiosibge_sidra

人口、GDP、自治体検索、および任意のSIDRA集計への汎用クエリ

中央銀行

bcb_seriebcb_cambiobcb_moedasbcb_focus

SGS時系列(Selic、IPCAなど)、PTAX為替レート、通貨リスト、Focusレポートの期待値

INMET

inmet_estacoesinmet_dados

気象観測所リストと観測された時間別データ(観測データにはトークンが必要)

下院

camara_deputadoscamara_detalhes_deputadocamara_proposicoescamara_votacoes_proposicao

連邦議員、立法提案、および投票

すべてのソースは公式のオープンAPIです。APIキーは不要ですが、 INMETの時間別データのみ例外です(下記参照)。

Related MCP server: ibge-data-mcp

インストール

要件: uv(またはpipを使用したPython 3.12+)。

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

設定

Claude Desktop / Cursor

設定ファイル(claude_desktop_config.json または 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

オプションのINMETトークン

観測所の一覧(inmet_estacoes)は公開されています。一方、観測された時間別 データinmet_dados)にはINMETが提供するトークンが必要です。portal.inmet.gov.brで申請し、 MCPクライアントで環境変数を設定してください:

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

トークンがなくても、他の13のツールは通常どおり動作します。

使用例

設定後、アシスタントに直接質問できます:

  • 「過去6ヶ月のIPCAはいくらですか?」

  • 「市場は今後の会合でSelicに何を期待していますか?」(Focusレポート)

  • 「X党のミナスジェライス州連邦議員は誰ですか?」

  • 「2022年のサンパウロの人口は?GDPは?」

  • 「ここ数日のPTAXドルはどうですか?」

  • 「2025年のメンタルヘルスに関する法案を検索してください」

  • 「アマゾナス州にはINMETの自動観測所がいくつありますか?」

開発

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

アーキテクチャ

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トランスポート(MCPデスクトップ標準)

  • 同一リクエストに対する10分間のTTLキャッシュ

  • ネットワーク障害時の自動リトライ

  • モデルが読み取り可能なテキストとしてフォーマットされた出力

ロードマップ

  • v0.2 — INMET(観測所 + トークン付き観測データ)およびFocusレポート

  • DOU: 官報(Diário Oficial da União)の検索(安定した公開APIを待機中)

  • TSE: 選挙結果

  • PyPIへの公開(uvx mcp-brasil

  • オプションのstreamable-httpトランスポート

ライセンス

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