This project provides a Model Context Protocol (MCP) server wrapper around the esp-rainmaker-cli
Python library. It allows MCP-compatible clients (like LLMs or applications such as Cursor, Claude Desktop, and Windsurf) to interact with your ESP RainMaker devices using the official CLI.
The Model Context Protocol (MCP) is a standardized framework that enables AI systems to interact with external tools, data sources, and services in a unified manner. Introduced by Anthropic and adopted by major AI organizations, MCP acts as a universal interface, much like USB-C for hardware, allowing seamless integration across different platforms.
Key Benefits of MCP in ESP RainMakerBy integrating MCP, the ESP RainMaker platform enhances its capabilities, allowing tools like Claude, Cursor, Windsurf, and Gemini CLI to manage IoT devices efficiently and securely.
uv
Python package manager. Install from Astral's uv documentation.esp-rainmaker-cli login
command in your terminal at least once. This server relies on the credentials saved by that process.Clone the Repository:
git clone https://github.com/espressif/esp-rainmaker-mcp.git cd esp-rainmaker-mcp
Install Dependencies using uv: This command installs esp-rainmaker-cli
, mcp[cli]
, and any other dependencies listed in pyproject.toml
into a virtual environment managed by uv
.
(This assumes uv
is installed)
Login to ESP Rainmaker using esp-rainmaker-cli
uv run esp-rainmaker-cli login
Note
Direct login via username/password within MCP is not supported for security reasons. Please use the standard CLI login flow first.
To add this project as an MCP server in supported MCP clients (Cursor, Claude Desktop, Windsurf, and Gemini CLI), you'll need to add the same JSON configuration to each client's config file. The configuration is identical across all clients:
MCP Server Configuration (All Clients)Use the following JSON configuration for all MCP clients:
{ "mcpServers": { "ESP-RainMaker-MCP": { "command": "uv", "args": [ "run", "--with", "esp-rainmaker-cli", "--with", "mcp[cli]", "mcp", "run", "<absolute_path_to_repo>/server.py" ] } } }
Important
Replace <absolute_path_to_repo>/server.py
with the actual absolute path to the server.py
file within the cloned esp-rainmaker-mcp
directory on your system.
Open Cursor and click on the settings (gear icon) at the top right.
Navigate to "Tools & Integrations" from the settings menu.
Click on "MCP Tools" in the integrations section.
Click on "New MCP Server" to add a new server.
This will open the mcp.json file. Add the JSON configuration shown above.
Open Claude Desktop and go to Settings -> Developer -> Edit Config.
This will open the configuration file (claude_desktop_config.json). Add the JSON configuration shown above.
Save the changes and restart Claude Desktop to apply the new settings.
Open Windsurf and look for the hammer-type icon under the chat text input area.
Click on the hammer icon and select "Configure" from the options. This will open the plugins window.
Click on "View raw config" which will show you the ~/.codium/windsurf/mcp_config.json
file.
Add the JSON configuration shown above to the file.
Save the changes and click on "Refresh" under the chat text window to load the ESP RainMaker MCP tools.
~/.gemini/settings.json
.settings.json
file in your preferred text editor.mcpServers
section of the file. If the section does not exist, create it as shown in the example.Note
The configuration for all four applications (Cursor, Claude Desktop, Windsurf, and Gemini CLI) is the same, so you can use the same JSON structure for all of them.
Note
The --with
arguments ensure uv
includes the necessary dependencies when running the mcp run
command.
This server acts as a bridge. It uses the mcp
library to handle the Model Context Protocol communication. When a tool is called:
esp-rainmaker-cli
library.This MCP server exposes the following tools for interacting with ESP RainMaker:
Authentication & Configurationlogin_instructions()
:
esp-rainmaker-cli login
command in your terminal. This server relies on the external CLI's browser-based login flow to securely store credentials. Rendering as Markdown depends on the MCP client's capabilities.check_login_status()
:
esp-rainmaker-cli
. Confirms if the server can communicate with the ESP RainMaker backend.get_nodes()
:
get_node_details(node_id: str = None, fields: str = None, name: str = None, type_: str = None)
:
fields
: comma-separated list of fields to include (e.g. "node_id,name,type,config,params,status.connectivity,fw_version,mapping_timestamp")name
: substring match (user-visible name from params)type_
: substring match (device type)node_id
: single node ID (for one node) or None (for all)get_node_details(ctx, fields="node_id,name,type")
get_node_status(node_id: str)
:
get_params(node_id: str)
:
set_params(node_id: str, params_dict: dict)
:
node_id
: Single ID or comma-separated list (e.g., "light1,light2")params_dict
: Parameters to set, e.g., {"Light": {"Power": true}}
get_schedules(node_id: str)
:
set_schedule(node_id: str, operation: str, ...)
:
operation
: "add", "edit", "remove", "enable", or "disable"name
, trigger
, and action
{"m": 480, "d": 127}
{"m": 1110, "d": 31}
{"Light": {"Power": true}}
create_group(name: str, group_type: str = None, ...)
:
name
, group_type
("home" or "room")parent_group_id
requiredcreate_group("Living Room", "room", parent_group_id="home_id")
get_group_details(group_id: str = None, include_nodes: bool = False)
:
group_id=None
.include_nodes=True
to include device details.update_group(group_id: str, ...)
:
name
, description
, add_nodes
, remove_nodes
update_group("group_id", name="New Name")
update_group("group_id", add_nodes="light1,light2")
add_device_to_room(device_node_id: str, room_group_id: str)
:
add_device_to_room("light1", "kitchen_id")
This project is licensed under the terms specified in the LICENSE file.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4