hortusfox-mcp
HortusFox MCP Server
A Model Context Protocol (MCP) stdio server for
HortusFox, the self-hosted plant
management system. It exposes the complete HortusFox REST API (/api/*) as MCP tools so
AI assistants can read and manage your plants, locations, tasks, inventory, calendar,
chat and backups.
Written in TypeScript for Node.js, using the official
@modelcontextprotocol/sdk.
Features
Every endpoint of the HortusFox ApiController is covered — 38 tools across 7 domains:
Domain | Tools |
Plants (18) | get, add, update, remove, list, search; custom attributes add/edit/remove; main photo update; gallery list/add/edit/remove; log add/edit/remove/fetch |
Locations (2) | list, get info |
Tasks (4) | fetch, add, edit, remove |
Inventory (6) | fetch, add, edit, increment, decrement, remove |
Calendar (4) | fetch, add, edit, remove |
Chat (2) | fetch, post message |
Backup (2) | export, import |
Prerequisites
Node.js 18+ (uses the built-in
fetch).A running HortusFox instance.
A HortusFox API key. In HortusFox, go to Admin → API and create a key.
Installation
npm install
npm run buildThis produces the runnable server at dist/index.js.
Configuration
The server is configured entirely through environment variables:
Variable | Required | Description |
| ✅ | Base URL of your HortusFox instance, e.g. |
| ✅ | API key created in the HortusFox admin panel |
| ❌ | Request timeout in milliseconds (default |
See .env.example.
Usage
Run directly
HORTUSFOX_URL=https://garden.example.com \
HORTUSFOX_API_TOKEN=your-token \
node dist/index.jsThe server speaks MCP over stdio. Diagnostic messages are written to stderr; the
JSON-RPC protocol uses stdout.
Run with npx
Once published to npm, the server can be run without a local checkout:
HORTUSFOX_URL=https://garden.example.com \
HORTUSFOX_API_TOKEN=your-token \
npx @tomfrenzel/hortusfox-mcpRegister with an MCP client
Add the server to your client's MCP configuration. The recommended way is via
npx:
{
"mcpServers": {
"hortusfox": {
"command": "npx",
"args": ["-y", "@tomfrenzel/hortusfox-mcp"],
"env": {
"HORTUSFOX_URL": "https://garden.example.com",
"HORTUSFOX_API_TOKEN": "your-token"
}
}
}
}Alternatively, point at a local build:
{
"mcpServers": {
"hortusfox": {
"command": "node",
"args": ["/absolute/path/to/hortusfox-mcp/dist/index.js"],
"env": {
"HORTUSFOX_URL": "https://garden.example.com",
"HORTUSFOX_API_TOKEN": "your-token"
}
}
}
}If installed globally (npm install -g .), you can use the hortusfox-mcp binary
instead of node dist/index.js.
Tool reference
All tools are prefixed with hortusfox_. Each returns the raw HortusFox JSON response
(pretty-printed). Errors (network failures, auth rejection, or API error codes) are
returned as MCP tool errors with a descriptive message.
Plants
Tool | Endpoint | Key arguments |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Photos: the API-based photo tools support external image URLs (
external: truewith aphotoURL). Direct binary file uploads are not exposed over the token API.
Locations
Tool | Endpoint | Key arguments |
|
|
|
|
|
|
Tasks
Tool | Endpoint | Key arguments |
|
|
|
|
|
|
|
|
|
|
|
|
Inventory
Tool | Endpoint | Key arguments |
|
| – |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Calendar
Tool | Endpoint | Key arguments |
|
|
|
|
|
|
|
|
|
|
|
|
Chat
Tool | Endpoint | Key arguments |
|
|
|
|
|
|
Backup
Tool | Endpoint | Key arguments |
|
|
|
|
| same category flags |
Development
npm run dev # tsc --watch
npm run typecheck # type-check without emitting
npm run build # compile to dist/A dev container config is provided in
.devcontainer/ for a ready-to-use Node.js + TypeScript
environment.
Releasing
Releases are published to npm automatically by the
Release GitHub Actions workflow whenever a
v* tag is pushed. The workflow type-checks, builds, verifies the tag matches
the package.json version, and publishes with
npm provenance.
To cut a release:
npm version patch # or minor / major — bumps package.json and creates a tag
git push --follow-tagsThis requires an NPM_TOKEN secret to be configured in the repository settings.
How it works
The Asatru framework behind HortusFox merges POST body, query string and JSON body into a
single request argument bag, and the API authenticates via a token parameter. This
server therefore sends each request as an application/x-www-form-urlencoded POST
(including the token and all parameters), which works uniformly for every route and avoids
URL-length limits for larger text fields. Requests are retried up to 3 times on transient
network/timeout failures; deterministic API and auth errors are surfaced immediately.
License
MIT — see LICENSE.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tomfrenzel/hortusfox-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server