Hubitat MCP Server
Enables Claude to control Hubitat smart home hub devices, modes, HSM, and variables via MCP tools, with remote access via ngrok and device aliasing.
README
Hubitat MCP Server
A TypeScript MCP server that lets Claude control your Hubitat Elevation smart home hub. Works with Claude Code (CLI + mobile), Claude Desktop, and Claude.ai.
Features
- 12 MCP tools — Control devices, modes, HSM, and hub variables
- Remote access — Built-in ngrok tunnel for access from anywhere
- Dual transport — stdio (local) + Streamable HTTP (remote)
- Auto-generated home context — Claude knows your devices by name
- Device aliasing — Say "kitchen light" instead of device ID 42
- Health endpoint — Monitor hub connectivity and tunnel status
- Cross-platform — macOS, Raspberry Pi, Docker
Quick Start
macOS:
brew install node@22 git
git clone https://github.com/rfhayn/hubitat-mcp-server.git
cd hubitat-mcp-server
./setup.sh
Raspberry Pi / Linux:
sudo apt update && sudo apt install -y git
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
git clone https://github.com/rfhayn/hubitat-mcp-server.git
cd hubitat-mcp-server
./setup.sh
The setup script walks you through everything: Hubitat credentials, ngrok configuration, and Claude integration.
Prerequisites
1. Node.js 20+ and Git
macOS:
brew install node@22 git
Raspberry Pi / Linux:
sudo apt update && sudo apt install -y git
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
2. Hubitat Maker API
You need to enable the Maker API on your Hubitat hub:
- Open your Hubitat admin interface at
http://<hub-ip> - Go to Apps → Add Built-in App → Maker API
- Select the devices you want Claude to control
- Check "Allow control of modes"
- Check "Allow control of HSM" (if you use Hubitat Safety Monitor)
- Optionally add hub variables under "Allow endpoint to control these hub variables"
- Click Done and note the App ID and Access Token displayed on the app page
3. ngrok Account (for remote access)
If you want to use Claude from your phone or claude.ai (not just local CLI):
- Sign up free at ngrok.com
- Copy your authtoken from dashboard
- Claim a free static domain from domains (e.g.,
your-name.ngrok-free.app)
Manual Setup
If you prefer not to use the setup script:
# Install and build
npm install
npm run build
# Configure
cp .env.example .env
# Edit .env with your Hubitat and ngrok credentials
# Run
npm start
Configuration
All configuration is in .env:
# Hubitat Connection
HUBITAT_HOST=192.168.1.100 # Your hub's IP address
HUBITAT_APP_ID=42 # Maker API app ID
HUBITAT_ACCESS_TOKEN=xxx # Maker API access token
# MCP Server
MCP_TRANSPORT=http # "stdio" or "http"
MCP_HTTP_PORT=3000 # Port for HTTP transport
MCP_AUTH_TOKEN=xxx # Bearer token (auto-generated by setup)
# ngrok (optional)
NGROK_AUTHTOKEN=xxx # From ngrok dashboard
NGROK_DOMAIN=you.ngrok-free.app # Free static domain
Connecting Claude
After starting the server, connect Claude using one of these methods:
Claude Code (CLI)
claude mcp add hubitat --transport http https://you.ngrok-free.app/mcp \
--header "Authorization: Bearer YOUR_AUTH_TOKEN"
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"hubitat": {
"type": "url",
"url": "https://you.ngrok-free.app/mcp",
"headers": {
"Authorization": "Bearer YOUR_AUTH_TOKEN"
}
}
}
}
Claude.ai (Web)
Go to Settings → Connectors → Add MCP Server and paste your MCP URL.
Local stdio (no remote access needed)
claude mcp add hubitat --transport stdio -- node /path/to/hubitat-mcp-server/dist/index.js
Available Tools
| Tool | Description |
|---|---|
list_devices |
List all authorized devices |
get_device |
Get device details (attributes, capabilities, commands) |
send_command |
Send a command to a device (on, off, setLevel, lock, etc.) |
get_device_events |
Get recent event history for a device |
get_modes |
List available hub modes |
get_current_mode |
Get the currently active mode |
set_mode |
Change the hub mode |
get_hsm_status |
Get HSM arm/disarm status |
set_hsm |
Arm or disarm HSM |
get_variable |
Get a hub variable value |
set_variable |
Set a hub variable value |
Available Resources
| Resource | Description |
|---|---|
hubitat://devices |
All devices with current state |
hubitat://status |
Hub mode and HSM status |
hubitat://home-context |
Human-readable summary of your home (devices grouped by type) |
CLI Commands
hubitat-mcp setup # Interactive setup
hubitat-mcp start # Start server (default)
hubitat-mcp status # Check connectivity
hubitat-mcp update # Pull latest + rebuild
hubitat-mcp help # Show help
Deployment
Raspberry Pi (alongside Homebridge)
# Clone and set up
cd /opt
git clone https://github.com/rfhayn/hubitat-mcp-server.git
cd hubitat-mcp-server
./setup.sh # select "yes" for systemd service
The setup script installs a systemd service that auto-starts on boot and restarts on crash.
Docker
cp .env.example .env
# Edit .env with your credentials
docker compose up -d
macOS (launchd)
The setup script can install a launchd service for auto-start on login.
Architecture
Claude (mobile/web/desktop)
│ HTTPS
▼
ngrok (embedded in server)
│ localhost
▼
MCP Server (Node.js)
│ HTTP REST
▼
Hubitat Hub (Maker API)
│
▼
Your Devices
Device Aliasing
After setup, a devices.json file is generated with aliases for each device:
{
"aliases": {
"12": ["kitchen light"],
"15": ["living room lamp", "living room light"],
"22": ["front door lock", "front door"]
}
}
Edit this file to add custom aliases. Claude can then use natural names like "turn on the kitchen light."
Health Check
curl http://localhost:3000/health
Returns hub connectivity, tunnel status, and uptime.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。