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).
README
πΎ crop-mcp
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/DasClown/CropProphEU
Features (10 MCP Tools)
| Tool | What it does |
|---|---|
yield_and_value |
NEW β Combined yield + market value (β¬/ha) with plain-language summary in German or English (auto-detected via language parameter) |
europe_yield_forecast |
Pan-European yield forecast (3 crops, 25 countries) with Yield-at-Risk |
crop_forecast |
Current season status: temperature, rain, soil moisture, drought index |
season_comparison |
Compare this season to historical years |
region_health |
All crops for one region in a single call |
weather_outlook |
16-day weather forecast |
climate_scenario |
What-if: +2Β°C, -20% rain? |
yield_forecast |
Analog-year yield matching (DE-focused) |
list_regions |
120 NUTS2 regions |
list_crops |
Crop 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
| Crop | Eurostat Code | Samples | Countries | MAE (LOYO) |
|---|---|---|---|---|
| πΎ Wheat | C1100 | 1,483 | 25 | 11.2% |
| π½ Corn (Maize) | C1500 | 1,648 | 20 | 11.6% |
| πΏ Barley | C1300 | 1,841 | 25 | 11.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
| Source | Data | Access |
|---|---|---|
| Eurostat | Crop yields (apro_cpshr) |
Free, no key |
| NASA POWER | GDD, precip, solar, soil moisture | Free, no rate limits |
| Open-Meteo | 16-day forecast | Free, no key |
| SoilGrids v2 | SOC, pH, N, CEC, texture | Free REST API |
| Yahoo Finance | Live CBOT wheat/corn futures + EUR/USD | Free, no key |
Model Accuracy
| Metric | Value |
|---|---|
| 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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.