MCP Brasil
An MCP server that connects AI agents to over 200 tools across 27 Brazilian public APIs, covering economic, legislative, transparency, and judicial data. It enables users to query and cross-reference extensive government datasets from sources like IB
What is MCP Brasil?
MCP Brasil is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that connects ai agents to over 200 tools across 27 brazilian public apis, covering economic, legislative, transparency, and judicial data. it enables users to query and cross-reference ext...
An MCP server that connects AI agents to over 200 tools across 27 Brazilian public APIs, covering economic, legislative, transparency, and judicial data. It enables users to query and cross-reference extensive government datasets from sources like IB
This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An MCP server that connects AI agents to over 200 tools acro
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-brasilConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Brasil
MCP Brasil is a Python-based MCP server that connects AI agents to over 70 Brazilian government and public data sources through more than 533 tools, 131 resources, and 102 prompts. It covers economic data from Banco Central, transparency portals, electoral data from TSE, judicial records from DataJud/CNJ, environmental data from INPE, health databases from DataSUS, and much more — 66 of the APIs require no key at all. Researchers, journalists, and civic technologists can ask questions about Brazilian public data in natural language and get answers drawn directly from authoritative government sources.
Prerequisites
- Python 3.10 or higher with pip or the uv package manager installed
- An MCP-compatible client such as Claude Desktop or Claude Code
- Optional: TRANSPARENCIA_API_KEY for Portal da Transparência spending data
- Optional: DATAJUD_API_KEY for CNJ judicial records
- Optional: META_ACCESS_TOKEN for Meta Ad Library political ads
Install mcp-brasil via pip or uv
Install the package from PyPI. Using uv is recommended for faster installs and automatic virtual environment management.
pip install mcp-brasil
# or with uv:
uv add mcp-brasilObtain optional API keys
Most tools work without any key, but three sources require free registration: Portal da Transparência (transparencia.gov.br), CNJ DataJud, and Meta Ad Library. Register and note the keys for use in the next step.
Add the server to Claude Desktop
Edit your claude_desktop_config.json to add the mcp-brasil server entry. Supply any optional API keys you obtained as environment variables.
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": ["--from", "mcp-brasil", "python", "-m", "mcp_brasil.server"],
"env": {
"TRANSPARENCIA_API_KEY": "your-key",
"DATAJUD_API_KEY": "your-key",
"META_ACCESS_TOKEN": "your-token"
}
}
}
}Add via Claude Code CLI (alternative)
If you use Claude Code instead of Claude Desktop, you can add the server with a single CLI command.
claude mcp add mcp-brasil -- uvx --from mcp-brasil python -m mcp_brasil.serverEnable optional local datasets
For offline DuckDB-powered datasets (SPU real estate, TSE elections 2014-2024, ANP fuel prices, school census), set the MCP_BRASIL_DATASETS variable with a CSV list of dataset names.
export MCP_BRASIL_DATASETS="spu,tse,anp"Verify connection and explore tools
Restart your MCP client. The server exposes a BM25 tool-discovery mode — ask your AI to list available tools or search for a specific topic to explore what is available.
MCP Brasil Examples
Client configuration
Full claude_desktop_config.json entry for mcp-brasil with optional API keys.
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": ["--from", "mcp-brasil", "python", "-m", "mcp_brasil.server"],
"env": {
"TRANSPARENCIA_API_KEY": "your-key",
"DATAJUD_API_KEY": "your-key",
"MCP_BRASIL_DATASETS": "spu,tse",
"MCP_BRASIL_TOOL_SEARCH": "bm25"
}
}
}
}Prompts to try
Natural language prompts that leverage the Brazilian public data tools.
- "What is the current SELIC interest rate from Banco Central?"
- "Show me federal government contracts above R$1 million from the last quarter using Portal da Transparência"
- "How many deforestation alerts were issued by INPE in the Amazon this month?"
- "Look up the electoral campaign finances for candidates in São Paulo in the 2022 elections"
- "Find court cases from STF related to environmental law"Troubleshooting MCP Brasil
Tool returns 403 or authorization errors for Transparência data
Register for a free API key at transparencia.gov.br and set TRANSPARENCIA_API_KEY in the env block of your MCP config. Without it, only endpoints that do not require authentication will work.
Server starts but shows timeout errors on certain tools
Increase the HTTP timeout by setting MCP_BRASIL_HTTP_TIMEOUT=60 (seconds) in the env block. Some government APIs are slow, especially during peak hours.
Local dataset tools are not available after setting MCP_BRASIL_DATASETS
The first run downloads and caches the DuckDB files to ~/.cache/mcp-brasil, which may take several minutes. Check the cache directory and ensure you have enough disk space (several GB for full datasets).
Frequently Asked Questions about MCP Brasil
What is MCP Brasil?
MCP Brasil is a Model Context Protocol (MCP) server that mcp server that connects ai agents to over 200 tools across 27 brazilian public apis, covering economic, legislative, transparency, and judicial data. it enables users to query and cross-reference extensive government datasets from sources like ib It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Brasil?
Follow the installation instructions on the MCP Brasil GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Brasil?
MCP Brasil works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Brasil free to use?
Yes, MCP Brasil is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
MCP Brasil Alternatives — Similar Search & Data Extraction Servers
Looking for alternatives to MCP Brasil? Here are other popular search & data extraction servers you can use with Claude, Cursor, and VS Code.
TrendRadar
★ 58.0kA real-time hotspot monitoring and news aggregation assistant that provides AI-powered analysis of trending topics across multiple platforms via the Model Context Protocol. It enables users to track news and receive automated notifications through va
Scrapling
★ 52.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
PDF Math Translate
★ 33.9k[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero
GPT Researcher
★ 27.2kAn autonomous agent that conducts deep research on any data using any LLM providers
Agent Reach
★ 20.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Xiaohongshu
★ 13.7kMCP for xiaohongshu.com
Browse More Search & Data Extraction MCP Servers
Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Brasil in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Brasil?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.