An MCP (Model Context Protocol) server for controlling Wyze smart home devices using the wyze-sdk library.
Configuration
View docs{
"mcpServers": {
"aldilaff-mcp-wyze-server": {
"command": "mcp-wyze-server",
"args": [],
"env": {
"WYZE_EMAIL": "[email protected]",
"WYZE_KEY_ID": "your-key-id",
"WYZE_API_KEY": "your-api-key",
"WYZE_PASSWORD": "your-password"
}
}
}
}You can control Wyze smart home devices through an MCP server that exposes device discovery, state reading, and control actions via an MCP client. This server authenticates with Wyze, discovers devices, and lets you manage devices and groups in real time using familiar MCP prompts and transports.
Connect your MCP client to a local or remote Wyze MCP server to discover devices, check their current status, and issue control commands. You can turn devices on or off, adjust brightness, set color temperature, and manage groups or rooms. Real-time live resources keep device and group status up to date, and automatic login uses environment variables for seamless startup.
Prerequisites: you need Python 3.13 or newer and a Wyze developer account with API credentials. You also need the uv package manager to run the local server during development.
Option 1 Install from PyPI (Recommended) to get started quickly.
uv pip install mcp-wyze-server
Or with pip:
pip install mcp-wyze-serverOption 2 Install from Source if you want to develop against the codebase.
git clone https://github.com/aldilaff/mcp-wyze-server.git
cd mcp-wyze-server
uv pip install -e .
# Or build and install:
uv build
uv pip install dist/*.whlConfigure environment variables for Wyze authentication after installation.
cp .env.example .env
Edit .env and add your Wyze credentials:
[email protected]
WYZE_PASSWORD=your-password
WYZE_KEY_ID=your-key-id-here
WYZE_API_KEY=your-api-key-hereSet up your Wyze API credentials by visiting the Wyze Developer Portal, creating a developer account if needed, and generating a new API key. Note down your KEY_ID and API_KEY.
If you installed from PyPI, run the server directly. If you installed from source, run the server via uv to enable MCP stdio transport.
# Standalone (installed from PyPI)
mcp-wyze-server
# From source (development)
uv run python src/mcp_wyze_server/server.pyAdd an MCP server configuration to your client that uses a stdio transport. Use the provided commands and environment variables to start the server from your local machine.
{
"mcpServers": {
"wyze": {
"command": "/Users/{yourusername}/.local/bin/uv",
"args": ["tool", "run", "mcp-wyze-server"],
"env": {
"WYZE_EMAIL": "[email protected]",
"WYZE_PASSWORD": "your-password",
"WYZE_KEY_ID": "your-key-id",
"WYZE_API_KEY": "your-api-key"
}
}
}
}Keep your Wyze API credentials secure. Do not share your .env file or API keys in public places. Use environment variables or secret management in your MCP infrastructure to protect sensitive data.
Common issues include authentication failures, device not found errors due to case-sensitive MAC addresses, and connection timeouts. Check your network, verify credentials, and ensure the Wyze service is reachable.
Enable debug logging to diagnose problems by setting MCP_DEBUG=true in your environment.
Login to Wyze account using environment credentials to establish a session.
List all Wyze devices associated with the account.
Retrieve detailed information for a specific device by MAC address.
Fetch the current status of a device, including power and brightness.
Turn a device on.
Turn a device off.
Adjust device brightness (0-100).
Set the color temperature for lights (2700K-6500K).
Set RGB color for lights using hex color.
Apply visual effects to lights.
Enable or disable sun matching for lights.
Clear any scheduled light timers.
List all Wyze scales.
Get detailed scale information for a device.
Fetch weight/body composition records for a user.