Skip to main content
Glama
MCP Wyze Server
by aldilaff

MCP Wyze Server

An MCP (Model Context Protocol) server for controlling Wyze smart home devices using the wyze-sdk library.

Overview

This MCP server provides a comprehensive interface for interacting with Wyze devices through AI assistants like Claude. It supports authentication, device discovery, device control, and group management for various Wyze smart home products.

Related MCP server: WeMo MCP Server

Features

  • Authentication: Secure login using Wyze API credentials

  • Device Discovery: List and get information about all Wyze devices

  • Device Control: Turn devices on/off, adjust brightness, and more

  • Group Management: Control entire rooms or groups of devices at once

  • Live Resources: Real-time device and group status monitoring

  • Automatic Login: Uses environment variables for seamless authentication

Prerequisites

  • Python 3.13+

  • Wyze developer account with API credentials

  • uv package manager

Installation

uv pip install mcp-wyze-server

Or with pip:

pip install mcp-wyze-server

Option 2: Install from Source

  1. Clone the repository:

git clone https://github.com/aldilaff/mcp-wyze-server.git
cd mcp-wyze-server
  1. Install with uv:

uv pip install -e .

Or build and install:

uv build
uv pip install dist/*.whl

Configure Environment Variables

After installation, configure environment variables:

cp .env.example .env

Edit .env and add your Wyze credentials:

WYZE_EMAIL=your-email@example.com
WYZE_PASSWORD=your-password
WYZE_KEY_ID=your-key-id-here
WYZE_API_KEY=your-api-key-here

Getting Wyze API Credentials

To obtain your Wyze API credentials:

  1. Visit the Wyze Developer Portal

  2. Create a developer account if you don't have one

  3. Create a new API key

  4. Note down your KEY_ID and API_KEY

Usage

Running the Server Standalone

If installed from PyPI:

mcp-wyze-server

If running from source:

uv run python src/mcp_wyze_server/server.py

Integrating with Claude Desktop

Add this configuration to your Claude Desktop MCP settings:

If installed globally via pip/uv:

{
  "mcpServers": {
    "wyze": {
      "command": "/Users/{yourusername}/.local/bin/uv",
      "args": ["tool", "run", "mcp-wyze-server"],
      "env": {
        "WYZE_EMAIL": "your-email@example.com",
        "WYZE_PASSWORD": "your-password",
        "WYZE_KEY_ID": "your-key-id",
        "WYZE_API_KEY": "your-api-key"
      }
    }
  }
}

Note: Replace /Users/yourusername/.local/bin/uv with the actual path to your uv installation. You can find this by running which uv in your terminal.

If running from source (recommended for development):

{
  "mcpServers": {
    "wyze": {
      "command": "/Users/yourusername/.local/bin/uv",
      "args": [
        "run",
        "--directory",
        "/path/to/mcp-wyze-server",
        "python",
        "src/mcp_wyze_server/server.py"
      ],
      "env": {
        "WYZE_EMAIL": "your-email@example.com",
        "WYZE_PASSWORD": "your-password",
        "WYZE_KEY_ID": "your-key-id",
        "WYZE_API_KEY": "your-api-key"
      }
    }
  }
}

Note: Replace /Users/yourusername/.local/bin/uv with your actual uv path.

Configuration with Other MCP Clients

This server uses stdio transport and can be integrated with any MCP client that supports the protocol.

If installed via PyPI:

mcp-wyze-server

If running from source:

uv run python /path/to/mcp-wyze-server/src/mcp_wyze_server/server.py

Available MCP Tools

Authentication

  • wyze_login() - Login to Wyze account (uses env vars)

Device Management

  • wyze_get_devices() - List all devices

  • wyze_device_info(device_mac) - Get device details

  • wyze_get_device_status(device_mac) - Get accurate current status (power state, brightness, etc.)

Basic Device Control

  • wyze_turn_on_device(device_mac) - Turn on a device

  • wyze_turn_off_device(device_mac) - Turn off a device

  • wyze_set_brightness(device_mac, brightness) - Set brightness (0-100)

Enhanced Light Control

  • wyze_set_color_temp(device_mac, color_temp) - Set color temperature (2700K-6500K)

  • wyze_set_color(device_mac, color) - Set RGB color (hex format)

  • wyze_set_light_effect(device_mac, effect) - Set visual effects

  • wyze_set_light_sun_match(device_mac, enabled) - Enable/disable sun matching

  • wyze_clear_light_timer(device_mac) - Clear scheduled timers

Scale Management

  • wyze_get_scales() - List all Wyze scales

  • wyze_get_scale_info(device_mac) - Get detailed scale information

  • wyze_get_scale_records(device_mac, user_id, days_back) - Get weight/body composition records

Resources

  • wyze://devices - Live device list with status

  • wyze://scales - Live scale list with family members

Prompts

  • wyze_device_control_prompt(device_name, action) - Generate control prompts

  • wyze_scale_health_prompt(family_member_name, timeframe) - Generate health analysis prompts

Supported Devices

This server supports various Wyze device types including:

  • Lights (Bulbs, Light Strips)

  • Switches

  • Plugs

  • Scales

  • Locks

  • Cameras (basic control)

  • Thermostats

  • And more...

Development

This project uses:

  • FastMCP: A high-performance MCP server framework

  • wyze-sdk: Comprehensive Python interface for Wyze devices

  • uv: Fast Python package manager

Project Structure

mcp-wyze-server/
├── src/
│   └── mcp_wyze_server/
│       ├── __init__.py
│       └── server.py     # MCP server implementation
├── test_device.py        # Device testing utility
├── pyproject.toml        # Project dependencies
├── .env.example          # Environment variables template
├── CLAUDE.md             # Development guidelines for Claude
├── LICENSE               # MIT License
└── README.md             # This file

Troubleshooting

Common Issues

  1. Authentication Failed: Ensure your Wyze credentials are correct and API keys are valid

  2. Device Not Found: Device MAC addresses are case-sensitive

  3. Connection Timeout: Check your network connection and Wyze service status

Debug Mode

Enable debug logging by setting the environment variable:

export MCP_DEBUG=true

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/AmazingFeature)

  3. Commit your changes (git commit -m 'Add some AmazingFeature')

  4. Push to the branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Wyze SDK for the excellent Python library

  • MCP for the Model Context Protocol specification

  • FastMCP for the MCP server framework

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by Wyze Labs, Inc. All product names, logos, and brands are property of their respective owners.

Available Tools

15 tools
wyze_clear_light_timerB

Clear any scheduled timers for a Wyze light

Inputs: device_mac (required). Returns: result

wyze_device_infoB

Get detailed information about a specific Wyze device by MAC address

Inputs: device_mac (required). Returns: result

wyze_get_devicesB

Get list of all Wyze devices associated with the account

Inputs: no named parameters. Returns: result

wyze_get_device_statusB

Get accurate current status for a Wyze device (power state, brightness, etc.)

Inputs: device_mac (required). Returns: result

wyze_get_scale_infoB

Get detailed information about a specific Wyze scale

Inputs: device_mac (required). Returns: result

wyze_get_scale_recordsC

Get weight measurement records from a Wyze scale

Inputs: device_mac, user_id, days_back. Returns: result

wyze_get_scalesB

Get list of all Wyze scales associated with the account

Inputs: no named parameters. Returns: result

wyze_loginB

Login to Wyze account using environment variables

Inputs: no named parameters. Returns: result

wyze_set_brightnessC

Set brightness for a Wyze light (0-100)

Inputs: device_mac (required), brightness (required). Returns: result

wyze_set_colorB

Set RGB color for a Wyze light (hex format like 'ff0000' for red)

Inputs: device_mac (required), color (required). Returns: result

wyze_set_color_tempB

Set color temperature for a Wyze light (2700K-6500K)

Inputs: device_mac (required), color_temp (required). Returns: result

wyze_set_light_effectC

Set visual effect for a Wyze light strip or compatible bulb

Inputs: device_mac (required), effect (required). Returns: result

wyze_set_light_sun_matchA

Enable or disable sun matching for a Wyze light (adjusts color temperature based on time of day)

Inputs: device_mac (required), enabled. Returns: result

wyze_turn_off_deviceB

Turn off a Wyze light device

Inputs: device_mac (required). Returns: result

wyze_turn_on_deviceC

Turn on a Wyze light device

Inputs: device_mac (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 15 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. Tools are well-organized by device type (lights, scales, general devices) and specific actions (info, control, settings), making it easy for an agent to select the correct one without confusion.

    Naming Consistency5/5

    All tools follow a consistent 'wyze_verb_noun' pattern with snake_case throughout. The naming is predictable and readable, using clear verbs like 'get', 'set', 'turn', and 'clear' paired with specific nouns.

    Tool Count5/5

    With 15 tools, the count is well-scoped for managing Wyze devices. It covers authentication, device listing, status checks, and comprehensive light and scale controls, with each tool earning its place without being excessive or insufficient.

    Completeness4/5

    The tool set provides near-complete coverage for Wyze light and scale management, including CRUD-like operations (e.g., turn on/off, set properties, get info/records). Minor gaps include lack of tools for other device types (e.g., cameras, plugs) or advanced features like schedules beyond light timers, but core workflows are well-supported.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to control Philips Hue smart lighting systems, including individual lights, groups, scenes, brightness, and color adjustments through natural language commands.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables natural language control of WeMo smart home devices for power, brightness, and device management through AI assistants. It features a high-reliability multi-phase discovery process to scan, monitor, and configure devices across a local network.
      11
      69 PyPI
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to control Govee smart devices, including lights, via natural language. Supports turning on/off, changing colors, adjusting brightness, and activating scenes through the Govee API or local network.
      9
      1
      MIT