roborock-mcp
roborock-mcp
MCP server for Roborock vacuums, built on python-roborock. Ask your AI assistant for the vacuum's status, a labelled map of your home, or to clean only the kitchen.
Unofficial project, not affiliated with Roborock.
Tools
Tool | What it does |
| Devices on your account: name, |
| Live status of one device (battery, state, fan speed, errors) |
| Current home map as a PNG image, with each room's name written on it |
| Clean the whole home, or only the given |
| Pause the current cleaning |
| Send the vacuum back to its charging dock |
Supported: vacuums that use Roborock's V1 protocol (S, Q5, Q7 Max series and similar).
Other models show up in list_devices but the other tools return "not supported yet".
Related MCP server: Roborock MCP Server
Setup
Needs uv and git. uv downloads Python 3.12+ if you do not have it.
Log in once. Roborock sends a code to your email; type it in:
uvx --from git+https://github.com/anilsrml/roborock-mcp roborock login --email you@example.comThis writes your token to
~/.roborock. Keep that file private (chmod 600 ~/.roborock).Add the server to your MCP client.
Claude Code:
claude mcp add roborock -s user -- uvx --from git+https://github.com/anilsrml/roborock-mcp roborock-mcpClaude Desktop, Cursor and other clients (JSON config):
{ "mcpServers": { "roborock": { "command": "uvx", "args": ["--from", "git+https://github.com/anilsrml/roborock-mcp", "roborock-mcp"] } } }Restart your MCP client and ask in plain language:
"Is my vacuum charging? How much battery does it have?"
"Show me the map of my home."
"Clean only the kitchen and the living room."
"Pause the vacuum." / "Send it back to the dock."
How it works
flowchart LR
A[AI assistant] -- MCP stdio --> S[roborock-mcp]
S -- reads --> L["~/.roborock<br/>(login token)"]
S -- python-roborock --> C[Roborock cloud]
S -- "python-roborock<br/>(local network or MQTT)" --> V[Your vacuum]roborock login(from python-roborock) logs in with the email code and saves your token to~/.roborock. There is no password; the server only reads this token.On the first tool call the server reads that file and asks the Roborock cloud for your home: devices, rooms, local keys. It saves this to
~/.roborock-mcp.cache, because the cloud allows only 5 of these requests per hour.Each tool call goes to the vacuum through python-roborock, which picks the connection itself: your local network when it can reach the vacuum, otherwise Roborock's MQTT cloud.
Rooms:
get_mapdraws the map as a PNG and writes each room's name on it, so you can see which names to use.start_cleaningwithroomsturns those names into the vacuum's room ids and starts a room cleaning.
Development
git clone https://github.com/anilsrml/roborock-mcp.git
cd roborock-mcp
uv run pytestLicense
MIT
Available Tools
6 toolsget_mapARead-only
Get the current home map of one vacuum as a PNG image: rooms, walls, dock, robot position. Get duid from list_devices.
Inputs: duid (required).
get_statusARead-only
Get the live status of one device: battery, state, fan speed, errors. Get duid from list_devices.
Inputs: duid (required).
list_devicesARead-only
List the Roborock devices on your account: name, device id, model, online.
Inputs: no named parameters. Returns: result
pause_cleaningA
Pause the current cleaning; the vacuum stays where it is. Get duid from list_devices.
Inputs: duid (required). Returns: result
return_to_dockA
Send the vacuum back to its charging dock. Get duid from list_devices.
Inputs: duid (required). Returns: result
start_cleaningA
Start cleaning. Without rooms: the whole home (or resume a paused cleaning).
With rooms: only those rooms, by the names used in the Roborock app. Get duid from list_devices.
Inputs: duid (required), rooms. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool maps to a distinct action on a distinct resource: device discovery, status, map, start, pause, and dock return. There is no meaningful overlap; the only nuance is that start_cleaning can resume a paused cleaning, which is explicitly documented.
All six tools follow a strict verb_noun snake_case pattern (list_devices, get_status, get_map, start_cleaning, pause_cleaning, return_to_dock). No mixed conventions or vague verbs.
Six tools is well-scoped for a vacuum control server, covering discovery, observability, and core cleaning commands without bloat or thinness. Each tool earns its place.
The cleaning lifecycle is essentially covered (list, status, map, start/resume, pause, dock), but there is no explicit stop_cleaning to end a job without docking, and no way to set fan speed or manage schedules/consumables. These are minor gaps an agent can work around by returning to dock.
Maintenance
Related MCP Connectors
Control a Loxone Miniserver smart home: lights, blinds, climate, scenes and energy.
Control your Tesla from your AI assistant - climate, charging, access, and security.
Control your existing Philips lights, Sonos speakers, Roborock vacuums and other supported devices through Port OS cloud. Give ChatGPT, Claude and other MCP-compatible assistants access to the devices you connect. Turn off the living room lights, play music on your speakers, adjust the thermostat, run a vacuum in a room, check a camera snapshot or find a connected tracker. Available actions depend on your linked provider accounts and each device’s supported capabilities. Port OS runs in the cloud; no local server is required. You choose the account, device and capability permissions each assistant receives. Device operations require user OAuth; public tool discovery does not grant device access. Port OS is in alpha. Setup: https://portoperatingsystem.com/docs/getting-started/ Support: https://portoperatingsystem.com/contact/
Control your Philips lights, Sonos speakers, Roborock vacuums and more with Port OS cloud.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables control of Tuvio/Tuya robot vacuum cleaners via a local hub, supporting commands such as start, pause, home, set mode, suction, water level, and more.-
- FlicenseNot gradedqualityDmaintenanceEnables Claude to control a Roborock vacuum via natural language, supporting commands like start, pause, dock, get status, and clean specific rooms.-
- AlicenseNot gradedqualityBmaintenanceEnables control and monitoring of a Dreame robot vacuum via MCP tools, including cleaning, status, and map viewing through the cloud API.7MIT
- FlicenseNot gradedqualityCmaintenanceEnables voice control of a Dreame robot vacuum via Matter using a Pebble Index ring, with tools for checking status, listing rooms and modes, starting/stopping cleaning, and docking.-