Garden Diagnostic Agent
Powers optional natural-language garden queries in LLM mode: the server's tool schemas are handed to a hosted Hugging Face router model (default meta-llama/Llama-3.3-70B-Instruct), which picks and chains the MCP tools itself until it returns a plain-text answer.
Backs the garden planting log: stores plantings (name, variety, coordinates, date, notes) and dated field observations, and is exposed through tools to record and list plantings and observations, plus look up a planting's coordinates and weather window for diagnostics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Garden Diagnostic Agent check my tomato plantings for stress and tell me if they need water"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Garden Diagnostic Agent
An MCP (Model Context Protocol) server and agent host for diagnosing garden plant stress. The server exposes two data sources as MCP tools - Open-Meteo weather and a SQLite planting log - and the agent host connects over MCP and chains those tools into a full garden check.
How it fits together
+-------------------+ MCP (stdio) +----------------------+
| agent host | ----------------------> | MCP server |
| (garden check) | list_plantings | |
| | diagnose_planting x N | tools: |
| | <---------------------- | log_planting |
| | GardenCheckReport | list_plantings |
+-------------------+ | log_observation |
| list_observations |
diagnose_planting chains internally: | get_weather |
log lookup -> weather fetch -> rules | diagnose_planting |
+----------+-----------+
|
+------------------+------------------+
| |
+---------v---------+ +-----------v------+
| SQLite log | | Open-Meteo API |
| plantings + | | daily weather, |
| observations | | no key needed |
+-------------------+ +------------------+Every tool validates its inputs and outputs with pydantic models
(src/garden_mcp/schemas.py), so bad dates, out-of-range coordinates, and
empty names fail at the boundary instead of corrupting the log. Diagnostics
are transparent rules over the weather window (src/garden_mcp/diagnostics.py):
frost, heat, water deficit versus evapotranspiration, excess water, and wind.
Related MCP server: mcp-horticulture-agent
Quickstart
pip install -r requirements-dev.txt
python -m pytest -q # 45 tests, no network needed (Open-Meteo and the model are mocked)
python -m garden_mcp.demo # end-to-end: seeds sample data, live weather, agent checkRun the server for any MCP host (Claude Desktop, etc.):
python -m garden_mcp.server # speaks MCP over stdioRun the agent host, which spawns the server and chains its tools:
python -m garden_mcp.agent tools # list exposed tools
python -m garden_mcp.agent check --db garden.dbLoad your own garden data (format in src/garden_mcp/seed.py docstring):
python -m garden_mcp.seed data/sample_garden.json --db garden.dbdata/sample_garden.json is synthetic. data/garden_2026.json is a real
container-garden log (raised beds, buckets, and pots in Washington, DC):
13 plantings and 11 dated field observations logged from the garden's photo
record. Planting dates are left out where they aren't known; the observations
carry the real dates.
LLM mode (optional)
agent.py chains the tools in a fixed order. For natural-language questions,
llm_agent.py hands the same MCP tools to a hosted Hugging Face model and
lets the model pick and chain the calls itself:
export HF_TOKEN=hf_... # free at https://huggingface.co/settings/tokens
python -m garden_mcp.llm_agent ask "why are my tomatoes dropping blossoms?" --db garden.dbThe loop: the model sees the server's tool schemas (list_tools), returns
tool calls, the host executes them over MCP and feeds the results back, until
the model answers in plain text (at most 8 rounds). The default model is
meta-llama/Llama-3.3-70B-Instruct on the Hugging Face router
(router.huggingface.co, free Inference API); override with --model.
The Hugging Face endpoint is mocked in the tests, so CI never needs a token
or the network. The deterministic garden check above stays the default; LLM
mode is additive.
Sample output
A real garden check against that log (live Open-Meteo weather for the garden's coordinates, trimmed to one planting):
{
"checked_plantings": 13,
"diagnoses": [
{
"planting_id": 6,
"plant_name": "tomato",
"flags": [
{
"kind": "dry",
"severity": "high",
"detail": "Only 1.6 mm of rain against 13.2 mm evapotranspiration over the past 7 days (12% of demand)."
}
],
"summary": "tomato: 1 stress signal(s) - dry (high).",
"recommendations": [
"Increase watering frequency; soil moisture is not keeping up with evapotranspiration."
]
}
],
"summary": "Checked 13 planting(s): 13 with stress signals, 0 clear."
}Every diagnosis traces back to the weather numbers in its detail, so the
report can be checked against the forecast it used.
Tools
Tool | What it does |
| Record a planting (name, variety, coordinates, date, notes) |
| List everything in the log |
| Attach a dated field note to a planting |
| Read notes back, all or per planting |
| Daily past + forecast weather from Open-Meteo for a location |
| Look up a planting's coordinates, pull its weather, flag stress |
Agent host
GardenAgent takes any connected MCP ClientSession, which keeps the host
honest: it can only do what the server's tools allow. A garden check chains
list_plantings into one diagnose_planting call per planting and aggregates
the results into a single report. In production it spawns the server over
stdio; in tests it runs in-memory against the same server object.
Layout
src/garden_mcp/
schemas.py pydantic models: the checked I/O boundary for every tool
db.py SQLite planting log (plantings + observations)
weather.py Open-Meteo client (free, no API key)
diagnostics.py stress rules over the weather window
server.py FastMCP server exposing the tools
agent.py agent host that chains the tools
seed.py JSON import for garden data
demo.py end-to-end demo
tests/ pytest suite (Open-Meteo mocked with httpx.MockTransport)
.github/workflows/tests.ymlNotes
Open-Meteo is free for non-commercial use and needs no API key.
Tests never touch the network; the live path is covered by the demo.
Available Tools
6 toolsdiagnose_plantingB
Diagnose one planting: pulls its coordinates from the log, fetches recent and forecast weather, and flags frost / heat / water / wind stress.
Inputs: planting_id (required), past_days.
get_weatherC
Fetch daily weather (past and forecast) from Open-Meteo for a location.
Inputs: latitude (required), longitude (required), past_days, forecast_days.
list_observationsB
List observations, optionally filtered to one planting.
Inputs: planting_id. Returns: result
list_plantingsB
List every planting in the garden log.
Inputs: no named parameters. Returns: result
log_observationC
Attach a dated observation (e.g. 'leaves curling') to a planting.
Inputs: note (required), planting_id (required), observed_on.
log_plantingC
Record a planting in the garden log and return the stored row.
Inputs: latitude (required), longitude (required), plant_name (required), notes, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct role: logging vs listing for plantings and observations, raw weather retrieval, and a composite diagnostic. The boundary between get_weather (raw data) and diagnose_planting (analysis using weather) is well explained, so an agent can pick correctly.
All six tools follow a consistent snake_case verb_noun pattern (log_*, list_*, get_*, diagnose_*). No mixed conventions or vague verbs.
Six tools is well-scoped for a focused garden diagnostic server. Each tool earns its place, with no redundant surface.
Create and read are covered for both plantings and observations plus a composite diagnostic, but there are no update or delete operations for logged entries, leaving agents unable to correct or remove stale records.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Weather, code search, currency & Solana trust scoring as MCP tools. Free, no API key needed.
Hosted MCP server for live public-data APIs and Skills for AI agents.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server for HortusFox self-hosted plant management system, exposing 38 tools to manage plants, locations, tasks, inventory, calendar, chat, and backups via natural language.388 npm1MIT
- AlicenseNot gradedqualityDmaintenanceA local-first MCP server for tracking indoor horticulture metrics, enabling cold-stratification timelines, ericaceous soil pH validation, and transplant-shock recovery through a LangGraph agent with a local LLM.MIT
- AlicenseAqualityCmaintenanceAn MCP server that gives coding agents structured plant data for garden planning: species care profiles, companion checks that explain themselves, and frost-date planting windows derived from ten years of observed weather.412 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to set up and manage a local garden journal by searching places, saving garden setup, logging and updating plantings, retrieving forecasts, checking frost risk, and finding planting windows.MIT