mcp-brasil-server

Connects AI agents to 70+ Brazilian public APIs via an MCP server with 533 tools.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill mcp-brasil-server-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcp-brasil-server
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/mcp-brasil-server
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill mcp-brasil-server-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mcp-brasil, fastmcp, duckdb, httpx, pydantic.

What problem does it solve? Accessing Brazilian government, economic, judicial, electoral, and health data requires integrating dozens of fragmented public APIs with different formats and authentication schemes. This Skill consolidates 70+ Brazilian public data sources into a single MCP server so AI agents can query them through one unified interface. ## Core Features & Use Cases - 533 Tools Across 70 Data Sources: Query economy (Banco Central, IBGE), legislation (Câmara, Senado), transparency (Portal da Transparência, TCU), judiciary (DataJud), elections (TSE), environment (INPE, IBAMA), health (DataSUS, ANVISA), and education (INEP) data. - Smart Tool Discovery and Planning: BM25 search filters 533 tools down to relevant ones per query, and the planejar_consulta tool builds multi-API execution plans for cross-referencing data. - Local DuckDB Datasets: Cache large datasets like TSE candidate records, ANP fuel prices, and INEP school census locally for millisecond SQL queries. - Use Case: A journalist investigating a deputy can combine camara expense tools, transparencia contract queries, and TSE asset declarations in one conversation to cross-reference spending, voting records, and declared wealth. ## Quick Start Install the mcp-brasil package with pip or uv, then add the provided mcp-brasil server configuration to your Claude Desktop or MCP client config and ask the agent to query Brazilian economic indicators such as the Selic rate time series.

Frequently Asked Questions about mcp-brasil-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect an AI agent to Brazilian government APIs?▼

Install the mcp-brasil package with pip or uv, then register it as an MCP server in Claude Desktop, VS Code, Cursor, or Claude Code using the uvx command shown in the configuration. The agent then gains access to 533 tools across 70+ Brazilian public data sources.

How to query Brazilian economic data like Selic and IPCA with MCP?▼

Use the bacen_sgs_serie tool with the appropriate series code, such as 432 for Selic or 433 for IPCA, plus start and end dates. The bcb_olinda_ptax tool retrieves official exchange rates for a given date and currency.

Does mcp-brasil require API keys to work?▼

Most features work without authentication. Only four features need free API keys: transparencia, datajud, anuncios_eleitorais, and spu_geo, configured via the TRANSPARENCIA_API_KEY, DATAJUD_API_KEY, and META_ACCESS_TOKEN environment variables.

Can I query TSE electoral data with SQL?▼

Yes, enable datasets via the MCP_BRASIL_DATASETS environment variable, such as tse_candidatos or tse_votacao. Data is downloaded once into a local DuckDB cache, after which SQL queries through tools like tse_candidatos_query run in milliseconds.

Why does the first dataset query take so long in mcp-brasil?▼

The first query triggers a download and ingestion of the dataset, which can be 100MB to 1.6GB and takes minutes. Subsequent queries run against the local DuckDB cache and complete in milliseconds.

What are the limitations of mcp-brasil for commercial use?▼

The code is MIT licensed, but each underlying data source has its own license and terms documented in SOURCES.md. Users must read ACCEPTABLE_USE.md before commercial or journalistic use, and the project is independent, not affiliated with the Brazilian government.