Are you the author? Sign in to claim
A Model Context Protocol (MCP) server for interacting with HomeyPro home automation systems. This server provides pagina
A Model Context Protocol (MCP) server for interacting with HomeyPro home automation systems. This server provides paginated access to devices, zones, and flows with comprehensive management capabilities.
cd python-homey-mcp
uv sync
Pull the pre-built Docker image (supports both AMD64 and ARM64 architectures):
docker pull ghcr.io/pigmej/python-homey-mcp:latest
The Docker image is built for multiple architectures:
linux/amd64 - For Intel/AMD processorslinux/arm64 - For ARM processors (Apple Silicon, Raspberry Pi, etc.)Docker will automatically pull the correct architecture for your system.
To build your own multi-architecture Docker images:
# Setup Docker Buildx (one-time setup)
./setup-buildx.sh
# Build for current platform only
make docker-build
# Build for both AMD64 and ARM64
make docker-build-multi
# Build and push to registry
make docker-push
No additional installation steps are required when using Docker.
Before running the server, you need to configure your HomeyPro connection:
Set the following environment variables:
export HOMEY_API_URL="http://YOUR_HOMEY_IP_ADDRESS"
export HOMEY_API_TOKEN="YOUR_PERSONAL_ACCESS_TOKEN"
By default, all individual tools are enabled. You can selectively disable or enable specific tools to reduce model confusion:
To disable specific individual tools, set the HOMEY_DISABLED_TOOLS environment variable:
# Disable device control and insights tools (keep device listing and search)
export HOMEY_DISABLED_TOOLS="control_device,get_device_insights"
# Disable all device management tools
export HOMEY_DISABLED_TOOLS="list_devices,get_device,get_devices_classes,get_devices_capabilities,search_devices_by_name,search_devices_by_class,control_device,get_device_insights"
To enable only specific individual tools, set the HOMEY_ENABLED_TOOLS environment variable:
# Enable only system info and zone listing (minimal configuration)
export HOMEY_ENABLED_TOOLS="get_system_info,list_zones"
# Enable basic device and zone management without control capabilities
export HOMEY_ENABLED_TOOLS="get_system_info,list_devices,get_device,list_zones,get_zone_devices"
Available individual tools:
Device Tools:
list_devices - List all devices with paginationget_device - Get detailed device informationget_devices_classes - List available device classesget_devices_capabilities - List available device capabilitiessearch_devices_by_name - Search devices by namesearch_devices_by_class - Search devices by classcontrol_device - Control device capabilitiesget_device_insights - Get device insights/analyticsFlow Tools:
list_flows - List all flows (normal and advanced)trigger_flow - Trigger a specific flowget_flow_folders - Get flow folder structureget_flows_by_folder - Get flows in a specific folderget_flows_without_folder - Get flows not in any folderZone Tools:
list_zones - List all zonesget_zone_devices - Get devices in a specific zoneget_zone_temp - Get temperature data for a zoneSystem Tools:
get_system_info - Get system information and statisticsNote: Prompts and resources are always available regardless of tool configuration.
To see which tools are currently enabled, you can use FastMCP's built-in list_tools() method. Disabled tools will not appear in this list, which is the intended behavior.
When running the MCP server, only enabled tools will be available to clients.
Tools use standard @mcp.tool() decorators and are configured post-startup:
@mcp.tool().disable() methodlist_tools() and can't be calledThis approach keeps the code simple while leveraging FastMCP's native tool management.
HOMEY_API_TOKEN environment variableYou can find your HomeyPro's IP address in:
The easiest way to run the server is using uvx:
# Set your environment variables
export HOMEY_API_URL="http://YOUR_HOMEY_IP_ADDRESS"
export HOMEY_API_TOKEN="YOUR_PERSONAL_ACCESS_TOKEN"
# Run with uvx
uvx --from . homey-mcp
Or run directly with FastMCP CLI:
# HTTP transport (recommended for testing)
uvx fastmcp run main.py --transport http --host 0.0.0.0 --port 4445
# STDIO transport (for MCP clients)
uvx fastmcp run main.py --transport stdio
# Using uv run
uv run fastmcp run main.py --transport http --host 0.0.0.0 --port 4445 --log-level DEBUG
# Or the old way
uv run fastmcp run -t http --host 0.0.0.0 -p 4445 -l DEBUG main.py
# Or using Makefile
make run
The project includes a comprehensive Makefile with useful development commands:
# Setup and installation
make setup # Initial setup (install + check environment)
make install # Install dependencies
make check-env # Verify environment configuration
# Development workflow
make test # Run test suite
make lint # Run linting checks
make format # Format code
make clean # Clean up generated files
# Docker operations
make docker-build # Build Docker image for current platform
make docker-build-multi # Build multi-architecture image (AMD64 + ARM64)
make docker-push # Build and push multi-architecture image
make docker-test # Test Docker image
# Utilities
make info # Show project information
make check-connection # Test HomeyPro connection
You can install this server directly in MCP clients using FastMCP:
# Install in Claude Desktop
uvx fastmcp install claude-desktop main.py \
--env-var HOMEY_API_URL=http://YOUR_HOMEY_IP_ADDRESS \
--env-var HOMEY_API_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN
# Install in Claude Code
uvx fastmcp install claude-code main.py \
--env-var HOMEY_API_URL=http://YOUR_HOMEY_IP_ADDRESS \
--env-var HOMEY_API_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN
# Install in Cursor
uvx fastmcp install cursor main.py \
--env-var HOMEY_API_URL=http://YOUR_HOMEY_IP_ADDRESS \
--env-var HOMEY_API_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN
# Generate MCP JSON config
uvx fastmcp install mcp-json main.py \
--env-var HOMEY_API_URL=http://YOUR_HOMEY_IP_ADDRESS \
--env-var HOMEY_API_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN
Run the MCP server in a Docker container:
docker run -p 4445:4445 \
-e HOMEY_API_URL="http://YOUR_HOMEY_IP_ADDRESS" \
-e HOMEY_API_TOKEN="YOUR_PERSONAL_ACCESS_TOKEN" \
ghcr.io/pigmej/python-homey-mcp:latest
Or using docker-compose:
version: '3.8'
services:
python-homey-mcp:
image: ghcr.io/pigmej/python-homey-mcp:latest
ports:
- "4445:4445"
environment:
- HOMEY_API_URL=http://YOUR_HOMEY_IP_ADDRESS
- HOMEY_API_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN
The server will start and connect to your HomeyPro instance. You'll see a connection confirmation message. But basically please yield to FastMCP docs
The server provides context-aware prompts that help you interact with your HomeyPro system more effectively. These prompts analyze your current system state and provide tailored guidance.
Provides structured guidance for controlling different types of devices in your HomeyPro system.
Systematic diagnostic guidance for common HomeyPro device issues.
Helps you discover and understand device capabilities without overwhelming detail.
Structured guidance for creating HomeyPro automation flows.
Guidance for improving existing flow performance and reliability.
Systematic approach to diagnosing and fixing flow issues.
Comprehensive system health analysis and recommendations.
Guidance for organizing and optimizing zone structure.
The server provides intelligent resource caching with automatic fallback to stale data when HomeyPro is temporarily unavailable.
homey://system/overview)Comprehensive system overview including device counts, zone counts, and health indicators.
homey://devices/registry)Complete device inventory with current states, capabilities, and online/offline indicators.
homey://zones/hierarchy)Zone structure with device associations and parent-child relationships.
homey://flows/catalog)Available flows with metadata, status, and execution statistics.
The server provides comprehensive API tools for direct HomeyPro interaction. All tools support pagination and error handling with detailed responses.
list_devices: List all devices with pagination support
get_device: Get detailed information about a specific device
get_devices_classes: List all available device classes
get_devices_capabilities: List all possible device capabilities
search_devices_by_name: Search devices by name with pagination
search_devices_by_class: Search devices by class/type
control_device: Control device capabilities
get_device_insights: Get historical device data
list_zones: List all zones with pagination
get_zone_devices: Get all devices in a specific zone
get_zone_temp: Get average temperature for a zone
list_flows: List all flows (both normal and advanced) with pagination
flow_type field ("normal" or "advanced")trigger_flow: Execute any flow (automatically detects type)
get_flow_folders: Get all flow organization folders
get_flows_by_folder: Get flows in a specific folder
get_flows_without_folder: Get unorganized flows
get_flow_folders: Get all flow organization folders
get_flows_by_folder: Get flows in a specific folder
get_flows_without_folder: Get unorganized flows
get_system_info: Get comprehensive system overview
This project is licensed under the MIT License.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows