MCP server exposing Brazilian agricultural data via agrobr
Project description
agrobr-mcp
MCP server that gives LLMs access to real-time Brazilian agricultural data — prices, crop estimates, climate, deforestation and more from 19 public sources.
Install
pip install agrobr-mcp
Setup
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"agrobr": {
"command": "python",
"args": ["-m", "agrobr_mcp"]
}
}
}
Cursor
Settings > MCP Servers > Add:
{
"agrobr": {
"command": "python",
"args": ["-m", "agrobr_mcp"]
}
}
Claude Code
claude mcp add agrobr python -- -m agrobr_mcp
If the above fails due to
-mflag parsing, create a wrapper script:Linux/macOS:
echo 'python -m agrobr_mcp' > run.sh && chmod +x run.sh && claude mcp add agrobr ./run.shWindows:
echo python -m agrobr_mcp > run.bat && claude mcp add agrobr run.bat
Tools
10 tools available out of the box:
Prices & Market
| Tool | Description |
|---|---|
preco_diario |
Daily spot prices for agricultural commodities (CEPEA/ESALQ) |
futuros_b3 |
Daily settlement prices for agricultural futures on B3 exchange |
Production & Crop
| Tool | Description |
|---|---|
estimativa_safra |
Current crop season estimate by state (CONAB/IBGE) |
producao_anual |
Historical annual production by state (IBGE PAM) |
balanco |
Supply and demand balance — stock, consumption, exports (CONAB) |
progresso_safra |
Weekly planting and harvesting progress by state (CONAB) |
Climate & Environment
| Tool | Description |
|---|---|
clima |
Climate data by state — temperature, precipitation, radiation (NASA POWER) |
desmatamento |
Deforestation rates and real-time alerts by biome (INPE) |
Meta
| Tool | Description |
|---|---|
listar_produtos |
List valid products for each tool |
health_check |
Check status of all data sources |
Example queries
"Qual o preço da soja nos últimos 5 dias?"
"Estimativa de safra de milho por estado"
"Progresso da colheita de soja"
"Dados de desmatamento na Amazônia"
"Quais produtos estão disponíveis?"
How it works
User (natural language)
│
MCP Client (Claude Desktop / Cursor / Claude Code)
│
agrobr-mcp (this server — thin layer, text formatting)
│
agrobr library (data collection, parsing, caching)
│
19 public APIs (CEPEA, CONAB, IBGE, INPE, B3, NASA POWER…)
agrobr-mcp is a thin wrapper. All data logic lives in the agrobr library.
Development
git clone https://github.com/bruno-portfolio/agrobr-mcp.git
cd agrobr-mcp
pip install -e ".[dev]"
# Run tests
pytest tests/ -m "not integration" -v
# Lint
ruff check src/ tests/
ruff format src/ tests/
License
MIT
PT-BR
O que é o agrobr-mcp?
Servidor MCP que dá acesso a dados agrícolas brasileiros em tempo real para LLMs. Preços, safras, clima, desmatamento e mais — tudo de fontes públicas como CEPEA, CONAB, IBGE, INPE e B3.
Instalação
pip install agrobr-mcp
Configuração
Adicione ao seu client MCP (Claude Desktop, Cursor ou Claude Code) conforme as instruções acima.
10 tools disponíveis
- preco_diario — Preço spot de commodities agrícolas (CEPEA/ESALQ)
- futuros_b3 — Ajustes diários de futuros agrícolas na B3
- estimativa_safra — Estimativa da safra corrente por UF (CONAB/IBGE)
- producao_anual — Produção histórica por UF (IBGE PAM)
- balanco — Balanço de oferta e demanda (CONAB)
- progresso_safra — Progresso semanal de plantio e colheita (CONAB)
- clima — Dados climáticos por UF (NASA POWER)
- desmatamento — Taxa de desmatamento e alertas por bioma (INPE)
- listar_produtos — Lista produtos válidos por tool
- health_check — Status das fontes de dados
Links
- agrobr library — biblioteca de dados agrícolas
- MCP Protocol — Model Context Protocol
mcp-name: io.github.bruno-portfolio/agrobr
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agrobr_mcp-0.1.2.tar.gz.
File metadata
- Download URL: agrobr_mcp-0.1.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb61a9ba2e63452e65dad1c8b780a25e5d4aafb02256f87f70c6db37371cbc12
|
|
| MD5 |
99acc10b5c8456fae1b60e23cafc23be
|
|
| BLAKE2b-256 |
bcd9a594f7d14658511aae572730ab7edba89ecc1cf8522f769209c91c356e58
|
Provenance
The following attestation bundles were made for agrobr_mcp-0.1.2.tar.gz:
Publisher:
publish.yml on bruno-portfolio/agrobr-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agrobr_mcp-0.1.2.tar.gz -
Subject digest:
fb61a9ba2e63452e65dad1c8b780a25e5d4aafb02256f87f70c6db37371cbc12 - Sigstore transparency entry: 954921837
- Sigstore integration time:
-
Permalink:
bruno-portfolio/agrobr-mcp@778224dcda1a66853a8fa157a86cc4b0c8f58e62 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/bruno-portfolio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@778224dcda1a66853a8fa157a86cc4b0c8f58e62 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agrobr_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: agrobr_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b901fe37c081fd926182d12478dd1422cefa26755a115c49c292aab0583538e
|
|
| MD5 |
a87c8f4f21910b5c6b6ebc9588de09c7
|
|
| BLAKE2b-256 |
bf846002bf02678451365475ff97659187ddcb7d1e42943708acde42a437b778
|
Provenance
The following attestation bundles were made for agrobr_mcp-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on bruno-portfolio/agrobr-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agrobr_mcp-0.1.2-py3-none-any.whl -
Subject digest:
0b901fe37c081fd926182d12478dd1422cefa26755a115c49c292aab0583538e - Sigstore transparency entry: 954921843
- Sigstore integration time:
-
Permalink:
bruno-portfolio/agrobr-mcp@778224dcda1a66853a8fa157a86cc4b0c8f58e62 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/bruno-portfolio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@778224dcda1a66853a8fa157a86cc4b0c8f58e62 -
Trigger Event:
release
-
Statement type: