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.
| Name | Required | Description | Default |
|---|---|---|---|
| duid | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
readOnlyHint=true already tells the agent this is a safe non-mutating read. The description adds that the map is 'current' (a snapshot rather than a stream), but says nothing about behavior when the vacuum is offline, image size/resolution, or freshness/caching, so it adds only modest context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero filler; the capability and its contents come first and the parameter prerequisite is appended last. Every clause earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description correctly compensates by enumerating what the PNG contains. For a single-parameter read tool this is nearly complete, with only edge-case behavior (offline vacuum, errors) left unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the lone parameter has no schema-level description, so the description carries the load — and it does explain the parameter's provenance ('Get `duid` from list_devices'). It stops short of specifying the expected format of the identifier.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb (Get) plus resource (current home map of one vacuum) with an explicit return format (PNG image) and enumerated contents (rooms, walls, dock, robot position). This is unmistakable against siblings like get_status or list_devices.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Adds a prerequisite chain by telling the agent to obtain `duid` from list_devices, which is real routing guidance. It does not state when NOT to use it (e.g. vacuum offline) or name a sibling alternative, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_statusARead-only
Get the live status of one device: battery, state, fan speed, errors. Get duid from list_devices.
| Name | Required | Description | Default |
|---|---|---|---|
| duid | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
readOnlyHint=true already declares the safety profile, so the description only needs additive context. 'Live status' usefully signals real-time, non-cached data, but nothing is said about freshness semantics, failure modes for offline devices, or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, no filler, with the resource and returned fields front-loaded before the prerequisite hint. Nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description compensates by listing the returned fields, and it supplies the prerequisite for the undocumented parameter. Only edge-case behavior (offline device, staleness) is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the single `duid` property has no description, so the description carries the burden. It explains where to obtain the duid, which is the one piece of meaning an agent actually needs; format details remain absent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Get the live status of one device') and enumerates the returned fields (battery, state, fan speed, errors), which separates it from list_devices and the action siblings. It never explicitly contrasts with get_map, so it falls short of full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The second sentence ('Get duid from list_devices') gives a concrete prerequisite and routes the agent to the right sibling for obtaining input. There is no statement of when not to use it or when get_map would be preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_devicesARead-only
List the Roborock devices on your account: name, device id, model, online.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
readOnlyHint=true already tells the agent this is a safe read, so the description's main added value is the account scoping ('on your account') and the field list. It says nothing about what happens with multiple accounts, pagination, or device ordering, which is acceptable given the output schema covers the return shape.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that front-loads the action and resource, then lists the returned fields. Nothing is wasted and nothing important trails off.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter read tool with an output schema and readOnlyHint, the description covers what is needed: what is listed and at what scope. Only the relationship to the device-specific siblings is unstated, which is a minor gap for such a simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is no parameter semantics to explain; the baseline of 4 applies. The description correctly implies the call is unscoped by device, which matches the empty input schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('List the Roborock devices') and enumerates the fields surfaced (name, id, model, online). It is distinguishable from the action-oriented siblings (start_cleaning, get_status) by being the account-level enumeration, though it never explicitly says so.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use statement. The agent can infer this is a discovery call that precedes the device-specific siblings, but the description leaves that inference to the reader rather than naming an alternative or prerequisite.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pause_cleaningA
Pause the current cleaning; the vacuum stays where it is. Get duid from list_devices.
| Name | Required | Description | Default |
|---|---|---|---|
| duid | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety profile is covered structurally. The description adds real value by stating the robot holds position rather than resetting, but it omits what happens to the paused job (does it stay paused indefinitely? does it resume via start_cleaning?) — relevant for a state-mutating tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short clauses: the action and its state effect come first, the prerequisite second. No filler, nothing redundant with the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need no explanation, and this is a simple single-parameter tool. The remaining gap is the resumption path after pausing, which an agent may need to plan a sequence.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the single `duid` parameter. It does add the key missing information — where to obtain the value (list_devices) — but says nothing about the expected format or validity, leaving the identifier's shape undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource ("Pause the current cleaning") with an added state consequence ("the vacuum stays where it is") that implicitly distinguishes it from return_to_dock and start_cleaning. It does not explicitly name those siblings, so an agent must infer the contrast rather than being routed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The precondition for the required argument is given explicitly ("Get `duid` from list_devices"), which is genuinely useful routing. However, there is no guidance on when to pause versus returning to dock or letting a run finish, and no mention of how cleaning is resumed afterward.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
return_to_dockA
Send the vacuum back to its charging dock. Get duid from list_devices.
| Name | Required | Description | Default |
|---|---|---|---|
| duid | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety profile is known. The description adds no behavioral context beyond the action itself — it does not say whether an in-progress cleaning job is interrupted, what happens if the vacuum is already docked, or whether the call blocks until docked. With annotations carrying the safety burden, this is a thin but non-contradictory addition.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with the action front-loaded and the parameter-sourcing hint second. Nothing extraneous; every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need no explanation, and the one required parameter is sourced. For a simple state-change command this is nearly complete; only edge-case behavior (already docked, mid-cleaning) is absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% — the single parameter 'duid' is documented only as a bare string with no description. The description compensates by naming the source tool (list_devices) for the value, which is meaningful semantics an agent could not infer from the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Send the vacuum back to its charging dock') that is immediately distinguishable from siblings like start_cleaning, pause_cleaning, and get_status. No ambiguity about what action is performed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides the key prerequisite by telling the agent where to source the required identifier ('Get duid from list_devices'), which is a concrete call-ordering hint. It stops short of stating when to prefer this over alternatives (e.g., vs. pause_cleaning) or any preconditions, so it is clear context but not full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| duid | Yes | ||
| rooms | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds meaningful behavior beyond that, notably that an empty `rooms` resumes a paused cleaning — a non-obvious side effect an agent needs. It also discloses the naming contract for rooms (must match Roborock app names), which prevents failed calls. It does not describe behavior when a clean is already in progress or how errors surface.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with the verb, then the two mode branches, then the prerequisite. Nothing is redundant and no sentence could be dropped without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter mutation tool with an output schema (so return values need not be explained) and non-destructive annotations, the description covers mode selection, parameter sourcing, and naming format. Only edge-case behavior (already cleaning, invalid room name) is left unspecified, which is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% — the schema only gives titles — so the description carries the full burden, and it does: `duid` must come from `list_devices`, and `rooms` is a set of room names as spelled in the Roborock app. Both of the two parameters gain actionable meaning not present in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Start cleaning') and immediately splits the behavior into two clearly described modes: full-home/resume with no `rooms`, versus room-scoped cleaning with `rooms`. It does not explicitly name or contrast the sibling `pause_cleaning`/`return_to_dock`, but the operation is unambiguous on its own.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit conditional guidance: omit `rooms` for the whole home or to resume a paused cleaning, supply `rooms` for targeted cleaning. It also routes the agent to `list_devices` for the required `duid`, which is real cross-tool guidance. No exclusion such as 'do not call while already running' is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
- First observed
get_map - First observed
get_status - First observed
list_devices - First observed
pause_cleaning - First observed
return_to_dock - First observed
start_cleaning
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 gradedqualityBmaintenanceEnables 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.-