A production-ready Model Context Protocol (MCP) server for Hubitat home automation hubs. Control and manage your Hubitat devices directly from Claude Desktop or any MCP-compatible AI assistant.
✅ List all devices — Get a complete inventory of your Hubitat devices with IDs, names, types, and current state
✅ Get device details — Retrieve full device information including capabilities, attributes, and available commands
✅ Send commands — Turn devices on/off, toggle, set brightness/levels, and execute custom commands
✅ Query device state — Check attribute values (temperature, switch state, battery level, etc.)
✅ Search devices — Find devices by name, type, or room
✅ List available commands — See what commands each device supports
- Hubitat Elevation Hub with Maker API installed
- Python 3.10+
- MCP Python SDK v2.x
- Internet connectivity (for Claude Desktop integration)
git clone https://github.com/yourusername/hubitat-mcp-server.git
cd hubitat-mcp-serverpip install mcp requests python-dotenvGet your Maker API details from your Hubitat hub:
- Log into your Hubitat hub at
http://[hub-ip]:8080 - Go to Apps → Maker API
- Note your App ID and Access Token
Create a .env file:
HUBITAT_TOKEN=your_access_token_here
HUBITAT_BASE_URL=http://[HUB_IP]/apps/api/[APP_ID] # Replace with your hub IP and App IDOr set environment variables directly:
export HUBITAT_TOKEN="your_token"
export HUBITAT_BASE_URL="http://[HUB_IP]/apps/api/[APP_ID]"python3 hubitat-mcp-server.pyThe server will listen on stdio and wait for MCP protocol messages.
Add the server to your Claude Desktop configuration:
File: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"hubitat": {
"command": "python3",
"args": ["/path/to/hubitat-mcp-server.py"],
"env": {
"HUBITAT_TOKEN": "your_token_here",
"HUBITAT_BASE_URL": "http://[HUB_IP]/apps/api/[APP_ID]"
}
}
}
}Restart Claude Desktop. The Hubitat tools will now be available.
Claude: "List all my Hubitat devices"
The server returns all 64 devices (or however many you have) with:
- Device ID
- Name (label)
- Type
- Room assignment
- Current state/attributes
- Available capabilities
Claude: "Turn on the kitchen light"
The server finds the "Kitchen Light" device and sends the on command.
Claude: "What's the temperature in the living room?"
The server queries the temperature sensor and returns the current value.
Claude: "Show me all motion sensors"
The server searches for devices matching "motion" and returns all matches.
Claude: "Set the family room light to 50% brightness"
The server sends setLevel command with value 50 to the appropriate dimmer.
The server exposes these MCP tools to Claude:
Returns all devices with basic info (id, name, type, room, capabilities, status).
Get detailed information about a specific device.
Parameters:
device_id(string): The device ID
Send a command to a device.
Parameters:
device_id(string): The device IDcommand(string): Command name (on, off, toggle, setLevel, etc.)value(string, optional): Command parameter (e.g., brightness level)
List all available commands for a device.
Parameters:
device_id(string): The device ID
Get the current value of a specific device attribute.
Parameters:
device_id(string): The device IDattribute(string): Attribute name (switch, level, temperature, etc.)
Search for devices by name, type, or room.
Parameters:
query(string): Search term
The server uses:
- MCP Python SDK 2.x — Model Context Protocol implementation
- Hubitat Maker API — Direct access to devices and commands
- Async/await — Non-blocking I/O for responsiveness
- JSON serialization — Standard protocol messages
- Read-only for some attributes — Some device states (like battery level) are read-only
- Command validation — The server doesn't validate commands before sending; invalid commands will error at the Hubitat end
- Real-time updates — Device state is fetched on-demand; there's no push notification system for state changes
- Local network only — Requires direct access to your Hubitat hub (same LAN or VPN)
For cloud access, you can:
- Use Hubitat's cloud API instead of local
- Set up a reverse proxy (Caddy, nginx, etc.) with HTTPS
- Use a VPN to access your home network remotely
- Check the device ID is correct
- Run
list_devicesto see all available IDs
- Verify your
HUBITAT_TOKENandHUBITAT_BASE_URL - Check that the Maker API app is enabled on your hub
- Ensure your device running the server can reach the hub IP
- Check the command name is correct for that device type
- Run
list_device_commands device_idto see available commands - Some devices may require parameters (e.g.,
setLevelneeds a brightness value)
- Ensure Python 3.10+ is installed:
python3 --version - Install dependencies:
pip install mcp requests - Check for syntax errors:
python3 -m py_compile hubitat-mcp-server.py
HUBITAT_TOKEN=token HUBITAT_BASE_URL=url python3 -u hubitat-mcp-server.pyYou can test the server's Python functions directly:
from hubitat_mcp_server import list_devices, get_device, send_command
# List devices
devices = list_devices()
# Get a specific device
device = get_device("140")
# Send a command
result = send_command("140", "on")Contributions are welcome! Potential improvements:
- Support for device/driver configuration
- Real-time WebSocket updates
- Batch command execution
- Device grouping/scenes
- Temperature/humidity/motion sensor subscriptions
- Custom driver support
MIT License — Feel free to use, modify, and distribute.
For issues, feature requests, or questions:
- Check the Hubitat Maker API documentation
- Verify your token and hub URL
- Run
list_devicesto confirm connectivity - Open an issue with device ID and command you're trying to run
v1.0.0 (2026-09-05)
- Initial release
- List, get, and control devices
- Search and attribute queries
- Full MCP protocol support
Enjoy automating your Hubitat home with Claude!