Purpose
agrobr-mcp is an MCP (Model Context Protocol) server that gives LLMs the ability to fetch real-time Brazilian agricultural data. It is itself a thin wrapper; all data processing logic is implemented in the agrobr library, with data coming from about 10 public sources, including CEPEA, CONAB, IBGE, B3, INPE, and others, covering topics such as prices, crop estimates, climate, deforestation, and fires.
Main capabilities
The server provides 14 tools out of the box, divided by topic as follows:
- Prices and markets: preco_diario (CEPEA/ESALQ agricultural spot prices), futuros_b3 (daily settlement prices for B3 agricultural futures, by default returning the most recent published trading day), exportacao (monthly agricultural exports aggregated by product and source state, data source Comex Stat, with ABIOVE as a fallback).
- Production and crops: estimativa_safra (crop estimates by state, by default returning the most recent season with data), producao_anual (IBGE PAM historical production, by state), balanco (CONAB supply and demand balance sheet), progresso_safra (CONAB weekly planting and harvesting progress), serie_historica_safra (historical series by season: area, production, and yield, by default the most recent 10 years), rebanho (IBGE PPM livestock inventory and animal products by state, by default the most recently published year).
- Climate and environment: clima (NASA POWER climate data by state), desmatamento (INPE deforestation polygons: PRODES uses the year before the current year, and if empty, goes back one more year; and DETER alerts for the most recent 15 days, filterable by biome, with optional year and state filters, up to 2,000 records), queimadas (INPE daily hotspots by municipality and biome, reference satellites).
- Auxiliary tools: listar_produtos (lists the valid products supported by each tool), health_check (data source status).
Usage
Version 0.2.0 requires agrobr >=2.0.0,<3 and MCP Python SDK >=2.0.0,<3. In MCP clients, configuration is done via: Settings > MCP Servers > Add, and adding it to claude_desktop_config.json.
If it fails due to -m argument parsing, you can create a wrapper script:
- Linux/macOS: echo 'python -m agrobr_mcp' > run.sh && chmod +x run.sh && claude mcp add agrobr ./run.sh
- Windows: echo python -m agrobr_mcp > run.bat && claude mcp add agrobr run.bat
It can be connected to MCP clients such as Claude Desktop, Cursor, or Claude Code. Example queries can be found in the repository documentation. The MCP name identifier is io.github.bruno-portfolio/agrobr.
Use cases
Suitable for scenarios involving querying Brazilian agricultural data in LLM conversations or agent workflows, such as checking crop estimates for a state, tracking planting and harvesting progress, querying agricultural spot and futures prices, obtaining export summaries, and learning about deforestation and fire hotspots.
Limitations
- The project is positioned as a wrapper layer; all data logic is in the agrobr library.
- desmatamento returns up to 2,000 records; PRODES uses data from the year before the current year, and if empty, goes back one more year; DETER covers only the most recent 15 days.
- The default time ranges and data sources for each tool are already limited in the descriptions; the specific available products must be queried via listar_produtos.
- Other features, pricing, or platform support not described in the materials are not provided at this time.