agrobr-mcp gives LLMs real-time access to Brazilian agricultural data from 10+ public sources (CEPEA/ESALQ, CONAB, IBGE, NASA POWER, INPE, B3), covering prices, crop production, climate, and deforestation.
preco_diario— Fetch daily spot prices for 15 commodities (soybeans, corn, cattle, coffee, cotton, etc.) from CEPEA/ESALQ, up to 60 recent daysfuturos_b3— Retrieve daily settlement prices for agricultural futures contracts (corn, cattle, coffee, ethanol, soybeans) traded on the B3 exchangeestimativa_safra— Get current crop season estimates (area, production, yield) by state for 7 crops including soybeans, corn, rice, and coffee (CONAB/IBGE)producao_anual— Access historical annual crop production by state for 12 crops (soybeans, corn, sugarcane, cassava, oranges, etc.) from IBGE PAMbalanco— View supply and demand balance sheets (stocks, consumption, exports) for major crops from CONABprogresso_safra— Track weekly planting and harvesting progress by state for 6 crops from CONABclima— Retrieve climate data (temperature, precipitation, radiation, humidity, wind) for any Brazilian state, aggregated daily or monthly, from NASA POWERdesmatamento— Query annual deforestation rates (PRODES) or real-time alerts (DETER) by biome (Amazon, Cerrado, Atlantic Forest, etc.) from INPElistar_produtos— Discover valid products and parameters for any tool before making a callhealth_check— Verify the status of all underlying data source APIs to diagnose errors or outages
Accesses NASA POWER data to provide climate information by state, including temperature, precipitation, and radiation metrics.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agrobr-mcpShow me the current soybean prices and harvest progress in Brazil"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agrobr-mcp
MCP server that gives LLMs access to real-time Brazilian agricultural data — prices, crop estimates, climate, deforestation and more from 10 public sources.
Install
pip install agrobr-mcpSetup
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_mcpIf 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
Docker
docker build -t agrobr-mcp .
docker run --rm -i agrobr-mcpAdd to claude_desktop_config.json:
{
"mcpServers": {
"agrobr": {
"command": "docker",
"args": ["run", "--rm", "-i", "agrobr-mcp"]
}
}
}Tools
10 tools available out of the box:
Prices & Market
Tool | Description |
| Daily spot prices for agricultural commodities (CEPEA/ESALQ) |
| Daily settlement prices for agricultural futures on B3 exchange |
Production & Crop
Tool | Description |
| Current crop season estimate by state (CONAB/IBGE) |
| Historical annual production by state (IBGE PAM) |
| Supply and demand balance — stock, consumption, exports (CONAB) |
| Weekly planting and harvesting progress by state (CONAB) |
Climate & Environment
Tool | Description |
| Climate data by state — temperature, precipitation, radiation (NASA POWER) |
| Deforestation rates and real-time alerts by biome (INPE) |
Meta
Tool | Description |
| List valid products for each tool |
| 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-mcpConfiguração
Adicione ao seu client MCP (Claude Desktop, Cursor ou Claude Code) conforme as instruções acima.
Docker
docker build -t agrobr-mcp .
docker run --rm -i agrobr-mcp10 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