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).
Ask AI about CropProphEU
Powered by Claude Β· Grounded in docs
I know everything about CropProphEU. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
πΎ CropProphEU β EU Crop Intelligence MCP Server
12 Tools, 5 Crops, 26 EU Countries, 120 NUTS2 Regions β Yield forecasts, market values (β¬/ha), risk analysis & portfolio optimization for European agriculture. Built for AI agents, by AI agents.
"How will wheat perform in Sachsen-Anhalt this year? What's my best β¬/ha allocation across 100 ha?"
pip install git+https://github.com/DasClown/CropProphEU.git
Features (12 MCP Tools)
| # | Tool | What it does | V |
|---|---|---|---|
| 1 | yield_and_value | Yield + market value (β¬/ha) + plain-language summary (DE/EN) | V4.6 |
| 2 | europe_yield_forecast | Pan-European RF forecast with Yield-at-Risk (P10/P50/P90) + NDVI correction | V4.3 |
| 3 | crop_forecast | Current season: GDD, rain, soil moisture, drought index, frost warnings | V4.0 |
| 4 | compare_regions | NEW β Batch-compare 20 regions Γ 5 crops with live market prices | V5.1 |
| 5 | portfolio_optimizer | NEW β AI investment engine: budget β optimal allocation across regions Γ crops | V5.1e |
| 6 | season_comparison | Compare this season to historical years | V4.0 |
| 7 | region_health | All crops for one region, single call | V4.5 |
| 8 | weather_outlook | 16-day weather forecast | V4.0 |
| 9 | climate_scenario | What-if: +2Β°C, -20% rain, etc. | V4.4 |
| 10 | yield_forecast | Analog-year yield matching (DE-focused) | V3.0 |
| 11 | list_regions | 120 NUTS2 regions across 26 countries | V4.2 |
| 12 | list_crops | Crop parameters (GDD base, season, frost sensitivity) | V4.5 |
Quick Start
1. Install
pip install git+https://github.com/DasClown/CropProphEU.git
2. Use as MCP Server
CLI (stdio):
crop-mcp
Python API:
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'] * 239:.0f} β¬/ha")
3. Claude Desktop / Cursor
{
"mcpServers": {
"crop": {
"command": "python3",
"args": ["-m", "crop_mcp.server"]
}
}
}
4. HTTP Server (Remote / Smithery)
pip install crop-mcp[http]
crop-mcp --http --port 8080
Connect 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 β Data Integrity β
Every prediction traces to a verified Eurostat crop code. No hallucinations, no silent wrong-crop training.
| Crop | Eurostat Code | Samples | Countries | MAE (LOYO) | RΒ² |
|---|---|---|---|---|---|
| πΎ Wheat | C1100 | 1,603 | 26 (πͺπΊ+πΊπ¦) | 11.5% | 0.87 |
| π½ Corn (Maize) | C1500 | 1,797 | 21 (πͺπΊ+π¬π§) | 11.6% | 0.72 |
| πΏ Barley | C1300 | 1,885 | 26 (πͺπΊ+π¬π§) | 11.2% | 0.85 |
| π» Rapeseed | I1110 | 1,825 | 25 | 10.8% | 0.83 |
| π» Sunflower | I1120 | 1,229 | 17 | 16.1% | 0.74 |
β οΈ V5.1d Data Fix: Rapeseed + Sunflower were previously trained on RICE data (wrong Eurostat codes C2000/C2200). Now corrected to Industrial crop codes I1110/I1120. DE rapeseed prediction fell from 7.21t to 2.63t β real, not extrapolated.
Why CropProphEU?
| Capability | CropProphEU | Open-Meteo MCP | Gro Intelligence |
|---|---|---|---|
| Yield forecasts | β 5 crops | β | β $10K+/yr |
| Soil features | β 11 properties | β | β |
| Yield-at-Risk (P10/P90) | β | β | β |
| Live market prices (β¬/ha) | β CBOT + MATIF | β | β |
| Climate what-if | β | β | β |
| Frost warnings | β | β | β |
| NDVI satellite correction | β | β | β |
| Portfolio optimizer | β | β | β |
| Multi-language (DE/EN) | β | β | β |
| Price | Free | Free | $10K+/yr |
Unique: Only free MCP server covering EU agriculture with soil β yield β market value β portfolio optimization in one pipeline.
Model Accuracy
| Metric | Value |
|---|---|
| LOYO MAE (Wheat) | 0.599 t/ha (11.5%) |
| Forward Validation (Train β€2022, Test 2023-24) | 0.794 t/ha (15.0%) |
| RΒ² (LOYO) | 0.871 |
| RΒ² (Forward) | 0.628 |
Most accurate for core EU (DE, FR, BE, NL, AT, CZ) where training data is dense.
Per-Crop Performance (V5.2)
| Crop | Algorithm | Top Feature | Key Insight |
|---|---|---|---|
| πΎ Wheat | RF 200 trees | solar_kwh (35%) | Nord/SΓΌd gradient dominates |
| π½ Corn | RF 200 trees | clay_pct (42%) | Maize is extremely soil-sensitive |
| πΏ Barley | Ridge | clay_pct (27%) | Best coverage of all crops |
| π» Rapeseed | RF 200 trees | coarse_pct (28%) | Corrected β now 1,825 real samples |
| π» Sunflower | Ridge | silt_pct (24%) | 17 countries (post-fix) |
Live Market Prices
| Crop | Source | β¬/t (Mai 2026) | Market |
|---|---|---|---|
| Wheat | β CBOT ZW=F + MATIF premium | 239 | Euronext MATIF |
| Corn | β CBOT ZC=F + MATIF premium | 189 | Euronext MATIF |
| Barley | β Reference (AMI regional) | 190 | AMI regional exchanges |
| Rapeseed | β Reference | 470 | Euronext MATIF (ECO) |
| Sunflower | β Reference | 420 | ICE / Black Sea |
Production costs (β¬/ha): Wheat 650, Corn 700, Barley 600, Rapeseed 780, Sunflower 650
Data Sources
| Source | Data | Access |
|---|---|---|
| Eurostat | Crop yields (apro_cpshr) β 25+ years, verified codes | Free, no key |
| NASA POWER | GDD, precip, solar, soil moisture | Free, no rate limits |
| Open-Meteo | 16-day forecast, GDD | Free, no key |
| SoilGrids v2 (ISRIC) | 11 properties: SOC, pH, N, CEC, clay, sand, silt, bdod (bulk density), cfvo (coarse fragments), AWC, coarse | Free REST API |
| LUCAS Soil (ESDAC) | Texture ~20K field points + coarse fragments | Free download |
| Sentinel-2 NDVI | Vegetation index (Copernicus STAC + Planetary Computer fallback) | Free, no auth |
| Yahoo Finance | Live CBOT wheat/corn futures, EUR/USD | Free, no key |
Zero API keys required β all sources are free and public.
Example Output
German (default):
Weizen β Region DEE0 (DE)
Ertrag: 7.35 t/ha (Spanne 6.50β8.20)
Temperatur: warm (2950Β°C WΓ€rmesumme)
Niederschlag: ausreichend (480 mm)
Bodenfeuchte: feucht (48%)
Modellabweichung: Β±11.5% (1603 Samples, 26 LΓ€nder)
Vergleich zu 2024: +0.15 t/ha (im Rahmen des Vorjahres)
Marktwert: 1.757 β¬/ha @ 239 β¬/t
Kosten: 650 β¬/ha β Deckungsbeitrag: 1.107 β¬/ha
English (with language="en"):
Wheat β Region DEE0 (DE)
Yield: 7.35 t/ha (range 6.50β8.20)
Temperature: warm (2950Β°C GDD)
...
Architecture
crop-mcp/
βββ crop_mcp/
β βββ server.py # 12 MCP tools
β βββ europe_model_api.py # RF (200 trees) + Yield-at-Risk + NDVI correction
β βββ ndvi_correction.py # Sentinel-2 NDVI correction factor (Β±30%)
β βββ market_prices.py # Live CBOT/MATIF via Yahoo Finance
β βββ feature_cache.py # Sub-second historical queries
β βββ simulate_yield.py # Analog-year matching
β βββ auto_update.py # Monthly retrain cron
β βββ core/regions.py # 120 NUTS2 regions
β βββ sources/ # Weather, soil, NDVI, Eurostat, FAOSTAT fetchers
βββ models/ # .pkl files (download from Releases)
βββ data/ # Training data (generated by build)
βββ crop_mcp/tools/ # V5.1 tools
β βββ compare_regions.py # Batch comparison
β βββ portfolio_optimizer.py # Investment engine
βββ 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 rebuilds models with latest Eurostat data
- Zero API keys β all data sources are free and public
- AI-for-AI β built for agents, no dashboards
Building & Training
# Build training data (25 min per crop)
python3 build_europe.py --crop corn
# Train model (2 min)
python3 train_europe_fast.py --crop corn
# Auto-update monthly (cron: 1st of month at 06:00)
Commercial Use Cases
- 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 + crop
- EU policy analysis: Climate scenario impact on national yields
- Investment: Portfolio optimizer for 100+ ha allocation decisions
License
MIT β free to use, modify, and distribute.
Built with β€οΈ for AI agents that need real, verifiable crop intelligence.
