# WeMo

Control WeMo smart home devices through AI assistants using natural language.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add apiarya/wemo-mcp-server

# Browse available tools
npx -y @smithery/cli@latest tool list apiarya/wemo-mcp-server

# Get full schema for a tool
npx -y @smithery/cli@latest tool get apiarya/wemo-mcp-server scan_network

# Call a tool
npx -y @smithery/cli@latest tool call apiarya/wemo-mcp-server scan_network '{}'
```

## Direct MCP Connection

Endpoint: `https://wemo-mcp-server--apiarya.run.tools`

**Optional config:**
- `defaultSubnet` (query) — Subnet to scan for WeMo devices in CIDR notation (e.g. 192.168.1.0/24).
- `scanTimeout` (query) — Connection timeout per port probe. Default 0.6s.
- `maxWorkers` (query) — Maximum concurrent workers for parallel scanning. Default 60.
- `cacheDir` (query) — Directory to store the persistent device cache JSON file.

## Tools (9)

- `scan_network` — Discover WeMo devices on network using multi-phase UPnP/SSDP + port scanning
- `list_devices` — List all WeMo devices cached from previous network scans
- `get_device_status` — Get real-time state and info for a specific WeMo device
- `control_device` — Control a WeMo device — on, off, toggle, or set brightness
- `rename_device` — Rename a WeMo device (change its friendly name)
- `get_homekit_code` — Get the HomeKit setup code for a WeMo device
- `get_cache_info` — Get information about the persistent device cache (age, TTL, device count)
- `clear_cache` — Clear the persistent device cache to force a fresh scan
- `get_configuration` — View current server configuration settings

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get apiarya/wemo-mcp-server <tool-name>
```

## Resources

- `devices://` — JSON index of all cached WeMo devices
- `device://{device_id}` — Live state for a specific device (name or IP, URL-decoded)

## Prompts (4)

- `discover-devices` — Guided network scan with subnet selection
- `device-status-report` — Summary report of all device states
- `activate-scene` — Control multiple devices as a scene simultaneously
- `troubleshoot-device` — Step-by-step device troubleshooting guide
