AgroBR MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add agrobr-mcp -- docker run --rm -i agrobr-mcp
README.md

MCP server that gives LLMs access to real-time Brazilian agricultural data

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 from agrobr.

Demo


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 -m flag parsing, 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

Docker

docker build -t agrobr-mcp .
docker run --rm -i agrobr-mcp

Add 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
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.

Docker

docker build -t agrobr-mcp .
docker run --rm -i agrobr-mcp

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

Tools (10)

preco_diarioDaily spot prices for agricultural commodities (CEPEA/ESALQ)
futuros_b3Daily settlement prices for agricultural futures on B3 exchange
estimativa_safraCurrent crop season estimate by state (CONAB/IBGE)
producao_anualHistorical annual production by state (IBGE PAM)
balancoSupply and demand balance — stock, consumption, exports (CONAB)
progresso_safraWeekly planting and harvesting progress by state (CONAB)
climaClimate data by state — temperature, precipitation, radiation (NASA POWER)
desmatamentoDeforestation rates and real-time alerts by biome (INPE)
listar_produtosList valid products for each tool
health_checkCheck status of all data sources

Configuration

claude_desktop_config.json
{"mcpServers": {"agrobr": {"command": "python", "args": ["-m", "agrobr_mcp"]}}}

Try it

What is the daily spot price for soy over the last 5 days?
Provide the current crop season estimate for corn in Mato Grosso.
What is the current planting progress for soybeans in Brazil?
Show me the latest deforestation alerts for the Amazon biome.
List all agricultural products currently available for analysis.

Frequently Asked Questions

What are the key features of AgroBR?

Real-time access to Brazilian agricultural commodity prices. Integration with 19 public data sources including CEPEA, CONAB, and IBGE. Climate data retrieval including temperature and precipitation via NASA POWER. Monitoring of deforestation rates and alerts by biome from INPE. Historical and current crop production and supply/demand balance analysis.

What can I use AgroBR for?

Market analysts tracking daily commodity price fluctuations in Brazil. Agricultural researchers monitoring crop progress and seasonal estimates. Environmental consultants tracking deforestation rates in specific biomes. Supply chain managers analyzing supply and demand balances for agricultural products.

How do I install AgroBR?

Install AgroBR by running: pip install agrobr-mcp

What MCP clients work with AgroBR?

AgroBR works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep AgroBR docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare