hortusfox-mcp
MCP server for HortusFox self-hosted plant management system, exposing 38 tools to manage plants, locations, tasks, inventory, calendar, chat, and backups via natural language.
README
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 build
This produces the runnable server at dist/index.js.
Configuration
The server is configured entirely through environment variables:
| Variable | Required | Description |
|---|---|---|
HORTUSFOX_URL |
✅ | Base URL of your HortusFox instance, e.g. https://garden.example.com |
HORTUSFOX_API_TOKEN |
✅ | API key created in the HortusFox admin panel |
HORTUSFOX_TIMEOUT |
❌ | Request timeout in milliseconds (default 30000) |
See .env.example.
Usage
Run directly
HORTUSFOX_URL=https://garden.example.com \
HORTUSFOX_API_TOKEN=your-token \
node dist/index.js
The 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-mcp
Register 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 |
|---|---|---|
hortusfox_get_plant |
plants/get |
plant |
hortusfox_add_plant |
plants/add |
name, location |
hortusfox_update_plant |
plants/update |
plant, attribute, value |
hortusfox_remove_plant |
plants/remove |
plant |
hortusfox_list_plants |
plants/list |
location?, limit?, from?, sort? |
hortusfox_search_plants |
plants/search |
expression, limit? |
hortusfox_add_plant_attribute |
plants/attributes/add |
plant, label, datatype, content |
hortusfox_edit_plant_attribute |
plants/attributes/edit |
plant, label, datatype, content |
hortusfox_remove_plant_attribute |
plants/attributes/remove |
plant, label |
hortusfox_update_plant_photo |
plants/photo/update |
plant, external?, photo?, move_to_gallery? |
hortusfox_list_plant_gallery |
plants/gallery/list |
plant |
hortusfox_add_plant_gallery_photo |
plants/gallery/add |
plant, label?, external?, photo? |
hortusfox_edit_plant_gallery_photo |
plants/gallery/edit |
plant, item, label |
hortusfox_remove_plant_gallery_photo |
plants/gallery/remove |
item |
hortusfox_add_plant_log_entry |
plants/log/add |
plant, content |
hortusfox_edit_plant_log_entry |
plants/log/edit |
logid, content |
hortusfox_remove_plant_log_entry |
plants/log/remove |
logid |
hortusfox_fetch_plant_log |
plants/log/fetch |
plant, paginate?, limit? |
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 |
|---|---|---|
hortusfox_list_locations |
locations/list |
only_active?, include_plants?, include_info?, paginate?, limit? |
hortusfox_get_location |
locations/info |
location, include_plants? |
Tasks
| Tool | Endpoint | Key arguments |
|---|---|---|
hortusfox_fetch_tasks |
tasks/fetch |
done?, limit? |
hortusfox_add_task |
tasks/add |
title, description?, due_date?, recurring_time?, recurring_scope?, plant? |
hortusfox_edit_task |
tasks/edit |
task, title?, description?, due_date?, recurring_time?, recurring_scope?, done? |
hortusfox_remove_task |
tasks/remove |
task |
Inventory
| Tool | Endpoint | Key arguments |
|---|---|---|
hortusfox_fetch_inventory |
inventory/fetch |
– |
hortusfox_add_inventory_item |
inventory/add |
name, description?, tags?, location?, amount?, group?, photo? |
hortusfox_edit_inventory_item |
inventory/edit |
item, plus any of the add fields |
hortusfox_increment_inventory_item |
inventory/amount/inc |
item |
hortusfox_decrement_inventory_item |
inventory/amount/dec |
item |
hortusfox_remove_inventory_item |
inventory/remove |
item |
Calendar
| Tool | Endpoint | Key arguments |
|---|---|---|
hortusfox_fetch_calendar |
calendar/fetch |
date_from?, date_till? |
hortusfox_add_calendar_entry |
calendar/add |
name, date_from, date_till?, class? |
hortusfox_edit_calendar_entry |
calendar/edit |
ident, name?, date_from, date_till?, class? |
hortusfox_remove_calendar_entry |
calendar/remove |
ident |
Chat
| Tool | Endpoint | Key arguments |
|---|---|---|
hortusfox_fetch_chat |
chat/fetch |
limit? |
hortusfox_add_chat_message |
chat/message/add |
message |
Backup
| Tool | Endpoint | Key arguments |
|---|---|---|
hortusfox_export_backup |
backup/export |
locations?, plants?, gallery?, tasks?, inventory?, calendar? |
hortusfox_import_backup |
backup/import |
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-tags
This 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。