mcp-wyze-server


Namemcp-wyze-server JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryMCP server for controlling Wyze smart home devices
upload_time2025-08-15 03:31:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.13
licenseMIT
keywords home-automation iot mcp smart-home wyze
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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)

```bash
uv pip install mcp-wyze-server
```

Or with pip:
```bash
pip install mcp-wyze-server
```

### Option 2: Install from Source

1. Clone the repository:
```bash
git clone https://github.com/aldilaff/mcp-wyze-server.git
cd mcp-wyze-server
```

2. Install with uv:
```bash
uv pip install -e .
```

Or build and install:
```bash
uv build
uv pip install dist/*.whl
```

### Configure Environment Variables

After installation, configure environment variables:
```bash
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](https://developer-api-console.wyze.com/)
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:
```bash
mcp-wyze-server
```

If running from source:
```bash
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:**
```json
{
  "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):**
```json
{
  "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:
```bash
mcp-wyze-server
```

If running from source:
```bash
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:
```bash
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](LICENSE) file for details.

## Acknowledgments

- [Wyze SDK](https://github.com/shauntarves/wyze-sdk) for the excellent Python library
- [MCP](https://modelcontextprotocol.io/) for the Model Context Protocol specification
- [FastMCP](https://github.com/jlowin/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.
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mcp-wyze-server",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": "Faisal Aldilaijan <github@faisal.software>",
    "keywords": "home-automation, iot, mcp, smart-home, wyze",
    "author": null,
    "author_email": "Faisal Aldilaijan <github@faisal.software>",
    "download_url": "https://files.pythonhosted.org/packages/08/b0/3fc30e3c2b4457266aa8920ad069e42e2f71f69c96b642248915e42bc4b5/mcp_wyze_server-0.1.1.tar.gz",
    "platform": null,
    "description": "# MCP Wyze Server\n\nAn MCP (Model Context Protocol) server for controlling Wyze smart home devices using the wyze-sdk library.\n\n## Overview\n\nThis 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.\n\n## Features\n\n- **Authentication**: Secure login using Wyze API credentials\n- **Device Discovery**: List and get information about all Wyze devices\n- **Device Control**: Turn devices on/off, adjust brightness, and more\n- **Group Management**: Control entire rooms or groups of devices at once\n- **Live Resources**: Real-time device and group status monitoring\n- **Automatic Login**: Uses environment variables for seamless authentication\n\n## Prerequisites\n\n- Python 3.13+\n- Wyze developer account with API credentials\n- `uv` package manager\n\n## Installation\n\n### Option 1: Install from PyPI (Recommended)\n\n```bash\nuv pip install mcp-wyze-server\n```\n\nOr with pip:\n```bash\npip install mcp-wyze-server\n```\n\n### Option 2: Install from Source\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/aldilaff/mcp-wyze-server.git\ncd mcp-wyze-server\n```\n\n2. Install with uv:\n```bash\nuv pip install -e .\n```\n\nOr build and install:\n```bash\nuv build\nuv pip install dist/*.whl\n```\n\n### Configure Environment Variables\n\nAfter installation, configure environment variables:\n```bash\ncp .env.example .env\n```\n\nEdit `.env` and add your Wyze credentials:\n```\nWYZE_EMAIL=your-email@example.com\nWYZE_PASSWORD=your-password\nWYZE_KEY_ID=your-key-id-here\nWYZE_API_KEY=your-api-key-here\n```\n\n### Getting Wyze API Credentials\n\nTo obtain your Wyze API credentials:\n\n1. Visit the [Wyze Developer Portal](https://developer-api-console.wyze.com/)\n2. Create a developer account if you don't have one\n3. Create a new API key\n4. Note down your `KEY_ID` and `API_KEY`\n\n## Usage\n\n### Running the Server Standalone\n\nIf installed from PyPI:\n```bash\nmcp-wyze-server\n```\n\nIf running from source:\n```bash\nuv run python src/mcp_wyze_server/server.py\n```\n\n### Integrating with Claude Desktop\n\nAdd this configuration to your Claude Desktop MCP settings:\n\n**If installed globally via pip/uv:**\n```json\n{\n  \"mcpServers\": {\n    \"wyze\": {\n      \"command\": \"/Users/{yourusername}/.local/bin/uv\",\n      \"args\": [\"tool\", \"run\", \"mcp-wyze-server\"],\n      \"env\": {\n        \"WYZE_EMAIL\": \"your-email@example.com\",\n        \"WYZE_PASSWORD\": \"your-password\",\n        \"WYZE_KEY_ID\": \"your-key-id\",\n        \"WYZE_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nNote: 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.\n\n**If running from source (recommended for development):**\n```json\n{\n  \"mcpServers\": {\n    \"wyze\": {\n      \"command\": \"/Users/yourusername/.local/bin/uv\",\n      \"args\": [\n        \"run\",\n        \"--directory\",\n        \"/path/to/mcp-wyze-server\",\n        \"python\",\n        \"src/mcp_wyze_server/server.py\"\n      ],\n      \"env\": {\n        \"WYZE_EMAIL\": \"your-email@example.com\",\n        \"WYZE_PASSWORD\": \"your-password\",\n        \"WYZE_KEY_ID\": \"your-key-id\",\n        \"WYZE_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nNote: Replace `/Users/yourusername/.local/bin/uv` with your actual `uv` path.\n\n### Configuration with Other MCP Clients\n\nThis server uses stdio transport and can be integrated with any MCP client that supports the protocol. \n\nIf installed via PyPI:\n```bash\nmcp-wyze-server\n```\n\nIf running from source:\n```bash\nuv run python /path/to/mcp-wyze-server/src/mcp_wyze_server/server.py\n```\n\n## Available MCP Tools\n\n### Authentication\n- `wyze_login()` - Login to Wyze account (uses env vars)\n\n### Device Management\n- `wyze_get_devices()` - List all devices\n- `wyze_device_info(device_mac)` - Get device details\n- `wyze_get_device_status(device_mac)` - Get accurate current status (power state, brightness, etc.)\n\n### Basic Device Control\n- `wyze_turn_on_device(device_mac)` - Turn on a device\n- `wyze_turn_off_device(device_mac)` - Turn off a device\n- `wyze_set_brightness(device_mac, brightness)` - Set brightness (0-100)\n\n### Enhanced Light Control\n- `wyze_set_color_temp(device_mac, color_temp)` - Set color temperature (2700K-6500K)\n- `wyze_set_color(device_mac, color)` - Set RGB color (hex format)\n- `wyze_set_light_effect(device_mac, effect)` - Set visual effects\n- `wyze_set_light_sun_match(device_mac, enabled)` - Enable/disable sun matching\n- `wyze_clear_light_timer(device_mac)` - Clear scheduled timers\n\n### Scale Management\n- `wyze_get_scales()` - List all Wyze scales\n- `wyze_get_scale_info(device_mac)` - Get detailed scale information  \n- `wyze_get_scale_records(device_mac, user_id, days_back)` - Get weight/body composition records\n\n### Resources\n- `wyze://devices` - Live device list with status\n- `wyze://scales` - Live scale list with family members\n\n### Prompts\n- `wyze_device_control_prompt(device_name, action)` - Generate control prompts\n- `wyze_scale_health_prompt(family_member_name, timeframe)` - Generate health analysis prompts\n\n## Supported Devices\n\nThis server supports various Wyze device types including:\n- Lights (Bulbs, Light Strips)\n- Switches\n- Plugs\n- Scales\n- Locks\n- Cameras (basic control)\n- Thermostats\n- And more...\n\n## Development\n\nThis project uses:\n- **FastMCP**: A high-performance MCP server framework\n- **wyze-sdk**: Comprehensive Python interface for Wyze devices\n- **uv**: Fast Python package manager\n\n### Project Structure\n\n```\nmcp-wyze-server/\n\u251c\u2500\u2500 src/\n\u2502   \u2514\u2500\u2500 mcp_wyze_server/\n\u2502       \u251c\u2500\u2500 __init__.py\n\u2502       \u2514\u2500\u2500 server.py     # MCP server implementation\n\u251c\u2500\u2500 test_device.py        # Device testing utility\n\u251c\u2500\u2500 pyproject.toml        # Project dependencies\n\u251c\u2500\u2500 .env.example          # Environment variables template\n\u251c\u2500\u2500 CLAUDE.md             # Development guidelines for Claude\n\u251c\u2500\u2500 LICENSE               # MIT License\n\u2514\u2500\u2500 README.md             # This file\n```\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Authentication Failed**: Ensure your Wyze credentials are correct and API keys are valid\n2. **Device Not Found**: Device MAC addresses are case-sensitive\n3. **Connection Timeout**: Check your network connection and Wyze service status\n\n### Debug Mode\n\nEnable debug logging by setting the environment variable:\n```bash\nexport MCP_DEBUG=true\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [Wyze SDK](https://github.com/shauntarves/wyze-sdk) for the excellent Python library\n- [MCP](https://modelcontextprotocol.io/) for the Model Context Protocol specification\n- [FastMCP](https://github.com/jlowin/fastmcp) for the MCP server framework\n\n## Disclaimer\n\nThis 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.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MCP server for controlling Wyze smart home devices",
    "version": "0.1.1",
    "project_urls": {
        "Documentation": "https://github.com/aldilaff/mcp-wyze-server#readme",
        "Homepage": "https://github.com/aldilaff/mcp-wyze-server",
        "Issues": "https://github.com/aldilaff/mcp-wyze-server/issues",
        "Repository": "https://github.com/aldilaff/mcp-wyze-server"
    },
    "split_keywords": [
        "home-automation",
        " iot",
        " mcp",
        " smart-home",
        " wyze"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f601ba6e2bd29b3c989bd7a171384099f8df5b42a394bdb08b07705e82d4ed73",
                "md5": "b2799493cb61e17c07d717301ed13038",
                "sha256": "28821324381a254a3beb33fd95c0ecd01899a9b55b928e7df82464b4e4f353a9"
            },
            "downloads": -1,
            "filename": "mcp_wyze_server-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b2799493cb61e17c07d717301ed13038",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13",
            "size": 9832,
            "upload_time": "2025-08-15T03:31:30",
            "upload_time_iso_8601": "2025-08-15T03:31:30.681039Z",
            "url": "https://files.pythonhosted.org/packages/f6/01/ba6e2bd29b3c989bd7a171384099f8df5b42a394bdb08b07705e82d4ed73/mcp_wyze_server-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "08b03fc30e3c2b4457266aa8920ad069e42e2f71f69c96b642248915e42bc4b5",
                "md5": "e417e27a46e75cc745d5b0fb28071509",
                "sha256": "dc22892da6bc699af90abaef34e44febff34cde47f7c5f1fc067e8ce181d123d"
            },
            "downloads": -1,
            "filename": "mcp_wyze_server-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e417e27a46e75cc745d5b0fb28071509",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 9993,
            "upload_time": "2025-08-15T03:31:31",
            "upload_time_iso_8601": "2025-08-15T03:31:31.800829Z",
            "url": "https://files.pythonhosted.org/packages/08/b0/3fc30e3c2b4457266aa8920ad069e42e2f71f69c96b642248915e42bc4b5/mcp_wyze_server-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-15 03:31:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aldilaff",
    "github_project": "mcp-wyze-server#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mcp-wyze-server"
}
        
Elapsed time: 0.83323s