agribrain
v0.1.0
Published
Agronomic intelligence for AI agents — weather, ET0, GDD, spray windows, soil. Zero API keys. MCP server.
Maintainers
Readme
agribrain 🌱
Agronomic intelligence for AI agents — weather, ET₀, GDD, spray windows, soil. Zero API keys.
agribrain is an MCP (Model Context Protocol) server that gives AI assistants real agronomic decision support for any field location on Earth. No API keys, no sign-ups — all open data.
Built by a licensed agronomist with 19 years of field experience.
What it does
Ask your AI assistant questions like:
- "When can I spray my vineyard this week?" → ranked spray windows with wind & rain checks
- "Is my olive grove water-stressed after this heat wave?" → ET₀ vs rainfall deficit
- "Has the grape berry moth reached the 2nd generation flight threshold?" → GDD vs biofix
- "What is the soil type and pH at my farm?" → ISRIC SoilGrids profile with interpretation
Tools
| Tool | Description |
|------|-------------|
| agri_get_weather | Forecast + ET₀ (Hargreaves-Samani FAO-56) + spray windows |
| agri_water_balance | Past water deficit: ET₀ vs rain + irrigation |
| agri_compute_gdd | Growing degree days from biofix/planting date |
| agri_get_soil | Soil pH, organic carbon, texture (0–30cm depth profile) |
| agri_list_models | List all bundled GDD pest/crop models |
Bundled GDD models
lobesia_botrana— Grape berry mothbactrocera_oleae— Olive fruit flyceratitis_capitata— Mediterranean fruit fly (medfly)cydia_pomonella— Codling mothgrape_phenology— Grapevine staging (BBCH)olive_phenology— Olive tree stagingtomato_phenology— Tomato stagingcitrus_phenology— Citrus staging
Custom base/cap temperatures supported for any other crop or pest.
Data sources
| Data | Source | API key? | |------|--------|----------| | Weather forecast (10 days) | Open-Meteo | ❌ None | | Historical weather (GDD / water balance) | Open-Meteo Archive | ❌ None | | Soil profile | ISRIC SoilGrids v2 | ❌ None |
Quick start — Claude Desktop
Install Node.js 18+ if you don't have it.
Add to your Claude Desktop config (
claude_desktop_config.json):
{
"mcpServers": {
"agribrain": {
"command": "npx",
"args": ["-y", "agribrain"]
}
}
}- Restart Claude Desktop. Ask: "What is the weather forecast for my vineyard at lat 38.024, lon 22.494?"
Install globally
npm install -g agribrainOr run without installing:
npx agribrainExample prompts
Get the weather and spray windows for my olive grove at 37.9, 23.7 for the next 10 days.
Compute GDD for grape berry moth at lat 41.1, lon 24.5 since my trap biofix on 2026-04-15.
What is the water balance for my tomato field at 40.6, 22.9 over the last 14 days?
I irrigated 25mm on June 5th and 20mm on June 10th.
Show me the full soil profile for coordinates 38.0, 22.5.Architecture
agribrain is a single TypeScript package with zero external API dependencies. All agronomic math (ET₀, GDD, spray window scoring) is implemented from published equations (FAO-56, EPPO/UC IPM) and runs locally.
src/
├── index.ts # MCP server — tool registration
└── services/
├── weather.ts # Open-Meteo client + ET₀ + spray windows
├── gdd.ts # GDD engine + bundled pest/crop models
├── soil.ts # ISRIC SoilGrids client + interpretation
└── waterbalance.ts # Water balance engineContributing
Pull requests welcome. Especially:
- New GDD pest/crop models with published threshold data and citations
- Additional crop Kc coefficients (FAO-56 or local calibrations)
- New regions or data sources
See CONTRIBUTING.md.
Disclaimer
Spray window calculations and pest threshold alerts are guidance only. Always follow the product label, local regulations, and consult a licensed agronomist for commercial spray decisions. Soil data is from a 250m global grid — a local laboratory test always takes precedence.
License
MIT — see LICENSE.
agribrain powers the agronomic data layer of Ask Oli — AI agronomist for Mediterranean smallholders.
