Hubitat MCP Server

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.

Category
Visit Server

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:

  1. Open your Hubitat admin interface at http://<hub-ip>
  2. Go to AppsAdd Built-in AppMaker API
  3. Select the devices you want Claude to control
  4. Check "Allow control of modes"
  5. Check "Allow control of HSM" (if you use Hubitat Safety Monitor)
  6. Optionally add hub variables under "Allow endpoint to control these hub variables"
  7. 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):

  1. Sign up free at ngrok.com
  2. Copy your authtoken from dashboard
  3. 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 SettingsConnectorsAdd 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured