WeMo MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Control WeMo smart home devices through AI assistants using natural language.
**mcp-name: io.github.apiarya/wemo**
Table of Contents
- Overview
- Prerequisites
- Quick Start
- Connect
- Configuration
- MCP Tools
- scan_network
- list_devices
- get_device_status
- control_device
- rename_device
- get_homekit_code
- get_cache_info
- clear_cache
- get_configuration
- MCP Capabilities
- Resources
- Prompts
- Elicitations
- How It Works
- Local Control Signal Flow
- Feature Comparison
- Development
- Contributing
- License
- Acknowledgments
Overview
Seamlessly integrate WeMo smart home devices with AI assistants through the Model Context Protocol. Built on pywemo, this server enables natural language control of your WeMo devices with intelligent multi-phase discovery.
Example Usage
*Control WeMo devices through AI assistants with natural language - just ask in plain English!*
*"Goodnight" — one command turns off every device in the house*
Key Features
- **🔍 Smart Discovery** - Multi-phase scanning (UPnP/SSDP + network ports) with 100% reliability
- **⚡ Fast Scanning** - Parallel probes with 60 concurrent workers (~23-30s for full subnet)
- **🎛️ Full Control** - On/off/toggle/brightness control for all device types
- **✏️ Device Management** - Rename devices and extract HomeKit setup codes
- **📊 Real-time Status** - Query device state and brightness
- **💾 Smart Caching** - Persistent device cache with 1-hour TTL survives restarts
- **🔧 Configurable** - YAML config files + environment variables for all settings
- **🔄 Auto-Retry** - Automatic retry with exponential backoff for network errors
- **🛡️ Error Handling** - Detailed error messages with actionable suggestions
- **🔌 Universal** - Works with any MCP client (Claude, VS Code, Cursor, etc.)
- **📡 MCP Resources** - Live device state via devices:// and device://{id} URIs
- **💬 MCP Prompts** - Built-in guided prompts: discover, status report, scene control, troubleshoot
- **🗣️ MCP Elicitations** - Interactive clarification when subnet or device name is ambiguous
---
Prerequisites
All configurations use uvx (from the uv Python package manager) to run the server. Install uv first:
After installation, restart your terminal and verify:
Quick Start
Get started in seconds with Claude Code CLI:
---
Connect
One-Click Installation
Click your client to install instantly:
| Client | Install |
|--------|---------|
| **Claude Desktop** | |
| **Claude Code CLI** | Run: claude mcp add wemo -- uvx wemo-mcp-server |
| **VS Code** | |
| **Cursor** | |
| **Cline** | Manual config (VS Code extension) |
| **Windsurf** | Manual config |
| **Zed** | Manual config |
| **Continue** | Manual config (VS Code extension) |
Manual Configuration
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Restart Claude Desktop after saving.
VS Code
Edit ~/.vscode/mcp.json:
Reload VS Code after saving.
Cursor
Edit ~/.cursor/mcp.json:
Restart Cursor after saving.
Cline
Cline is a VS Code extension. Add to VS Code's settings.json:
Reload VS Code after saving.
Windsurf
Edit ~/.windsurf/mcp.json:
Restart Windsurf after saving.
Zed
Edit ~/.config/zed/settings.json:
Restart Zed after saving.
Continue
Continue is a VS Code extension. Edit ~/.continue/config.json:
Reload VS Code after saving.
---
Configuration
The WeMo MCP Server supports flexible configuration through YAML files and environment variables.
Quick Configuration
The most important setting is your **network subnet** — the server defaults to 192.168.1.0/24 but your devices may be on a different subnet (e.g. 192.168.86.0/24).
Set it directly in your MCP client config using env:
Or export it before starting the server:
**Using Environment Variables** (simplest):
**Using YAML Config File**:
Configuration Options
| Setting | Environment Variable | Default | Description |
|---------|---------------------|---------|-------------|
| **Network** ||||
| Default subnet | WEMO_MCP_DEFAULT_SUBNET | 192.168.1.0/24 | Network to scan for devices |