mcp-brasil
mcp-brasil
一个 MCP(模型上下文协议) 服务器,将巴西公共数据作为工具提供给 AI 助手: Claude Desktop、Claude Code、Cursor 以及任何 MCP 客户端。
可用工具
来源 | 工具 | 描述 |
IBGE/SIDRA |
| 人口、GDP、城市搜索以及任意 SIDRA 聚合的通用查询 |
Banco Central |
| SGS 时间序列(Selic、IPCA...)、PTAX 汇率、货币列表以及 Focus 公报预期 |
INMET |
| 气象站列表和每小时观测数据(观测数据需要令牌) |
Câmara dos Deputados |
| 议员、立法提案和投票 |
所有来源均为官方开放 API——无需 API 密钥,但 INMET 的每小时数据除外(见下文)。
Related MCP server: ibge-data-mcp
安装
要求:uv(或 Python 3.12+ 及 pip)。
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 v2stdio 传输(MCP 桌面标准)
相同请求的 10 分钟 TTL 缓存
网络故障时自动重试
输出格式化为模型可读的文本
路线图
v0.2 — INMET(站点 + 带令牌的观测数据)和 Focus 公报
DOU:在联邦官方公报中搜索(等待稳定的公共 API)
TSE:选举结果
在 PyPI 上发布(
uvx mcp-brasil)可选的 streamable-http 传输
许可证
MIT
Maintenance
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
- AlicenseNot gradedqualityNot gradedmaintenanceConnects 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.
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to access Brazilian IBGE statistical data (population, economy, agriculture) via natural language, with tools for querying aggregated data and metadata.
- AlicenseAqualityDmaintenanceEnables AI agents to access Brazilian statistical, geographic, and economic data in real-time via IBGE public APIs.3219MIT
- AlicenseAqualityCmaintenanceExposes 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.41Apache 2.0
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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