python-homey-mcp is a server based on the Model Context Protocol (MCP), designed to let AI models interact with the HomeyPro home automation system. It provides paginated access to devices, zones, and flows, and supports comprehensive management capabilities.
Key capabilities include:
- Device management: List, search, and control devices, with support for full capability operations.
- Zone management: Browse zones and their associated devices, retrieve zone temperature, and more.
- Flow management: List and trigger automation flows (including standard flows and advanced flows).
- System management: Retrieve and update system configuration (location, address, language, units, etc.).
- AI-driven prompts: Provide context-aware guidance for device control, troubleshooting, and automation.
- Resource caching: Intelligently cache data and fall back to stale data when HomeyPro is unavailable.
- Pagination support: Efficiently handle large datasets using cursor-based pagination.
- Real-time data: Retrieve current device status, capabilities, and insights.
- Error handling: Comprehensive error handling with detailed error messages.
Usage:
- Configure environment variables: HOMEY_API_TOKEN (HomeyPro personal access token) and HOMEY_ADDRESS (the IP address or hostname of HomeyPro) must be set. Optionally, selectively enable or disable specific tools via the HOMEY_DISABLED_TOOLS or HOMEY_ENABLED_TOOLS environment variables.
- Obtain a token: In the HomeyPro web interface, go to Settings > General > API and create a new personal access token.
- Find the IP address: This can be found in the HomeyPro web interface (Settings > General > Network), the router management panel, or the HomeyPro mobile app (More > Settings > General > Network).
- Run the server: You can run it using uvx, directly using the FastMCP CLI, or via a Docker container (supporting AMD64 and ARM64 architectures).
- Install in an MCP client: You can use FastMCP to install the server directly into an MCP client.
Available tools (can be selectively disabled via environment variables):
- list_devices: List all devices with pagination
- get_device: Retrieve detailed information for a specific device
- get_devices_classes: List available device classes
- get_devices_capabilities: List available device capabilities
- search_devices_by_name: Search for devices by name
- search_devices_by_class: Search for devices by class
- control_device: Control device capabilities
- get_device_insights: Get device insights/analytics data
- list_flows: List all flows (standard and advanced)
- trigger_flow: Trigger a specific flow
- get_flow_folders: Get the flow folder structure
- get_flows_by_folder: Get flows in a specific folder
- get_flows_without_folder: Get flows that are not in any folder
- list_zones: List all zones
- get_zone_devices: Get devices in a specific zone
- get_zone_temp: Get zone temperature data
- get_system_info: Get system information and statistics
AI-powered prompts: The server provides context-aware prompts to help interact with the HomeyPro system more effectively. These prompts analyze the current system state and provide tailored guidance. Available prompts include: device control guidance, troubleshooting guidance, capability discovery, flow creation guidance, flow optimization guidance, flow debugging guidance, system health analysis, zone organization guidance.
Resource caching: The server provides intelligent resource caching and automatically falls back to stale data when HomeyPro is temporarily unavailable. Available resources include: system overview (cache TTL 5 minutes), device inventory (cache TTL 30 seconds), zone structure, flow list (cache TTL 2 minutes). Caching features include intelligent TTL, stale data fallback, error handling, connection resilience, and performance optimization.
Use cases: Suitable for users who want to manage and automate their HomeyPro smart home system through AI models or MCP clients, such as controlling devices via natural language, creating automation flows, and monitoring system health status.
Limitations: Requires a valid HomeyPro device and network connection; some features (such as device insights) may be limited by the HomeyPro version or configuration; specific pricing, cost, platform support, and other information are not yet provided.