AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Midea Mcp

mcp-caroliny1031-midea-mcp · by caroliny1031

A safety-first MCP server for Midea air conditioners. LAN-preferred, cloud fallback.

No reviews yet
0 installs
19 views
0.0% view→install

Install

$ agentstack add mcp-caroliny1031-midea-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-caroliny1031-midea-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
13d ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Midea Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

midea-mcp

面向美的空调的本地单用户 MCP Server。MVP 使用 Python 3.12、MCP Python SDK `>=1.27,/.storage/mideaaclan/.json


可导入单个文件、整个 `midea_ac_lan` 目录,也可导入 HA
`.storage/core.config_entries`:

```powershell
.\.venv\Scripts\midea-mcp.exe import-ha C:\path\to\123456789.json

导入器仅接受设备类型 0xAC、协议版本 V3,并将 Token/Key 立即加密后保存。

3. 可选的 Cloud 库存及 Token/Key 补取

不要把账号密码写入命令行历史:

$env:MIDEA_ACCOUNT = "your-account"
$env:MIDEA_PASSWORD = "your-password"
$env:MIDEA_CLOUD_NAME = "美的美居"
.\.venv\Scripts\midea-mcp.exe sync-cloud

旧 Token API 正在被美的关闭,因此该步骤可能无法取得新凭证。已有 HA 凭证优先且 不会被云端候选覆盖。Cloud/LAN 只有在 SN fingerprint 唯一匹配时才合并为同一设备。

sync-cloud 同时会登记 Cloud binding。部署在无法访问家庭局域网的服务器时,应在 启动 MCP Server 前至少执行一次该命令;之后 refresh_deviceset_device_state 会通过 Cloud 路由工作。

4. 加密备份

.\.venv\Scripts\midea-mcp.exe backup-credentials C:\safe\midea.backup.json
.\.venv\Scripts\midea-mcp.exe restore-credentials C:\safe\midea.backup.json

备份使用独立口令通过 scrypt 派生密钥,再使用 AES-256-GCM 加密。

启动 MCP Server

.\.venv\Scripts\midea-mcp-server.exe

客户端配置示例:

{
  "mcpServers": {
    "midea": {
      "command": "C:\\path\\to\\midea-mcp\\.venv\\Scripts\\midea-mcp-server.exe",
      "env": {
        "MIDEA_MCP_DATA_DIR": "C:\\path\\to\\midea-mcp\\data"
      }
    }
  }
}

控制参数

set_device_state 只接受:

{
  "device_id": "midea-mcp-internal-uuid",
  "changes": {
    "power": true,
    "mode": "cool",
    "target_temperature": 26
  }
}

模式为 off / auto / cool / dry / heat / fan_only,目标温度默认限制 为 17–30°C,步长 0.5°C。power=false 不能与模式或温度同时提交。

当前不做

  • 热水器、烤箱及其他设备品类
  • 场景和 execute_scene
  • Home Assistant Provider
  • 多用户或公网认证

测试

.\.venv\Scripts\python.exe -m pytest
.\.venv\Scripts\python.exe -m ruff check .

测试使用模拟 Provider,不会控制真实设备。实机写入只通过显式调用 set_device_state 发生。

本次 Phase 0 与实机验收结果见 [PHASE0.md](PHASE0.md)。项目已发现并登记 一台 V3 空调,通过云端 Token API 候选完成 LAN 认证,并实际验证开关、模式 和温度控制。验收结束后设备已恢复为关机、25°C。

Acknowledgments

Unofficial community project, not affiliated with Midea Group.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.