MCP Brasil

v1.0.0Search & Data Extractionstable

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

ai-agentsapis-publicasbrazilclaudefastmcp
Share:
1,570
Stars
0
Downloads
0
Weekly
0/5

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

Access 200+ Brazilian public APIs
Government data and transparency records
Mcp-Brasil

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-brasil

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-brasil
2

Obtain 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.

3

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"
      }
    }
  }
}
4

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.server
5

Enable 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"
6

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-brasil": { "command": "npx", "args": ["-y", "mcp-brasil"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides