MCP Brasil

Connect MCP-compatible AI clients to Brazilian government and public-institution data.

Stars
★ 1.9k
Last updated
3mo ago v0.14.0
FARS reviewed
Nov 08, 2026
License
MIT
Primary language
Python

At a glance

How it runs
MCP serverSelf-hosted serviceCLI
Works with
Universal · cross-platformClaude Code · Claude.ai
Cost
Free, no paid service needed
Setup effort
Medium · a few setup steps
You'll need
Pythonuv or pipDuckDB for optional local datasetsShell / CLINetwork accessLocal filesystemMCP Server
Typical use
An economic analyst can retrieve Banco Central Selic, IPCA, exchange-rate, and GDP time series for comparative analysis.
Not a fit if
  • Teams that need fully offline operation with no external API calls
  • Users who require official government endorsement or guaranteed data accuracy
  • Teams unwilling to self-host and maintain their own server
Maintenance
Commits in the last 6 monthslast commit 2026-08-19latest release v0.14.0 (2026-04-24)+1.1 ★/day over 7 days

What does this agent do, and when should you use it?

MCP Brasil is a self-hosted Python and FastMCP server spanning 15 subject areas, including economics, legislation, courts, elections, health, education, and public safety. The repository reports 70 features, 533 tools, 131 resources, and 102 prompts, with BM25 discovery used to surface contextually relevant tools. Most features call external APIs through asynchronous httpx clients, Pydantic v2 models, rate limiting, and retry backoff; selected large datasets are instead downloaded and queried through an embedded local DuckDB cache. Root-level meta-tools support feature listing, tool recommendations, multi-API query planning, parallel batch execution, and dataset discovery. It is a strong fit for teams that need broad Brazilian public-data access through MCP and can operate their own service, but it is unofficial and results intended for consequential use must be verified against the originating institution.

The mcp_brasil.server module auto-registers feature packages under data/, datasets/, and agentes/. REST features read Brazilian government and related public APIs with asynchronous HTTP clients, validate or structure responses with Pydantic, and expose the operations as MCP tools, resources, and prompts. recomendar_tools uses BM25 discovery to select relevant operations from the 533-tool catalog; planejar_consulta creates execution plans spanning multiple APIs; and executar_lote runs multiple queries in parallel within one call. Datasets enabled through MCP_BRASIL_DATASETS are downloaded from CSV or ZIP sources, ingested into a local DuckDB cache, and exposed through predefined query tools. Documented dataset examples include TSE candidates and votes, ANP fuel prices, INEP education records, and ANAC aviation data. The server runs over stdio for Claude Desktop, Claude Code, VS Code, and Cursor, or over HTTP at an /mcp endpoint.

  1. An economic analyst can retrieve Banco Central Selic, IPCA, exchange-rate, and GDP time series for comparative analysis.
  2. An investigative journalist can examine federal transparency records, contracts, suppliers, and state audit-court data, while verifying publishable findings with the official source.
  3. A legislative researcher can combine Câmara and Senado data on legislators, bills, votes, committees, and expenses.
  4. An election-research team can enable local TSE datasets to analyze candidates, declared assets, municipal voting, social links, and election-fund allocations from documented election years.
  5. A public-policy unit can cross-reference IBGE geography and population data with health, education, crime, or subnational fiscal indicators.
  6. An engineer adding another Brazilian API can follow the package-by-feature structure and validate the contribution with make ci.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install mcp-brasil
  • uv add mcp-brasil
  • uvx --from mcp-brasil python -m mcp_brasil.server
Environment variables
TRANSPARENCIA_API_KEY DATAJUD_API_KEY META_ACCESS_TOKEN
Config files
claude_desktop_config.json .vscode/mcp.json

How do you install or deploy this agent?

Python is required. Install with pip:

pip install mcp-brasil

Or with uv:

uv add mcp-brasil

A documented direct launch through uvx is:

uvx --from mcp-brasil python -m mcp_brasil.server

Optional credentials include TRANSPARENCIA_API_KEY, DATAJUD_API_KEY, and META_ACCESS_TOKEN; some brapi.dev operations can also use a free token. The README gives conflicting counts for keyless APIs—66 in one section, 62 in another, and a separate reference to 36 remaining APIs—so adopters should verify credential requirements for the exact features they intend to use.

How do you use this agent?

For Claude Desktop, add an mcp-brasil entry under mcpServers in claude_desktop_config.json, set command to uvx, and use args equal to ["--from", "mcp-brasil", "python", "-m", "mcp_brasil.server"]. Add optional API keys under env.

For Claude Code, run:

claude mcp add mcp-brasil -- uvx --from mcp-brasil python -m mcp_brasil.server

For VS Code or Cursor, create .vscode/mcp.json at the project root and configure the same uvx command and arguments.

For an HTTP client, run:

fastmcp run mcp_brasil.server:mcp --transport http --port 8000

The endpoint is then available at http://localhost:8000/mcp. After connecting, issue a natural-language request such as comparing Selic and IPCA over the last 12 months. To use large local datasets, first set a value such as MCP_BRASIL_DATASETS=tse_candidatos,tse_bens,tse_votacao; the initial download and ingestion can take minutes.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

What are this agent's strengths and limitations?

Pros
  • A single MCP server covers 70 documented features across 15 domains and exposes 533 tools, avoiding separate integrations for many Brazilian public APIs.
  • planejar_consulta and executar_lote provide concrete support for cross-source planning and parallel batch queries.
  • BM25-based discovery narrows the large tool catalog to operations relevant to the current context.
  • Optional DuckDB-backed datasets support repeated local analysis of large TSE, INEP, ANP, ANAC, and other published datasets.
  • Documented stdio and HTTP modes, plus setup instructions for several MCP clients, reduce dependence on a single model vendor.
Limitations
  • The service depends on numerous third-party government and public APIs whose documentation, parameter coverage, and responses may be inconsistent.
  • Optional local datasets range from roughly 100 MB to 1.6 GB and impose download time, disk usage, and initial ingestion costs.
  • MIT applies only to repository code; every data source may have different licensing terms, and server use is governed by an Acceptable Use Policy.
  • Health, judicial, and election data introduce legal and privacy obligations, with some personally identifiable datasets gated by MCP_BRASIL_LGPD_ALLOW_PII.
  • The README contains inconsistent counts for keyless APIs and for the feature/tool catalog in different sections, so production adopters should validate the deployed inventory.

How does this agent compare with similar options?

Compared with building a separate client for every Brazilian public-data API, MCP Brasil supplies one MCP interface with automatic feature registration, cross-source planning, and batch execution. Its REST passthrough features favor lightweight online access, while the optional DuckDB path trades local storage and initial ingestion time for repeatable queries over large historical datasets.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
MCP Brasil This agent 55 · Major gaps MCP serverFree ★ 1.9k 3mo ago Python Claude Code · Claude.ai
OpenAccountants 76 · Good MCP serverFreemium ★ 530 today HTML ChatGPT · Claude.ai
World Monitor 73 · Some gaps Web appFree + model costs ★ 91k today TypeScript —
Flint Chart Language 69 · Some gaps Library / SDKFree ★ 4.6k 15d ago TypeScript Claude.ai

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
55/ 100 5-point scale 2.8 / 5
Trust 14/29
Reliability 6/14
Adaptability 10/18
Convention 11/18
Effectiveness 10/13
Verifiability 4/8
Why each dimension lost points
Trust14 / 29 · 2.4/5

The README identifies the project as independent, distinguishes code licensing from data-source terms, and points users to SOURCES.md, ACCEPTABLE_USE.md, and NOTICE. It says API keys are optional and describes default PII masking; server.py shows logs recording tool names and elapsed time. The shown code does not establish least-privilege permissions for each tool or require confirmation before calls, and no per-item confirmation flow is shown for batch execution. Dataset downloads and external API calls have external effects. Dependencies use open-ended minimum versions, with no security audit evidence in the packet, so these areas lose points. The deployment workflow records the previous revision and restores it after a failed health check, supporting the rollback score.

Reliability6 / 14 · 2.1/5

The docs describe HTTP retries, timeouts, backoff, and cache refresh modes, providing some ordinary failure handling. However, README, Quick Start, and configuration docs disagree on API/feature/tool counts and API-key requirements (including 70/69 features and 533/525/435/205 tools, as well as differing Anthropic key guidance), reducing self-consistency. The shown server.py excerpt does not establish how API errors are surfaced clearly to users.

Adaptability10 / 18 · 2.8/5

The README targets MCP client developers, gives examples across economic, legislative, and judicial use cases, and supports stdio, HTTP, several clients, and opt-in local datasets. The docs identify code mode as experimental, say datasets require explicit activation, and warn that AI may misinterpret results. However, tool selection and trigger conditions rely largely on natural-language discovery; the examples and search settings do not fully define capability boundaries.

Convention11 / 18 · 3.1/5

The project separates features, shared code, and datasets, and provides installation, configuration, deployment, and development docs. Package metadata sets a version, and pyproject configures semantic releases and a changelog. README and Quick Start/configuration docs contain conflicting or stale counts and key requirements; FAQ and troubleshooting material are limited. License information clearly distinguishes MIT code licensing from data-source terms. Maintenance responsibility is described only as community issues and pull requests, without a named owner or support path.

Effectiveness10 / 13 · 3.8/5

The server aggregates many public data sources and provides search, planning, batch queries, and local DuckDB datasets, which can reduce the work of querying APIs separately. Tools return data for client use and the docs include sample questions. Initial dataset downloads can reach about 1.6 GB and take time, while the large tool set and changing external APIs add setup and maintenance costs, so the cost-benefit case is not uniformly strong.

Verifiability4 / 8 · 2.5/5

The README links data-source, configuration, and disclaimer material; server.py directly supports claims about auto-registration, the health endpoint, and request logging. Conflicting counts and key requirements across README and configuration docs weaken cross-source corroboration. The disclaimer separates API-returned data from model interpretation and advises checking official sources for consequential use; some feature claims remain project assertions not corroborated by the supplied code or other materials.

Risks and how to mitigate them
  • Tool, feature, and API counts and key requirements conflict across the docs; verify the feature catalog and configuration for the intended revision before relying on them.
  • The README says large datasets may contain sensitive information and documents a PII allow-list setting. Review ACCEPTABLE_USE.md and SOURCES.md, and verify official sources before using datasets in sensitive, electoral, judicial, medical, or decision-making contexts.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 2efb258370b1
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/mcp-brasil.svg)](https://followagents.com/en/agents/mcp-brasil)
<a href="https://followagents.com/en/agents/mcp-brasil"><img src="https://followagents.com/badge/mcp-brasil.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.14.0
    Release notes excerpt
    [0.14.0] - 2026-04-24 Bug Fixes - spu_siapa: Accent-insensitive filters + real categorical values + valores_distintos tool Documentation - datasets: Add SIAPA smoke-test report (20 real queries) - Refresh counters + add datasets guide Features - datasets: ADR-004 local DuckDB cache infrastructure + spu_siapa - tse_candidatos, tse_bens: Electoral datasets via DuckDB + cross-DB joins - tse: Multi-year TSE datasets (2014-2024) + redes sociais + FEFC <!-- generated by git-cliff -->
    View on GitHub ↗
  2. v0.13.0
    Release notes excerpt
    [0.13.0] - 2026-04-24 Documentation - Add tce_pa to README, update counters to 42 features / 367 tools - spu: Add live smoke-test report for new SPU tools Features - tce_pa: Add Diário Oficial publications feature - tce_pa: Add sessões plenárias, jurisprudência and pesquisa integrada - spu_geo: Add GeoPortal SPU integration via WMS GetFeatureInfo - spu_imoveis: Add Raio-X APF patrimônio-da-união integration - pncp: Add alienacoes_imoveis_spu prompt for SPU leilões <!-- generated by git-cliff -->
    View on GitHub ↗
  3. v0.12.1
    Release notes excerpt
    [0.12.1] - 2026-04-14 Bug Fixes - denasus: Update scraper for new gov.br page structure <!-- generated by git-cliff -->
    View on GitHub ↗

FAQ

Are API keys mandatory?
Not for every source. Portal da Transparência, DataJud/CNJ, Meta Ad Library, and some brapi.dev capabilities use optional free credentials. Because the README gives inconsistent totals for keyless sources, confirm the requirements of each feature you plan to deploy.
Is this an official Brazilian government service?
No. The repository explicitly describes the project as independent and not affiliated with or endorsed by Brazilian government bodies, OpenAI, Anthropic, or GitHub.
Does it download the large datasets by default?
No. Local datasets are opt-in through MCP_BRASIL_DATASETS. The first activation downloads and ingests the selected files into DuckDB and may take several minutes.
Can its answers be used directly for journalism, legal matters, or medical decisions?
They should not be used without source verification. The project warns that an AI model consuming server responses may hallucinate, distort, or misinterpret them and directs users to verify consequential findings with the official source.
Does the MIT license cover the returned data?
No. MIT covers the repository code only. Data licenses and attribution requirements vary by source, and operation is also subject to the repository's Acceptable Use Policy and NOTICE.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts