MCP server for Rachio sprinkler controllers using the reverse-engineered mobile gRPC API
Project description
rachio-mcp
An MCP (Model Context Protocol) server for Rachio sprinkler controllers, built on the reverse-engineered Android-app gRPC API.
The public Rachio API exposes only read-only access to schedules and a handful of single-action endpoints. This server instead talks to the same internal gRPC backend (cloud.rach.io:443) that the official mobile app uses, giving an agent the full set of operations: listing devices and zones, inspecting schedules, creating and previewing new schedules, updating and deleting them, starting and stopping manual zone runs, setting rain delays, and more.
⚠️ Unofficial. This server uses a reverse-engineered API. It works as of Rachio Android v4.21.18 and is not supported by Rachio. The schema can change without notice.
Features
- Devices and zones — list controllers, sensors, and weather stations; inspect zone soil/nozzle/plant configuration and live state
- Schedules — list, read, preview (dry-run), create, update, delete, copy, run, and skip schedules
- Live control — stop watering, run specific zones manually, set rain delays, skip/pause/resume the currently-running zone
- Context — calendar of upcoming and past runs, active alerts, observed/forecast weather readings
Quick Start
1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
2. Mint a long-lived access token
The MCP server itself never sees your Rachio password. Instead you mint a long-lived (~25-year) access token once, and supply only the token to the MCP client.
uvx --from rachio-mcp rachio-mcp-token
It will prompt for your Rachio email and password, then print a RACHIO_ACCESS_TOKEN value to paste into your MCP client config. The token remains valid until you change your password or explicitly log out from another device.
For scripting (e.g. pipe into a password manager):
RACHIO_EMAIL=you@example.com RACHIO_PASSWORD=... \
uvx --from rachio-mcp rachio-mcp-token --json | jq .access_token
3. Configure your MCP client
uvx downloads and runs the server on demand — no separate install step required.
OpenCode (opencode.json)
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"rachio": {
"type": "local",
"command": ["uvx", "rachio-mcp"],
"environment": {
"RACHIO_ACCESS_TOKEN": "{env:RACHIO_ACCESS_TOKEN}"
},
"enabled": true
}
}
}
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"rachio": {
"command": "uvx",
"args": ["rachio-mcp"],
"env": {
"RACHIO_ACCESS_TOKEN": "paste-your-token-here"
}
}
}
}
If a tool call later returns a "token rejected" error, rerun rachio-mcp-token to mint a fresh one and update the config.
Available Tools
23 tools over stdio transport.
Discovery
| Tool | Description |
|---|---|
list_devices |
Every device on the account — controllers, sensors, weather stations |
get_device |
Full details + live state for a single device |
list_zones |
Zones configured on a controller, with agronomic metadata |
get_zone |
Full detail for a single zone |
get_calendar |
Scheduled runs + skip events for a date range |
get_active_alerts |
Unresolved alerts on a device or zone |
get_weather |
Observed + forecast weather readings for a location |
Schedule CRUD
| Tool | Description |
|---|---|
list_schedules |
Filter by device, location, zone, or schedule id |
get_schedule |
Single schedule + its locations/devices |
preview_schedule |
Dry-run — returns the Schedule that create_schedule would produce, including the server-generated human-readable summary. Never persists |
create_schedule |
Create a new schedule |
update_schedule |
Rename or toggle enabled/disabled |
delete_schedule |
Permanent, destructive |
copy_schedule |
Duplicate an existing schedule |
run_schedule |
Trigger an immediate run |
skip_schedule |
Skip or re-arm the next scheduled run |
get_schedule_runs |
Past runs + skip events for a schedule |
Live controller ops
| Tool | Description |
|---|---|
stop_watering |
Stop whatever is running |
start_zones |
Start one or more zones manually by zone number + duration |
set_rain_delay |
Defer all schedules until a given time |
skip_current_zone |
Skip to the next zone in the active run |
pause_watering |
Pause the current zone for N seconds |
resume_watering |
Resume a paused run |
All device_id, zone_id, schedule_id, and location_id parameters are UUIDs obtained from the list_* tools. Dates use YYYY-MM-DD (or MM-DD for annual-recurring schedules); times use HH:MM.
Recommended Workflow for Schedule Changes
list_devices→ pick your controllerlist_zones(device_id=...)→ note each zone's id andzone_numberlist_schedules(device_id=...)andget_schedule(schedule_id=...)→ understand what's already configuredpreview_schedule(...)→ dry-run your proposed schedule. Read the returnedsummarystring and the per-zone breakdowncreate_schedule(...)(same arguments) → commitget_schedule(schedule_id=<new>)→ confirmdelete_schedule(schedule_id=<new>)→ rollback if needed
preview_schedule is safe to call repeatedly — it never writes anything.
How It Works
This server talks to cloud.rach.io:443 over TLS-protected gRPC, the same backend used by the Rachio Android app. Authentication uses the OAuth 2 password grant against oauth.rach.io/oAuth/token with the Android app's hardcoded client credentials.
The gRPC .proto definitions were recovered by decompiling the Rachio Android APK (v4.21.18) with jadx, extracting the embedded FileDescriptorProto payloads from the generated Java classes, and round-tripping them through protoc to produce clean .proto source. Pre-compiled Python stubs for the 40-odd messages/services used by the 23 MCP tools ship in src/rachio_mcp/proto/.
Regenerate those stubs any time the app's proto surface changes:
scripts/build_protos.sh
The stub generator reads from reverse-engineering/protos/, which is not shipped in the wheel but is kept alongside the source for future updates.
Python API
The MCP server wraps a standalone client you can use directly:
from rachio_mcp import RachioClient
c = RachioClient()
# Discovery
for d in c.list_devices():
print(d["type"], d["id"], d.get("name"))
# Preview a proposed schedule
preview = c.preview_schedule(
name="Fall Lawn",
schedule_type="FIXED",
zones=[
{"device_id": "<controller>", "zone_id": "<zone>", "watering_time": 1200},
],
start_time="06:00",
days=["WED"],
annual_start="09-16",
annual_end="11-15",
smart_cycle=True,
)
print(preview["summary"])
# Commit
created = c.create_schedule(name="Fall Lawn", ...)
print("created", created["id"])
# Rollback
c.delete_schedule(created["id"])
The client reads RACHIO_ACCESS_TOKEN from the environment, derives the user's user_id lazily on first use (via LocationService.ListLocations), and keeps both in memory for the lifetime of the process. Nothing is written to disk.
Environment
| Variable | Required | Description |
|---|---|---|
RACHIO_ACCESS_TOKEN |
Yes | Long-lived bearer token minted by rachio-mcp-token. Valid for ~25 years unless revoked. |
LOG_LEVEL |
No | Python logging level (default: INFO). Logs go to stderr; stdio transport's stdout is reserved for the MCP protocol. |
Minting a token (one-time setup)
| Variable | Used by | Description |
|---|---|---|
RACHIO_EMAIL |
rachio-mcp-token only |
Rachio account email. If unset, rachio-mcp-token prompts interactively. |
RACHIO_PASSWORD |
rachio-mcp-token only |
Rachio account password. If unset, rachio-mcp-token prompts interactively with a masked input. |
Neither RACHIO_EMAIL nor RACHIO_PASSWORD is ever read by the MCP server itself — they exist only to feed the one-time token-mint CLI.
Transport
stdio only. Remote HTTP with OAuth 2.1 is not supported in v0.1.
Releasing
Publishing is fully automated via GitHub Actions: tagging a release on GitHub builds the wheel, uploads it to PyPI (via trusted publishing, no API tokens stored), and pushes server.json to the MCP Registry.
Cut a release
- Locally, before pushing:
uv run ruff checkanduv run ruff format --check. CI will reject PRs that don't pass. - Push the release commit to
main. - On GitHub, Releases → Draft a new release. Tag:
vX.Y.Z(e.g.v0.1.0). The leadingvis required; the workflow strips it. - Publish release.
.github/workflows/publish.ymlruns automatically:- Rewrites
pyproject.tomlandserver.jsontoX.Y.Z uv build→dist/*.whl+dist/*.tar.gz- Uploads to PyPI via OIDC trusted publishing
- Uploads
server.jsonto the MCP Registry via GitHub OIDC
- Rewrites
One-time setup (before the first release)
- Create a PyPI pending publisher. Go to pypi.org/manage/account/publishing/ and add a new pending publisher:
- PyPI Project Name:
rachio-mcp - Owner:
rwestergren - Repository:
rachio-mcp - Workflow:
publish.yml - Environment:
release
- PyPI Project Name:
- Create a GitHub Environment. In the repo's Settings → Environments, add an environment named
release. Optional: require a reviewer before a release can publish. - MCP Registry namespace (
io.github.rwestergren/rachio-mcp) is auto-claimed by the first successfulmcp-publisher login github-oidcfrom this repo. No manual registration needed.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rachio_mcp-0.1.0.tar.gz.
File metadata
- Download URL: rachio_mcp-0.1.0.tar.gz
- Upload date:
- Size: 114.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe35db038f095c7288e0c7141558a14862ef2d15952bb61fed05491daacdfc9f
|
|
| MD5 |
8083a0d859de2efd8b159541257f9bfa
|
|
| BLAKE2b-256 |
90ec79204acb06e820baa26c10d177a40b8916d91bdf077cff8a2c8e1054cd11
|
Provenance
The following attestation bundles were made for rachio_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on rwestergren/rachio-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rachio_mcp-0.1.0.tar.gz -
Subject digest:
fe35db038f095c7288e0c7141558a14862ef2d15952bb61fed05491daacdfc9f - Sigstore transparency entry: 1389825684
- Sigstore integration time:
-
Permalink:
rwestergren/rachio-mcp@3f77fe90be9c2c1103d22d305cf3e4eb1011f72a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rwestergren
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f77fe90be9c2c1103d22d305cf3e4eb1011f72a -
Trigger Event:
release
-
Statement type:
File details
Details for the file rachio_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rachio_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 191.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fe6d546702b7eb3244a7ebfeb138f66347c8b7398ae9b125098231f3ec12115
|
|
| MD5 |
a5dd3d1957315c8072b32781b8283b96
|
|
| BLAKE2b-256 |
704493e63e126388987ca4bb078c0e92f1f2eb354ba39870eac7f58ffff46f5d
|
Provenance
The following attestation bundles were made for rachio_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on rwestergren/rachio-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rachio_mcp-0.1.0-py3-none-any.whl -
Subject digest:
3fe6d546702b7eb3244a7ebfeb138f66347c8b7398ae9b125098231f3ec12115 - Sigstore transparency entry: 1389825826
- Sigstore integration time:
-
Permalink:
rwestergren/rachio-mcp@3f77fe90be9c2c1103d22d305cf3e4eb1011f72a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rwestergren
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f77fe90be9c2c1103d22d305cf3e4eb1011f72a -
Trigger Event:
release
-
Statement type: