MCP Hub
Back to servers

CropProphEU

EU Crop Intelligence MCP Server — Yield forecasts, weather analysis, and phenology models for 15 countries. AI agent-native, multi-source intelligence (NASA POWER, Eurostat, Open-Meteo).

glama
Updated
May 4, 2026

🌾 crop-mcp

Smithery Python 3.10+ License: MIT GitHub stars

EU Crop Intelligence MCP Server — Yield forecasts, market values & risk analysis for 25 EU countries.

Get AI agents to answer: "How will wheat perform in Baden-Württemberg this year? What's it worth at current market prices?"

pip install git+https://github.com/DasClown/CropProphEU.git
# or try it on Smithery: https://smithery.ai/servers/crop-mcp/CropProphEU

Features (10 MCP Tools)

ToolWhat it does
yield_and_valueNEW — Combined yield + market value (€/ha) with plain-language summary in German or English (auto-detected via language parameter)
europe_yield_forecastPan-European yield forecast (3 crops, 25 countries) with Yield-at-Risk
crop_forecastCurrent season status: temperature, rain, soil moisture, drought index
season_comparisonCompare this season to historical years
region_healthAll crops for one region in a single call
weather_outlook16-day weather forecast
climate_scenarioWhat-if: +2°C, -20% rain?
yield_forecastAnalog-year yield matching (DE-focused)
list_regions120 NUTS2 regions
list_cropsCrop parameters (GDD base, season, etc.)

Quick Start

1. Install

pip install git+https://github.com/DasClown/CropProphEU.git

2. Use as MCP Server

via CLI (stdio):

crop-mcp

or via Python:

from crop_mcp import predict_europe_yield

result = predict_europe_yield("DE11", "DE", crop="wheat", gdd=3050, precip_mm=650)
print(f"Yield: {result['predicted_yield_t_ha']} t/ha")
print(f"Revenue: ~{result['predicted_yield_t_ha'] * 235:.0f} €/ha")

3. Claude Desktop / Cursor / Any MCP Client

Add to your MCP config:

{
  "mcpServers": {
    "crop": {
      "command": "python3",
      "args": ["-m", "crop_mcp.server"]
    }
  }
}

4. HTTP Server (for Remote Access / Smithery)

pip install crop-mcp[http]
crop-mcp --http --port 8080

Connects via SSE: http://your-server:8080/sse

5. Docker

docker build -t crop-mcp .
docker run -p 8080:8080 crop-mcp crop-mcp --http --port 8080

Verified Crops

CropEurostat CodeSamplesCountriesMAE (LOYO)
🌾 WheatC11001,4832511.2%
🌽 Corn (Maize)C15001,6482011.6%
🌿 BarleyC13001,8412511.3%

Rapeseed & Sunflower: Not supported — no Eurostat yield data available. Tools reject these with a clear error (no silent hallucinations).


Example Output

German (default):

Weizen – Region DE11 (DE)
Ertrag: 7.68 t/ha (Spanne 6.67–8.63)
...

English (with language="en"):

Wheat – Region DE11 (DE)
Yield: 7.68 t/ha (range 6.67–8.63)
Temperature: warm (3050°C GDD)
...

All output is available in German (default) or English. Set language="en" when calling yield_and_value for English output. The JSON data is always returned in English field names; the summary field adapts to the requested language.


Data Sources

SourceDataAccess
EurostatCrop yields (apro_cpshr)Free, no key
NASA POWERGDD, precip, solar, soil moistureFree, no rate limits
Open-Meteo16-day forecastFree, no key
SoilGrids v2SOC, pH, N, CEC, textureFree REST API
Yahoo FinanceLive CBOT wheat/corn futures + EUR/USDFree, no key

Model Accuracy

MetricValue
LOYO MAE (Wheat)0.598 t/ha (11.2%)
Forward Validation (Train ≤2022, Test 2023-24)0.794 t/ha (15.0%)
R² (LOYO)0.877
R² (Forward)0.628

What this means: The LOYO metric is optimistic because it trains on data from all years including future ones. The Forward Validation (train on 2000-2022, predict 2023-2024) is the real-world benchmark: ±15%.

The model is most accurate for core EU countries (DE, FR, BE, NL, AT, CZ) where training data is dense, and less accurate for outliers like NL/BE 2024 where unusual weather caused systematic overestimation.


Architecture

crop-mcp/
├── crop_mcp/
│   ├── server.py              # 10 MCP tools
│   ├── europe_model_api.py    # Random Forest (200 trees) + Yield-at-Risk
│   ├── market_prices.py       # Live prices via Yahoo Finance + reference
│   ├── core/regions.py        # 120 NUTS2 regions
│   └── sources/               # Weather, soil, NDVI data fetchers
├── models/                    # .pkl files (download from Releases)
├── data/                      # Training data (generated by build)
├── pyproject.toml
└── README.md

Key design principles:

  • No hallucination — every yield prediction traces to verified Eurostat data
  • Live prices — CBOT wheat/corn via Yahoo Finance, updated hourly
  • Self-updating — monthly cron job rebuilds models with latest Eurostat data
  • Zero external API keys — all data sources are free and public

Commercialization

The tool is production-ready today for:

  • Agri-trading desks — "What's wheat worth in Picardie at current MATIF prices?"
  • Farm advisory — "How does this season compare to the last 5 years?"
  • Insurance / Risk — Yield-at-Risk (P10/P50/P90) per region
  • EU policy analysis — Climate scenario impact on national yields

Next commercial features: Market prices per country, historical price correlation, automated PDF reports, multi-year crop rotation planning.


Building & Training

# Build training data for a specific crop (25 min)
python3 build_europe.py --crop corn

# Train the model (2 min)
python3 train_europe_fast.py --crop corn

# Automatic monthly update (cron)
# Runs every 1st of the month at 06:00

License

MIT — free to use, modify, and distribute.

Built with ❤️ for AI agents that need real, verifiable crop intelligence.

Reviews

No reviews yet

Sign in to write a review