Skip to main content
Glama
HortusFox MCP Server

HortusFox MCP Server

by gotylergo

HortusFox MCP Server 🌿🦊

A Model Context Protocol (MCP) server for HortusFox, the self-hosted collaborative plant management system.

Connect your AI coding assistants (Claude Code, Cursor, Antigravity, OpenCode, Windsurf) directly to your home garden database to inspect plant health, query watering schedules, log care events, and update timestamps.

Note: This project is open-source, community-driven, and was vibe-coded / AI-assisted with Google Antigravity pair programming.


Features

  • Flexible Connectivity: Connect to local LAN instances or remote instances behind reverse proxies and authentication gateways.

  • Rich Care Tools:

    • list_plants: Overview of active plants, species, locations, and care dates.

    • get_plant_details: In-depth attributes (both default and custom fields like "Last pruned", "Soil moisture", etc.).

    • get_plant_history: Full audit trail of care logs, measurements, and status updates.

    • add_plant_log: Record watering, repotting, or health observations directly from conversation, with automatic timestamp synchronization!

    • search_plants: Fuzzy search across botanical names, common names, and tags.

    • list_locations: Discover garden zones (e.g. Indoor, Balcony, Greenhouse).

    • update_plant_attribute: Modify attributes (last_watered, last_repotted, health_state, notes).

    • list_inventory & update_inventory_amount: Monitor and update garden supplies and substrate stock.


Related MCP server: MySQL MCP Server

Tool Reference

Tool

Arguments

Description

list_plants

location_id (optional), limit (optional)

Retrieve active plants and their care status.

get_plant_details

plant_id (required)

Get comprehensive plant specs and custom attributes.

get_plant_history

plant_id (required), limit (optional)

Fetch historical activity logs and notes for a plant.

add_plant_log

plant_id (required), notes (required), action (optional), update_timestamp (optional, default: true)

Add care note. If action is watered, fertilized, or repotted, auto-updates the plant's date!

search_plants

query (required), limit (optional)

Search plants across all locations.

list_locations

None

List all registered growing locations.

update_plant_attribute

plant_id (required), attribute (required), value (required)

Directly update an attribute (e.g. last_watered: "2026-09-05").

list_inventory

group (optional)

Retrieve inventory items (fertilizers, substrates, pest control, supplies) and stock counts.

update_inventory_amount

item_id (required), action (required: 'inc' | 'dec')

Increment or decrement stock count of an inventory item.


Prerequisites

  1. Node.js 18+ and npm.

  2. HortusFox v3.1+ instance with API enabled:

    • In HortusFox, navigate to Admin Panel -> API.

    • Generate an API Key.


Installation & Build

git clone https://github.com/gotylergo/hortusfox-mcp.git # or local folder
cd hortusfox-mcp
npm install
npm run build

The compiled server entrypoint is located at dist/index.js.


Configuration & Environment Variables

Variable

Description

Example

HORTUSFOX_URL

Base URL of your HortusFox instance.

http://localhost:8080 or https://plants.example.com

HORTUSFOX_API_TOKEN

HortusFox API token generated in Admin -> API.

your_api_token_here

HORTUSFOX_CUSTOM_HEADERS

(Optional) JSON map of custom HTTP headers (e.g. reverse proxy or auth tokens).

{"X-Custom-Auth":"secret"}

CF_ACCESS_CLIENT_ID

(Optional) Shorthand for Cloudflare Access Service Token Client ID.

xxxx.access

CF_ACCESS_CLIENT_SECRET

(Optional) Shorthand for Cloudflare Access Service Token Client Secret.

xxxx


Registering with MCP Clients

Claude Desktop / Claude Code (claude_desktop_config.json)

{
  "mcpServers": {
    "hortusfox": {
      "command": "node",
      "args": ["/absolute/path/to/hortusfox-mcp/dist/index.js"],
      "env": {
        "HORTUSFOX_URL": "http://localhost:8080",
        "HORTUSFOX_API_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "hortusfox": {
      "command": "node",
      "args": ["/absolute/path/to/hortusfox-mcp/dist/index.js"],
      "env": {
        "HORTUSFOX_URL": "http://localhost:8080",
        "HORTUSFOX_API_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}

Antigravity / Gemini CLI (~/.gemini/antigravity/mcp_config.json)

{
  "mcpServers": {
    "hortusfox": {
      "command": "node",
      "args": ["/absolute/path/to/hortusfox-mcp/dist/index.js"],
      "env": {
        "HORTUSFOX_URL": "http://localhost:8080",
        "HORTUSFOX_API_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}

OpenCode (~/.config/opencode/opencode.jsonc)

{
  "mcp": {
    "hortusfox": {
      "type": "local",
      "command": ["node", "/absolute/path/to/hortusfox-mcp/dist/index.js"],
      "environment": {
        "HORTUSFOX_URL": "http://localhost:8080",
        "HORTUSFOX_API_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}

Authentication Proxies & Custom Headers

If your HortusFox instance is protected by an authentication gateway (such as Cloudflare Access, Authelia, or an OAuth proxy), pass custom headers via HORTUSFOX_CUSTOM_HEADERS:

"env": {
  "HORTUSFOX_URL": "https://plants.example.com",
  "HORTUSFOX_API_TOKEN": "YOUR_API_TOKEN",
  "HORTUSFOX_CUSTOM_HEADERS": "{\"CF-Access-Client-Id\": \"...\", \"CF-Access-Client-Secret\": \"...\"}"
}

For Cloudflare Access specifically, CF_ACCESS_CLIENT_ID and CF_ACCESS_CLIENT_SECRET can also be supplied directly as environment variables.


Bundled Skills & Agent Guides

This repository includes a ready-to-use agent skill located at skills/plant-care-bootstrap/SKILL.md:

  • plant-care-bootstrap: Audits active plants in the user's HortusFox database, pulls verified botanical care requirements on-demand from authoritative databases (RHS, NC Extension, Missouri Botanical Garden, ICPS), and can either pre-populate HortusFox plant notes/knowledge links or equip local assistants with zero-hallucination care reference guides.

  • Compatible with OpenCode, Claude Code, Antigravity, and Cursor.


License

MIT

Available Tools

9 tools
add_plant_logB

Log watering, repotting, fertilization, or observation notes for a plant directly from conversation.

Inputs: notes (required), plant_id (required), action, update_timestamp.

get_plant_detailsB

Get deep plant information, care attributes, last watered/fertilized timestamps, and custom properties.

Inputs: plant_id (required).

get_plant_historyA

Retrieve historical log events, care notes, watering records, and observations for a plant.

Inputs: plant_id (required), limit.

list_inventoryA

Retrieve inventory items (fertilizers, substrates, pest control, supplies) and stock counts from HortusFox.

Inputs: group.

list_locationsA

List all growing locations (e.g. Balcony, Indoor, Garden) in HortusFox.

Inputs: no named parameters.

list_plantsB

Retrieve active plants, species, locations, and care statuses from HortusFox.

Inputs: limit, location_id.

search_plantsA

Search for plants across all locations by name, scientific name, or tag.

Inputs: query (required), limit.

update_inventory_amountB

Increment or decrement the stock count of an inventory item in HortusFox.

Inputs: action (required), item_id (required).

update_plant_attributeC

Directly update a plant default attribute (e.g., last_watered, last_fertilised, last_repotted, health_state, notes).

Inputs: value (required), plant_id (required), attribute (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools map to clearly distinct resources and actions: plants, plant history, locations, and inventory. The only minor ambiguity is between search_plants and list_plants, which both return plant collections but differ in query flexibility.

    Naming Consistency5/5

    All tool names follow a consistent lowercase snake_case verb_noun pattern, with clear verbs like search, list, get, add, and update. There is no mixing of styles or vague names.

    Tool Count5/5

    Nine tools is a well-scoped set for a plant management server, covering retrieval, updates, logging, and inventory without unnecessary redundancy. Each tool has a clear role.

    Completeness3/5

    The read, update, and logging operations are solid, but the set lacks create or delete operations for plants, locations, and inventory items. This creates a notable lifecycle gap for agents managing a HortusFox collection.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to connect to and interact with PostgreSQL, MySQL, SQLite, and MongoDB databases through natural language, supporting schema exploration, query execution, data export, and more.
      13
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to directly query MySQL databases, list tables, and view table structures through natural language.
      20 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI tools to understand a database, inspect schema, and run safe SELECT queries with SQL guardrails, plus optional codebase reading.
      MIT