rainbird-mcp
Enables natural-language control and monitoring of Rain Bird ESP-TM2 irrigation controllers over a local LAN, including starting zones, running programs, setting rain delays, and checking status.
README
<p align="center"> <img src="assets/logo.svg" width="128" alt="rainbird-mcp logo"> </p>
<h1 align="center">rainbird-mcp</h1>
<p align="center"> An <a href="https://modelcontextprotocol.io">MCP</a> server for <b>Rain Bird</b> irrigation controllers (ESP-TM2 and compatible) that talk over a local <b>LNK / LNK2 WiFi module</b>. <br>Local LAN only — no cloud dependency. </p>
What it does
Exposes your Rain Bird controller to any MCP client (Claude Code, Claude Desktop, etc.) so you can ask things like "is the sprinkler running?", "run zone 3 for 10 minutes", or "set a 2-day rain delay" in natural language.
It speaks the controller's local encrypted SIP-command protocol via
pyrainbird — the same protocol the
Rain Bird mobile app uses on your LAN.
Tools
| Tool | Purpose |
|---|---|
list_controllers |
configured controllers, hosts, and detected transport URL |
get_controller_info |
model, firmware version, serial number |
get_status |
one-shot: irrigating?, active zones, remaining runtime, rain sensor, rain delay, clock |
get_zone_states |
per-zone on/off map |
get_schedule |
programs, run days, start times, per-zone durations |
get_rain_delay |
remaining rain delay in days |
get_network_info |
LNK WiFi status and parameters |
start_zone |
run one zone for N minutes (validated against available zones) |
stop_irrigation |
stop everything now |
advance_zone |
skip to the next zone in the running program |
set_rain_delay |
set/clear rain delay (0–14 days) |
run_program |
start stored program 1–4 (A/B/C on the TM2) |
sync_clock |
push this machine's local date/time to the controller |
Requirements
- Python 3.12+
uv- A Rain Bird controller with an LNK/LNK2 WiFi module on the same reachable network
- The controller's device password (see below)
Install
git clone https://github.com/rudy325/rainbird-mcp.git
cd rainbird-mcp
uv sync
Configure
The password is the controller's device password — set/shown in the Rain Bird app under the controller's settings. It is not your WiFi password and not your Rain Bird account login. If you don't know it, remove and re-add the WiFi module in the app to set a new one (this keeps your zones and schedules).
Single controller:
export RAINBIRD_HOST=192.168.1.50
export RAINBIRD_PASSWORD=your-device-password
Multiple controllers (each tool then takes an optional controller argument, required
when more than one is configured):
export RAINBIRD_CONTROLLERS='{"front":{"host":"192.168.1.50","password":"pw1"},
"back":{"host":"192.168.1.51","password":"pw2"}}'
See .env.example for all variables.
Register with Claude Code
claude mcp add rainbird \
--env RAINBIRD_HOST=192.168.1.50 \
--env RAINBIRD_PASSWORD=your-device-password \
-- uv --directory /path/to/rainbird-mcp run server.py
Or with Claude Desktop, in claude_desktop_config.json:
{
"mcpServers": {
"rainbird": {
"command": "uv",
"args": ["--directory", "/path/to/rainbird-mcp", "run", "server.py"],
"env": {
"RAINBIRD_HOST": "192.168.1.50",
"RAINBIRD_PASSWORD": "your-device-password"
}
}
}
}
Use with other clients (OpenAI, local models, etc.)
This is a standard MCP server — it speaks the open protocol over stdio and doesn't care which model or client drives it. Anything that supports MCP works:
- OpenAI — the Agents SDK and
Responses API accept MCP servers. Point them at:
command: "uv",args: ["--directory", "/path/to/rainbird-mcp", "run", "server.py"], withRAINBIRD_HOST/RAINBIRD_PASSWORDin the environment. - Local / open-source models — via any MCP-capable client (Cline, Continue, LibreChat, Open WebUI, Goose, Zed, Cursor) running Ollama, Llama, Qwen, etc.
- Any other MCP client — same stdio command as the Claude examples above.
The only requirement is a model that's competent at tool/function calling; the large hosted models and stronger local ones (Llama 3.1+, Qwen 2.5+) handle it well.
Transport (HTTP vs HTTPS)
Newer LNK modules (certificate CN fw-cc20.rainbird.com) serve the SIP endpoint over
HTTPS on port 443 and refuse port 80, with a self-signed Rain Bird certificate.
Older modules are plain HTTP on 80. pyrainbird hardcodes http://, so this server
probes 443 then 80 per host and rewrites the client URL accordingly. Certificate
verification is disabled — the device is LAN-local, addressed by IP, and its certificate
is self-signed by Rain Bird, so verification cannot succeed.
Skip the probe by forcing it: RAINBIRD_SCHEME=https (or http).
Notes & gotchas
- One connection at a time. The LNK module accepts a single connection; expect slow or failed calls if the Rain Bird mobile app is open against the same controller.
- WiFi quality matters. The module is 2.4 GHz WiFi 4, 1×1. A weak signal shows up as intermittent timeouts, not clean errors. Check RSSI / TX retries in your AP if calls are flaky.
run_programuses theManuallyRunProgramRequestSIP command; some firmware revisions NACK it. If it fails, drive zones individually withstart_zone.- The controller clock drifts and has no NTP.
sync_clockis worth running occasionally. - Isolated IoT VLANs (UniFi and similar). If the controller is on an isolated VLAN, the router's isolation feature typically drops the controller's replies to your LAN, which no user "allow" rule reliably overrides. Disabling isolation on that network (and optionally re-adding your own outbound-only block rule) is what actually restores access.
How it fits together
MCP client ──stdio──> server.py ──pyrainbird──> HTTP(S) /stick ──> LNK WiFi module ──> controller
Credits
pyrainbird— the protocol implementation.- Model Context Protocol — the server framework.
License
MIT. Not affiliated with or endorsed by Rain Bird Corporation. "Rain Bird" is a trademark of Rain Bird Corporation.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。