{
  "markdown": "# agrobr-mcp\n\n[![PyPI](https://img.shields.io/pypi/v/agrobr-mcp)](https://pypi.org/project/agrobr-mcp/)\n[![Tests](https://github.com/bruno-portfolio/agrobr-mcp/actions/workflows/tests.yml/badge.svg)](https://github.com/bruno-portfolio/agrobr-mcp/actions/workflows/tests.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n\n**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.\n\n![Demo](https://github.com/user-attachments/assets/76b6c45d-055e-4b36-aa10-02ae3f917aa8)\n\n---\n\n## Install\n\n```bash\npip install agrobr-mcp\n```\n\n## Setup\n\n### Claude Desktop\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"agrobr\": {\n      \"command\": \"python\",\n      \"args\": [\"-m\", \"agrobr_mcp\"]\n    }\n  }\n}\n```\n\n### Cursor\n\nSettings > MCP Servers > Add:\n\n```json\n{\n  \"agrobr\": {\n    \"command\": \"python\",\n    \"args\": [\"-m\", \"agrobr_mcp\"]\n  }\n}\n```\n\n### Claude Code\n\n```bash\nclaude mcp add agrobr python -- -m agrobr_mcp\n```\n\n> If the above fails due to `-m` flag parsing, create a wrapper script:\n>\n> **Linux/macOS:** `echo 'python -m agrobr_mcp' > run.sh && chmod +x run.sh && claude mcp add agrobr ./run.sh`\n>\n> **Windows:** `echo python -m agrobr_mcp > run.bat && claude mcp add agrobr run.bat`\n\n### Docker\n\n```bash\ndocker build -t agrobr-mcp .\ndocker run --rm -i agrobr-mcp\n```\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"agrobr\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"agrobr-mcp\"]\n    }\n  }\n}\n```\n\n---\n\n## Tools\n\n10 tools available out of the box:\n\n### Prices & Market\n\n| Tool | Description |\n|------|-------------|\n| `preco_diario` | Daily spot prices for agricultural commodities (CEPEA/ESALQ) |\n| `futuros_b3` | Daily settlement prices for agricultural futures on B3 exchange |\n\n### Production & Crop\n\n| Tool | Description |\n|------|-------------|\n| `estimativa_safra` | Current crop season estimate by state (CONAB/IBGE) |\n| `producao_anual` | Historical annual production by state (IBGE PAM) |\n| `balanco` | Supply and demand balance — stock, consumption, exports (CONAB) |\n| `progresso_safra` | Weekly planting and harvesting progress by state (CONAB) |\n\n### Climate & Environment\n\n| Tool | Description |\n|------|-------------|\n| `clima` | Climate data by state — temperature, precipitation, radiation (NASA POWER) |\n| `desmatamento` | Deforestation rates and real-time alerts by biome (INPE) |\n\n### Meta\n\n| Tool | Description |\n|------|-------------|\n| `listar_produtos` | List valid products for each tool |\n| `health_check` | Check status of all data sources |\n\n---\n\n## Example queries\n\n```\n\"Qual o preço da soja nos últimos 5 dias?\"\n\"Estimativa de safra de milho por estado\"\n\"Progresso da colheita de soja\"\n\"Dados de desmatamento na Amazônia\"\n\"Quais produtos estão disponíveis?\"\n```\n\n---\n\n## How it works\n\n```\nUser (natural language)\n    │\nMCP Client (Claude Desktop / Cursor / Claude Code)\n    │\nagrobr-mcp (this server — thin layer, text formatting)\n    │\nagrobr library (data collection, parsing, caching)\n    │\n19 public APIs (CEPEA, CONAB, IBGE, INPE, B3, NASA POWER…)\n```\n\nagrobr-mcp is a thin wrapper. All data logic lives in the [agrobr](https://github.com/bruno-portfolio/agrobr) library.\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/bruno-portfolio/agrobr-mcp.git\ncd agrobr-mcp\npip install -e \".[dev]\"\n\n# Run tests\npytest tests/ -m \"not integration\" -v\n\n# Lint\nruff check src/ tests/\nruff format src/ tests/\n```\n\n---\n\n## License\n\nMIT\n\n---\n\n## PT-BR\n\n### O que é o agrobr-mcp?\n\nServidor 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.\n\n### Instalação\n\n```bash\npip install agrobr-mcp\n```\n\n### Configuração\n\nAdicione ao seu client MCP (Claude Desktop, Cursor ou Claude Code) conforme as instruções acima.\n\n### Docker\n\n```bash\ndocker build -t agrobr-mcp .\ndocker run --rm -i agrobr-mcp\n```\n\n### 10 tools disponíveis\n\n- **preco_diario** — Preço spot de commodities agrícolas (CEPEA/ESALQ)\n- **futuros_b3** — Ajustes diários de futuros agrícolas na B3\n- **estimativa_safra** — Estimativa da safra corrente por UF (CONAB/IBGE)\n- **producao_anual** — Produção histórica por UF (IBGE PAM)\n- **balanco** — Balanço de oferta e demanda (CONAB)\n- **progresso_safra** — Progresso semanal de plantio e colheita (CONAB)\n- **clima** — Dados climáticos por UF (NASA POWER)\n- **desmatamento** — Taxa de desmatamento e alertas por bioma (INPE)\n- **listar_produtos** — Lista produtos válidos por tool\n- **health_check** — Status das fontes de dados\n\n### Links\n\n- [agrobr library](https://github.com/bruno-portfolio/agrobr) — biblioteca de dados agrícolas\n- [MCP Protocol](https://modelcontextprotocol.io) — Model Context Protocol\n\nmcp-name: io.github.bruno-portfolio/agrobr\n",
  "bytes": 5061,
  "sha": "4b365338a9170cc7934570189827ae1f62794c6f8ec6c50faf34bd4956aef63f",
  "repo_slug": "bruno-portfolio/agrobr-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_bruno_portfolio_agrobr_94aad9eb/readme"
}