home / mcp / wemo mcp server

WeMo MCP Server

Provides WeMo device discovery, status, and control via MCP for AI assistants.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "apiarya-wemo-mcp-server": {
      "command": "uvx",
      "args": [
        "wemo-mcp-server"
      ],
      "env": {
        "WEMO_MCP_CACHE_TTL": "3600",
        "WEMO_MCP_LOG_LEVEL": "INFO",
        "WEMO_MCP_DEFAULT_SUBNET": "192.168.1.0/24"
      }
    }
  }
}

You can centrally control WeMo smart home devices by running a dedicated MCP server that translates natural language requests from AI assistants into WeMo actions. This server discovers devices on your network, exposes live device state, and lets you query status, adjust brightness, rename devices, and retrieve helpful HomeKit codes, all through simple prompts.

How to use

Install and run the WeMo MCP Server, then connect it to your preferred MCP client (such as Claude, VS Code, Cursor, or other compatible interfaces). Use plain English prompts to discover devices, check status, adjust lights, or group actions into scenes. The server provides live device data via special URIs and supports guided prompts to help you manage devices even when you are unsure of names or subnet details.

How to install

Prerequisites: ensure you have a Python environment available and the uvx utility installed to run the MCP server.

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# macOS with Homebrew
brew install uv

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Configuration

Configure how the MCP server scans your network by setting a default subnet. You can override this per client configuration or export it as an environment variable.

# YAML example in config.yaml
WEMO_MCP_DEFAULT_SUBNET: "192.168.1.0/24"

Additional configuration notes

The server supports environment-based configuration and a YAML configuration file. You can enable persistent caching, adjust scan timeouts, and set logging levels via environment variables such as WEMO_MCP_CACHE_ENABLED, WEMO_MCP_SCAN_TIMEOUT, WEMO_MCP_MAX_WORKERS, WEMO_MCP_CACHE_TTL, and WEMO_MCP_LOG_LEVEL.

export WEMO_MCP_DEFAULT_SUBNET="192.168.1.0/24"
export WEMO_MCP_CACHE_TTL=3600
export WEMO_MCP_LOG_LEVEL=INFO

Troubleshooting and tips

If a device name isn’t found during a control operation, the server presents closest matches and asks which device you intended to manage. If the subnet is ambiguous, the server prompts you to select a subnet before scanning.

Tools and capabilities

The MCP server exposes a suite of tools to manage and monitor WeMo devices, including discovering devices, listing cached devices, querying status, controlling devices, renaming devices, retrieving HomeKit codes, inspecting cache information, clearing caches, and viewing configuration.

Security

Keep your environment secure by restricting MCP client access to trusted interfaces and using unique subnet configurations. Cache data is stored locally to improve performance and remains accessible to the MCP server and its clients.

Notes on scale and reliability

The server uses a multi-phase discovery process to reliably locate devices on your network and provides a fast scan experience by parallelizing port probes and verifications.

Development and contribution

If you contribute, you can run unit tests and integrate changes with the existing test suite. Development commands typically involve running tests and validating with end-to-end checks when devices are available on your network.

License and acknowledgments

This project is released under the MIT License and leverages the Model Context Protocol SDK along with pywemo for WeMo device communication.

Available tools

scan_network

Discover WeMo devices on the network using multi-phase scanning and populate the cache with detected devices.

list_devices

List all devices stored in the cache from previous scans.

get_device_status

Retrieve current state and information for a specific device.

control_device

Send commands to a device to turn on/off, toggle, or adjust brightness.

rename_device

Change a device’s friendly name in the cache and references.

get_homekit_code

Retrieve the HomeKit setup code for devices that support HomeKit.

get_cache_info

Provide details about the persistent device cache, including size and TTL.

clear_cache

Clear the persistent device cache to force a fresh scan.

get_configuration

Show current server configuration including network, cache, and logging settings.