mcp-brasil
An MCP server for Brazil's open data: economy, laws, public procurement, courts, elections, environment and more
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- The server calls external government APIs over the network
- Some keys are secrets and must be kept in environment variables
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/mcp-brasilDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Run in a terminal
claude mcp add --transport stdio mcp-brasil -- uvx --from mcp-brasil python -m mcp_brasil.serverOr add to the file .mcp.json, in the project
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Add to the file ~/.cursor/mcp.json, for all projects
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Run in a terminal
code --add-mcp '{"name":"mcp-brasil","type":"stdio","command":"uvx","args":["--from","mcp-brasil","python","-m","mcp_brasil.server"]}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"mcp-brasil": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the servers key.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
codex mcp add mcp-brasil -- uvx --from mcp-brasil python -m mcp_brasil.serverOr add to the file ~/.codex/config.toml, for all projects
[mcp_servers.mcp-brasil]
command = "uvx"
args = ["--from", "mcp-brasil", "python", "-m", "mcp_brasil.server"]If the file already exists, append the block to the end.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/devin/mcp_config.json, for all projects
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Formerly Windsurf.
Add to the file cline_mcp_settings.json, for all projects
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .roo/mcp.json, in the project
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
A fork of Roo Code, same .roo folders.
Add to the file opencode.json, in the project
{
"mcp": {
"mcp-brasil": {
"type": "local",
"command": [
"uvx",
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the mcp key.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/zed/settings.json, for all projects
{
"context_servers": {
"mcp-brasil": {
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the context_servers key.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .codeassistant/mcp.json, in the project
{
"mcpServers": {
"mcp-brasil": {
"command": "uvx",
"args": [
"--from",
"mcp-brasil",
"python",
"-m",
"mcp_brasil.server"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
TRANSPARENCIA_API_KEYsecret, optionalDATAJUD_API_KEYsecret, optional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Install the server in Claude Code with claude mcp add mcp-brasil -- uvx --from mcp-brasil python -m mcp_brasil.server. Keys are optional; without them the sources that need no registration are available.
Other ways from the author
pip install mcp-brasilYou can also install it via uv with uv add mcp-brasil.
This is third-party code. Review the repository files before installing.
What it does
The server connects an agent to dozens of Brazilian government data sources over the MCP protocol built on FastMCP. From natural language the agent queries central bank time series, IBGE data, bills and votes from the chamber and senate, contracts and spending from the transparency portal, court cases, election data and other topics. It has a query planner that combines several APIs into one plan, batch execution and a tool search that surfaces only relevant tools from a large set. Large datasets are available locally via embedded DuckDB and are enabled separately through environment variables. Many sources need no keys; a few need free ones.
Who it is for. For analysts, journalists and developers who need Brazilian government data inside agent workflows.
Good fit when
- You need Brazilian government data: economy, laws, procurement, courts or elections
- You want to combine several government APIs into one query
- You need local access to large datasets via embedded DuckDB
Not a fit when
- You need data outside Brazil
- You need an official government service; this is an independent project
Example request
Show the Selic rate trend over the last twelve months and compare it with IPCA inflation over the same periodLimitations
The project is independent and not an official Brazilian government service. The MIT license covers only the code; each data source has its own license and usage rules that must be read before commercial or decision-making use. Some APIs work without keys, while a few need free keys after registration. Large datasets are enabled separately through environment variables.
How to disable. Remove the mcp-brasil entry from your client's MCP config; if installed via pip, remove the package with pip uninstall mcp-brasil.
MCP
- Transport
- stdio, http
- Authentication
- API key
| Environment variables | |
|---|---|
| TRANSPARENCIA_API_KEY secret | Free transparency portal key that raises request limits |
| DATAJUD_API_KEY secret | Free DataJud CNJ key for judicial data |
| DADOS_GOV_BR_API_KEY secret | Key for the dados.gov.br portal feature |
| META_ACCESS_TOKEN secret | Meta token for the election ad library feature |
| MCP_BRASIL_API_TOKEN secret | Static token to protect the server in HTTP mode |
Security check
- The server calls external government APIs over the network
- Some keys are secrets and must be kept in environment variables
README in short
The README describes an MCP server that connects agents to Brazilian government data sources across topics from economy and legislation to courts, elections and environment. Installation is via pip or uv, and connection is shown for Claude Desktop, VS Code, Cursor, Claude Code and an HTTP mode via fastmcp. It highlights a query planner, batch execution, a tool search and large datasets with a local DuckDB cache enabled by environment variables. The project is explicitly called independent and unofficial; the MIT license covers only the code, and each source has its own license. A few APIs need free keys.
FAQ
Are API keys required?
For most sources, no. A few APIs, such as the transparency portal and DataJud, use free keys after registration; without them the other sources still work.
Is this an official government service?
No. It is independent; the MIT license covers only the code, and data from each agency has its own license.
Related
166 skills for scientific work: bioinformatics, cheminformatics, clinical data, geospatial analysis and 100+ databases
Google's open-source MCP server for databases: ready tools for Postgres, MySQL, BigQuery, Spanner and more, plus custom tools in tools.yaml
Official Hugging Face skills: Hub operations via the hf CLI, datasets, model training, Spaces, evals and deployment
A visualization language for agents and an MCP server: neat charts from a simple semantic spec