baseline-mcp
Enables read-only interaction with Baseline irrigation controllers, including status, alarms, and historical reporting.
README
baseline-mcp
An MCP server for the Baseline / BaseManager irrigation controller system at baselineapps.net.
Scope: read-only. Status, alarms, and reporting. No watering/control or schedule-edit endpoints are exposed.
Tools
| Tool | What it returns |
|---|---|
baseline_whoami |
Logged-in user, access level, company, assigned controller ids. |
baseline_list_companies |
Organizations this account can access (for multi-org accounts). |
baseline_list_controllers |
Sites and controllers across all accessible organizations, with model, firmware, subscription, and device counts. |
baseline_get_status |
Live snapshot: controller + per-zone + per-device status codes and decoded sensor readings. |
baseline_list_zones |
Zone config: number, name, decoder, enabled, designed/learned flow, hydrozone agronomy. |
baseline_get_alarms |
Active alarms/faults, decoded (sender device + fault type). includeCleared to show resolved. |
baseline_get_announcements |
Vendor maintenance banners as plain text. |
baseline_list_devices |
Enumerate all devices by type (zones, flow meters, sensors, valves, pumps…), each with the reportingSn used for live/history. |
baseline_get_programs |
Watering programs with last/next start & finish, duration, water used, and assigned zones. |
baseline_get_live |
Current live reading for one device by serial — pressure (PSI), flow (water usage), moisture (%VWC), zone/valve/pump run state. |
baseline_get_history |
Modern reporting time-series for one device — historical pressure, moisture, temperature, flow, or zone runtime — with max/min/avg/median + points. |
baseline_get_report |
Legacy time-series report (water usage, runtimes, moisture, flow) as timestamp/value points. |
Core model: enumerate → live or history
The intended workflow is enumerate objects, then ask for live or historical data on one:
baseline_list_devices(orbaseline_get_programs) → each object carries areportingSn.baseline_get_live{ deviceSn }→ its current reading.baseline_get_history{ kind, deviceSn, from, to, granularity }→ its trend.
deviceSn is the same key for both: a sensor/meter serialNumber, or a zone decoderSN.
baseline_get_history uses the newer Analytics reporting API (/baseservice2/reporting/…)
and is the only source for historical pressure. baseline_get_report is the older
getData.php path, kept for water-usage/runtime aggregates.
Accounts, organizations & controllers
A controller is the primary key for every data tool; organizations (companies) are a grouping.
Some accounts can access multiple organizations and controllers. Tools that take a
controllerId resolve it in this order:
- the explicit
controllerIdargument, else - the
BASELINE_CONTROLLER_IDenv default, else - the sole accessible controller (when there's exactly one).
If several controllers are accessible and none is specified, the tool returns the list so you
can pick one. baseline_list_companies → baseline_list_controllers enumerates everything.
Set BASELINE_COMPANY_ID to restrict enumeration to one organization, and/or
BASELINE_CONTROLLER_ID to pin a default controller.
Report types
baseline_get_report accepts: WaterUsage, ZoneRuntimes, ZonesActivity,
ControllerActivity, MoistureLevels, Temperature, FlowMeterTotals,
RainfallAccumulation, MeasuredFlow, ExpectedFlow. Dates are YYYY-MM-DD HH:mm;
resolution is daily or hourly; pass id to scope to a single zone/device.
Setup
npm install # also builds via the prepare hook
npm run build # or build explicitly
Provide credentials via environment variables (BASELINE_USERNAME, BASELINE_PASSWORD).
The server logs in lazily, caches the SID session cookie, and re-authenticates on expiry.
Register with an MCP client
Claude Code / Claude Desktop (claude_desktop_config.json or .mcp.json):
{
"mcpServers": {
"baseline": {
"command": "node",
"args": ["/absolute/path/to/baseline-mcp/dist/index.js"],
"env": {
"BASELINE_USERNAME": "your-username",
"BASELINE_PASSWORD": "your-password"
}
}
}
}
Or with the Claude Code CLI:
claude mcp add baseline \
-e BASELINE_USERNAME=your-username \
-e BASELINE_PASSWORD=your-password \
-- node /absolute/path/to/baseline-mcp/dist/index.js
Verify
# Exercise the HTTP client against the live API (read-only):
BASELINE_USERNAME=... BASELINE_PASSWORD=... npm run smoke
# Exercise the MCP protocol layer (spawns the server, lists + calls tools):
BASELINE_USERNAME=... BASELINE_PASSWORD=... npm run mcp-check
Notes & caveats
- Lenient HTTP parsing. Baseline returns a malformed multi-line
Content-Security-Policyheader that Node's defaultfetch/undici parser rejects. The client usesnode:httpswithinsecureHTTPParser: trueto tolerate it (browsers do the same). TLS verification stays on. - Inferred codes. Status-key meanings (
VA,VP,VR, …) and alarm suffixes were inferred from observed data, not vendor docs. Decoders always include the raw code, andstatusTextis passed through verbatim. Seesrc/codes.ts. - Endpoints are unofficial and may change without notice.
Project layout
src/
index.ts MCP server + tool definitions
client.ts BaselineClient: session lifecycle, JSON + report fetches
http.ts node:https transport (lenient parser)
format.ts payload-shaping helpers
codes.ts status / alarm / device code decode tables
scripts/
smoke.ts live API smoke test
mcp-check.ts MCP protocol smoke test
research/
API-REFERENCE.md API observations
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。