MCP Wyze Server

MCP Wyze Server

Enables control and monitoring of Wyze smart home devices through AI assistants. Supports device discovery, control (on/off, brightness, color), group management, and health tracking for scales with real-time status monitoring.

Category
访问服务器

README

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.

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

Option 1: Install from PyPI (Recommended)

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选