OpenSprinkler MCP server
This server lets you monitor and control an OpenSprinkler irrigation controller through MCP clients like Claude Desktop.
Get controller status (device time, enabled state, rain delay)
List all stations and see which are running, enabled, and remaining time
Start a station for a specified duration
Stop a single station or stop all stations immediately
View and set rain delay hours
Enable or disable the controller
Reboot the controller
View watering history logs for a date range
List watering programs and get full details of a single program
Add new weekly or interval watering programs
Delete existing watering programs
Get controller options and settings
OpenSprinkler MCP Server
MCP server for managing OpenSprinkler controller via Claude Desktop or any MCP-compatible client.
Restriction: Only one controller can be managed at a time. This can be changed in the future if needed, but for now it is a limitation of the design.
Available Tools
Tool | Description |
| Get controller status (device time, enabled state, rain delay) |
| Get all stations with their current status |
| Start a station for a specified duration |
| Stop a running station |
| Stop all running stations immediately |
| Set rain delay in hours (0 to clear) |
| Enable or disable the controller |
| Reboot the OpenSprinkler controller |
| Get watering history logs for a date range |
| Get all watering programs |
| Get full details of a single program by ID |
| Add a new watering program |
| Delete a watering program by ID |
| Get controller options and settings |
Related MCP server: OpenClaw MCP Server
Configuration
Environment Variables
Variable | Description | Default |
| Hostname or IP address of OpenSprinkler |
|
| MD5 hash of the controller password | (empty) |
| Port number |
|
| Set to |
|
| Abort a controller request after this many milliseconds |
|
| HTTP port for SSE mode |
|
| Interface to bind in SSE mode. Use |
|
| Bearer token required on all HTTP requests (optional) | (unset — no auth) |
| Comma-separated | (unset — not validated) |
| Comma-separated | (unset — not validated) |
Secure Connection (TLS/HTTPS)
If your OpenSprinkler is behind a reverse proxy with HTTPS (e.g. nginx, Traefik), set:
OPEN_SPRINKLER_HOST=opensprinkler.example.com
OPEN_SPRINKLER_PORT=443
OPEN_SPRINKLER_TLS=trueThe server will then connect via https://opensprinkler.example.com:443.
Note: OpenSprinkler firmware does not natively support TLS — HTTPS requires a reverse proxy in front of the controller.
Transport Modes
The server supports two transport modes, selected by a command-line argument.
stdio (default)
Used when launched directly by an MCP client (e.g. Claude Desktop). No argument needed:
node dist/index.jsSSE / HTTP (--sse)
Starts an HTTP server that exposes the MCP endpoint over Streamable HTTP (SSE). Use this when you want to run the server as a persistent network service — for example in Docker or Kubernetes — and connect to it from multiple clients or over the network.
node dist/index.js --sseThe server listens on http://${HOST}:${PORT}/mcp (default 0.0.0.0:3000).
Connect your MCP client to: http://<host>:3000/mcp
Bearer Authentication (HTTP mode only)
Set MCP_AUTH_TOKEN to require a bearer token on every HTTP request. If the variable is not set the server accepts all connections (useful for private networks or local use).
MCP_AUTH_TOKEN=mysecrettoken TRANSPORT=http node dist/index.jsClients must send the header:
Authorization: Bearer mysecrettokenRequests without a valid token receive 401 Unauthorized. Tokens are compared in constant time. The stdio transport is unaffected — authentication is not applicable there.
Network Hardening (HTTP mode only)
These tools can start and stop watering, disable the controller, reboot it and delete
programs, so anyone who can reach the HTTP port can do all of that. In HTTP mode the
server binds 0.0.0.0 by default and prints a warning at startup when no token is set.
For anything beyond a trusted private network:
MCP_AUTH_TOKEN=mysecrettoken \
HOST=127.0.0.1 \
MCP_ALLOWED_HOSTS=localhost:3000,127.0.0.1:3000 \
node dist/index.js --sseMCP_AUTH_TOKENis the primary control — without it the endpoint is open.MCP_ALLOWED_HOSTSdefends against DNS rebinding: a malicious web page can make a browser on your network reach127.0.0.1:3000, but the request still carries the attacker's hostname in theHostheader, which the allowlist rejects.HOST=127.0.0.1keeps the listener off the network entirely. Leave it at the0.0.0.0default inside Docker/Kubernetes, where the container needs to accept connections from outside its network namespace.
Legacy SSE (backport compatibility)
For testing with tools that implement the older MCP SSE transport (e.g. mcptools, older inspector versions), the server automatically handles legacy clients on the same /mcp endpoint — no extra flag needed.
How the server distinguishes clients:
Request | Interpreted as |
| Legacy SSE — opens an event-stream |
| Legacy SSE — client sending a message |
| Modern Streamable HTTP |
Connecting a legacy client (example with mcptools):
# Start the server
node dist/index.js --sse
# In another terminal
mcp connect http://localhost:3000/mcpNote:
SSEServerTransportis deprecated in the MCP SDK and this compatibility layer is intended for testing only. Production clients should use the modern Streamable HTTP transport.
You can enable verbose debug output during testing by setting NODE_ENV=development:
NODE_ENV=development node dist/index.js --sseThis prints every request, response status, and session lifecycle event to stderr.
Docker
See docs/docker/ for the full deployment guide, Docker Compose file, Claude Desktop configuration options, and troubleshooting steps.
Kubernetes
See docs/kubernetes/ for manifests. Adjust the ConfigMap and Secret for your environment, then:
kubectl apply -k docs/kubernetes/Claude Desktop (Node.js, no Docker)
{
"mcpServers": {
"opensprinkler": {
"command": "node",
"args": ["/path/to/opensprinkler-mcp/dist/index.js"],
"env": {
"OPEN_SPRINKLER_HOST": "192.168.1.100",
"OPEN_SPRINKLER_PASSWORD": "your_password"
}
}
}
}Password
The OpenSprinkler firmware stores whatever string was written when the password was last set. The official app MD5-hashes the password before sending it, so the stored value is an MD5 hash — and OPEN_SPRINKLER_PASSWORD must be the MD5 hash of your password, not the plain text.
Generate it with:
echo -n "your_password" | md5Contributing
Contributions are welcome. Please open an issue or pull request on GitHub.
Acknowledgements
This project is inspired by the work at github.com/Lumeo-sd/opensprinkler-mcp-sdr. All code was automatically re-created from scratch using AI tools due to lack of LICENSE statement in the original repository.
Disclaimer
I am not affiliated with the manufacturers, sellers or any of the device brands. This plugin is a personal project that I maintain in my free time.
Refer to the licence for more information.
Available Tools
15 toolsadd_programAdd ProgramA
Add a new watering program with weekly or interval scheduling
Inputs: name (required), enabled (required), station_ids (required), use_weather (required), +6 more. Returns: result
delete_programDelete ProgramA
Delete an existing watering program by ID
Inputs: pid (required). Returns: result
enable_controllerEnable ControllerA
Enable or disable the controller
Inputs: enabled (required). Returns: result
get_controller_statusGet Controller StatusA
Get OpenSprinkler controller status including device time, enabled state, rain delay status
Inputs: no named parameters.
get_optionsGet OptionsC
Get controller options and settings
Inputs: no named parameters.
get_programGet ProgramA
Get full details of a single watering program by ID
Inputs: pid (required).
get_programsGet ProgramsA
Get all watering programs
Inputs: no named parameters. Returns: programs
get_rain_delayGet Rain DelayA
Get the current rain delay status including remaining hours and end date
Inputs: no named parameters. Returns: active, endDate, hoursRemaining
get_stationsGet StationsA
Get all stations with their current status (running, enabled, names, seconds remaining)
Inputs: no named parameters. Returns: stations
reboot_controllerReboot ControllerA
Reboot the OpenSprinkler controller
Inputs: no named parameters. Returns: result
run_stationRun StationA
Start a station for a specified duration
Inputs: station_id (required), duration_minutes (required). Returns: result
set_rain_delaySet Rain DelayA
Set rain delay in hours (0 to clear)
Inputs: hours (required). Returns: result
stop_all_stationsStop All StationsA
Stop all running stations immediately
Inputs: no named parameters. Returns: result
stop_stationStop StationA
Stop a running station
Inputs: station_id (required). Returns: result
view_logsView LogsA
Get watering history logs for a date range. Dates are interpreted in the controller's local timezone.
Inputs: date_to (required), date_from (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools target distinct resources and actions: stations, programs, rain delay, controller status, and logs are clearly separated. The only mild overlap is between get_controller_status and get_options, since both touch controller-level settings, but their descriptions are distinct enough to avoid serious misselection.
The naming largely follows a consistent verb_noun pattern: get_* for reads, plus run_station, stop_station, set_rain_delay, enable_controller, and add/delete_program. The main inconsistency is view_logs instead of get_logs, and stop_all_stations is a slightly expanded variant of stop_station.
Fifteen tools is at the upper end of the ideal range, but each tool covers a meaningful controller operation without redundancy. The count feels appropriate for the scope of an irrigation controller server, and no tools are mere duplicates.
The tool surface covers the core workflows well: station control, rain delay, controller status, logs, and program lookup/creation/deletion. The most notable gap is the lack of an update_program tool, so existing programs cannot be edited directly, though agents could work around this by deleting and re-adding.
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for OnceAsk, the AI-native current-address layer for people and agents.
MCP server wrapping the Tesla Fleet API and TeslaMate API
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server for managing Claude Code conversation sessions12MIT
- AlicenseBqualityDmaintenanceMCP server that exposes OpenClaw Gateway tools to Claude Code and other MCP clients, enabling messaging, session management, scheduling, node control, web search, memory search, and TTS.2115MIT
- AlicenseAqualityDmaintenanceMCP server for controlling Meticulous espresso machines via Claude and other AI clients.22105 npmMIT
- FlicenseNot gradedqualityCmaintenanceMCP server that exposes OPC memory scripts as tools for Claude Code and Claude Desktop.1-