# Ecovacs-MCP控制服务器
## 基本信息
- Slug: `ecovacs-ai-ecovacs-mcp`
- Source: modelscope
- Publisher: @ecovacs-ai/ecovacs-mcp
- Categories: home-automation-and-iot / autonomous-agents / agent-orchestration
- Hosted: No
- License: MIT License
- Source URL: https://www.modelscope.cn/mcp/servers/@ecovacs-ai/ecovacs-mcp
## 简介
一个控制服务器，通过MCP协议使AI助手能够与Ecovacs扫地机器人交互，支持设备列表、清洁控制、充电控制和状态查询。
## MCP Server 详情

# Sweeping Robot Control MCP Server

[English](README_EN.md) | Chinese

Ecovacs core APIs are now fully compatible with the MCP protocol, making Ecovacs the world's first robot service provider to support the MCP protocol.

Ecovacs has completed the integration of 4 core API interfaces with the MCP protocol, including device list query, cleaning control, recharging control, and working status query.

As the world's first cleaning robot service provider supporting the MCP protocol, after the release of the Ecovacs MCP Server, intelligent agent developers only need simple configurations to quickly integrate robot services into large models, achieving capabilities such as querying, cleaning, and recharging.

This significantly lowers the barrier for calling robot control services during the development process of intelligent agent applications, greatly improving the efficiency of application development.

## Tools

### Device List Query

Obtain a list of all robots bound by the user.

#### Input:

No parameters

#### Returns:

json
{
  "status": 0,
  "message": "success",
  "data": [
    {
      "nickname": "Robot Nickname",
    }
  ]
}


### Start Cleaning

Control the sweeping robot to start, pause, resume, or stop cleaning.

#### Input:

- `nickname`: The nickname of the robot, used to find the device. Supports fuzzy matching.
- `act`: Cleaning action
  - `s`: Start cleaning
  - `r`: Resume cleaning
  - `p`: Pause cleaning
  - `h`: Stop cleaning

#### Returns:

json
{
  "msg": "OK",
  "code": 0,
  "data": []
}


### Recharge Control

Control the robot to start or stop recharging.

#### Input:

- `nickname`: The nickname of the robot, used to find the device.
- `act`: Robot action
  - `go-start`: Start recharging
  - `stopGo`: Stop recharging

#### Returns:

json
{
  "msg": "OK",
  "code": 0,
  "data": []
}


### Query Working Status

Query the current working status of the robot.

#### Input:

- `nickname`: The nickname of the robot, used to find the device.

#### Returns:

json
{
	"code": 0,
	"msg": "success",
	"data": {
		"ctl": {
			"data": {
				"ret": "ok",
				"cleanSt": "h",
				"chargeSt": "charging",
				"stationSt": "i"
			}
		}
	}
}


**Status Code Explanation:**

| Parameter Name | Type   | Description                                                                                                                                                                                                                                                                      |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cleanSt        | string | Cleaning status, present when the request is successful. s- cleaning, p- paused, h- idle, goposition- going to a specified location, gopositionpause- stopped at a specified point, findpet- finding pet, findpetpause- finding pet paused, cruise- cruising, cruisepause- cruising paused, buildmap- building map, buildmappause- building map paused |
| chargeSt       | string | Charging status, present when the request is successful. g- returning to charge, gp- charging paused, i- idle, sc- dock charging, wc- wired charging, charging- charging (including SC and WC)                                                                                      |
| stationSt      | string | Base station status, i- idle, wash- washing mop, dry- drying, drypause- drying paused, dust- dust collecting, dustpause- dust collecting paused, clean- base station cleaning, cleanpause- base station cleaning paused, wash- washing mop, washpause- washing mop paused              |

## Getting Started

## Installation

### Local Installation via GitHub

bash
git clone git@github.com:ecovacs-ai/ecovacs-mcp.git

uv add "mcp[cli]" mcp requests

uv run ecovacs_mcp/robot_mcp_stdio.py


### Via PyPI


pip install ecovacs-robot-mcp

python3 -m ecovacs_robot_mcp


## Environment Variables

- `ECO_API_KEY`: API access key, used to verify interface call permissions.
- `ECO_API_URL`: API HOST
  - Mainland China: `https://open.ecovacs.cn`
  - Non-Mainland China: `https://open.ecovacs.com`

## Obtain AK & Delete AKBefore choosing between the two methods (local or SSE), you need to create a server-side AK in the [Ecovacs Open Platform console](https://open.ecovacs.cn). Only with the AK can you call the robot's API capabilities.

If you want to revoke authorization, you can also remove the AK authorization in the [Ecovacs Open Platform console](https://open.ecovacs.cn).

Ecovacs Open Platform (Mainland China): https://open.ecovacs.cn

Ecovacs Open Platform (Non-Mainland China): https://open.ecovacs.com

<img src="images/img_v3_02lo_b450632b-9dbe-4cd9-aead-c625ad3458fg.jpg" alt="Get AK" width="600" />

## Configuration

Add the following configuration in any MCP client (e.g., Claude.app). Some clients may require formatting adjustments.

Where `ECO_API_KEY` is the API access key and `ECO_API_URL` is the API HOST.

- Using uvx
json
{
  "mcpServers": {
    "ecovacs_mcp": {
      "command": "uvx",
      "args": ["ecovacs-robot-mcp"],
      "env": {
        "ECO_API_KEY": "your AK...........",
        "ECO_API_URL": "https://open.ecovacs.cn" // For non-Mainland China, configure as https://open.ecovacs.com
      }
    }
  }
}


- Using pip installation

json
{
  "mcpServers": {
    "ecovacs_mcp": {
      "command": "python",
      "args": ["-m", "ecovacs-robot-mcp"],
      "env": {
          "ECO_API_KEY": "your AK...........",
          "ECO_API_URL": "https://open.ecovacs.cn" // For non-Mainland China, configure as https://open.ecovacs.com
      }
    }
  }
}


## Usage Example (Claude Example)

Open the Settings in Claude for Desktop, switch to Developer, click Edit Config, and open the configuration file with any IDE.

<img src="images/img_v3_02l…

