[Release] Hubitat Local MCP server, create and edit RM rules native apps, devices, dashboards,, and generally control all aspects of your Hubitat using AI, server runs completely on your Hubitat

Hi all,

I've been working on GitHub - kingpanther13/Hubitat-local-MCP-server · GitHub for a few months now. I feel that it is solid enough now that I can say it's release-ready. It's available via HPM, and is very easy to set up. You just install, copy the url it provides, and set it up with your AI provider of choice and voila you're in. It runs completely on your Hubitat locally and independently, though of course you need to bring your own AI. If you use Hubitat cloud then it creates an optional remote connection for you as well, but it can be run exclusively over your local network if you prefer, and it tends to work better locally anyways. You can also set up a reverse proxy on your home network if you prefer, and point it at the local endpoint.

It connects using streamable http MCP protocol, which is supported by most of the big name AI clients. It has about 118 tools right now which is a lot, but by default it has a gateway tool mode which only exposes 37 tools and keeps most tools within managed gateways for progressive disclosure. This option can be disabled if you want to expose all tools to your ai.

Possibly my proudest achievement is the native apps set of tools. Over the last few months me and my collaborator Level99 have meticulously reverse engineered Rule Machine and have created AI tools that can create edit and view native Rule Machine rules and all other native apps. It still isn't perfect and we're still actively optimizing it, but it works quite well.

Building visual rules is the preferred method when making rules that don't need the complexity of native Rule Machine rules, and the tools for visual rules are now 100% supported and work flawlessly from what I have been able to determine. It uses the same pathway as Hubitats built in ai rule maker, but it allows you to use your own AI instead of what they provide, which allows much more robust rule making capability.

You also can control devices, logs, system health, make virtual devices, manage HSM, make and edit dashboards, manage settings, and various other things I'm probably forgetting to list. It is a very feature rich MCP server. Literally all you have to do with your AI is say “hey, create a rule that activates X device at Y time, but only when Z is occuring" and it'll figure it out for you. Not every AI is the same, some will require more than one try to get it working right so always double check results, but at least with Claude I feel like it has been pretty solid so far.

It also has a custom rule machine built in as well. Initially I believed that it was impossible to touch the native rule machine so I made my own; once we got native rule machine tools working I decided to make the custom rule machine a legacy function and have it opt-in only. Imo it works just as well as native rule machine, but I keep it disabled now so the llm doesn’t get confused between it and native rule machine, and I don't really support it anymore except for requested bug fixes.

Security wise, you can individually control what devices it can access, or you can give it access to all devices. It's very granular. You can also control which tools are exposed to your llm and you can gate to a read-only mode as well.

If you decide to use this and run into any problems or would like to request features please drop on by my GitHub and file an issue! We are pretty active and are constantly improving and releasing updates.

@KingPanther13,
Just wanted to say thanks for your amazing work on the MCP server and sharing the project!

I have created a dashboard for my mobile (Home Assistant add-on) that is connected to your MCP server, using Ollama as the AI agent.

This is still work in progress, and not good as Claude connection, but so far it is able to do most of the things I need.

Definitely a better experience than using Google or Alexa for example, and so much more.

Also, thanks for adding support to show rule status, this is now working as expected.

this stuff is awesome! I had started using Home Assistant about 1.5 yrs ago because I wanted AI to Jarvis my house, and Hubitat didn’t seem to have that…. but Home Assistant is a bloody PITA compared to using Hubitat. With the new AI tools like this, pretty sure I will be uninstalling Home Assistant now! It will be so nice to find out what sex is again, LOL! *

*see the Hibbert Home Tech channel on YouTube

Glad you like it! I also am a maintainer for HA-MCP, which does basically the same thing for homeassistant. It actually is what inspired me to make this mcp server. I have both HA and Hubitat so I use both servers regularly

Thank you!

I am just getting into this. MCP Hubitat integration installed and connected to my humble local AI with no problems.

https://community.hubitat.com/t/beta-2-5-1-156-the-ai-mcp-connector-integration-is-working-c8/165702?u=hal3

I didn't know about the HA version but I will try that next.

@KingPanther13

Loving the MCP Rule Server so far. This is a game changer!

I've got a reproducible bug with a few specific sub-tools and wanted to flag it. 502 errors with 3 tools.

[Edited: removed the issue details. Posting on github.]
[Edit 2: update to 4.1.0 fixed one sub-tool. Two others still giving 502 errors.]

I did post this in the built in Hubitat MCP chat but I've deleted it from there and I will say it in here....this is good, very good. Using it with Claude and I am liking very much! Next I will be installing the HA version, once I figure out how to update my HA container image.

HA has the OpenCode App that runs inside of HA, its also very good

For ha-mcp there are multiple installation methods. GitHub - homeassistant-ai/ha-mcp: The Unofficial and Awesome Home Assistant MCP Server · GitHub

You can actually run it in its own container and connect using a llat and ask it to help with updating your HA container...but I'd recommend installing the embedded version via HACS (link is in the setup guide on the repo) it's the most feature fledged. If embedded doesn't work with your version of HA then use our standalone version and it can help get it set up. It's pretty wild what it can do.

Ended up cleaning my HA container image which updated the HA version, which in turn allowed me to install HA-MCP on HA. The clean and subsequent refresh with Hubitat Maker API caused lots of entity name mapping issues with my HA dashboards. HA-MCP and Claude sorted all this out while I had a cup of tea! Both the Hubitat and HA MCPs are going to save me so much time and frustration. Excellent stuff.

Thank you for the quick fix. I couldn't reply earlier with your requests because of the long weekend and busy with family.

FYI, I have posted a follow up reply to the already closed issue. All working now, with a caveat at the end for future fail proofing.

THANK YOU! I am only scratching the surface of what this MCP Server can do, and I'm already blown away at the ease of being able to have Claude create rules and fix app/driver code, monitor the logs and more.

No worries! Glad the fix worked, I was kind of guessing on the fix to be honest lol. Please feel free to open more issues if more things pop up, this project is always constantly being worked on and improved.

@KingPanther13 This tool is absolutely amazing. The MCP server has allowed me to use Claude to find and diagnose unknown issues, monitor potential issues, create a twice a day scheduled hub health check which also keeps track of monitor previously found issues. It has assisted in letting Claude monitor and analyze logs, update rules, create new rules, find redundancies and conflicts, suggest cleanup/review, and more.

In line with me pushing things to its limits, the most awesome thing I have accomplished this week is to create a polished, searchable, interlinked 500+ page PDF documentation of EVERYTHING on my hub - variables, apps, integrations, booleans, drivers, code, radios, network, configs/settings, and more. The Index is 150 of those pages, and sure one can use the find command in PDF, but I can find a list of anything by any word.

Next task will be to create detailed, individual rule documentation and backups.

There are a handful of things the MCP server cannot access, but the the power of AI with nearly complete access to the hub is simply AMAZING.

I too have been enable us Claude to do some amazing troubleshooting of my many rules. I wrote them all with Gemini but it was all by hand. Passing the baton over to Claude makes me even more productive. No more copy and paste... This is like when the wheel was invented. AI is a double edge sword, it also can hack a secure company in 30 minutes.

I'm glad you guys have gotten good use out of it! I've poured many hours into it, and I'm proud of what it's turned in to.

@neerav.modi for the "handful of things" that it cannot access, feel free to file some feature request issues on the Github, there are many things that I know it's capable of that I haven't implemented simply because nobody has asked for it. If you can access it in the Hubitat UI then chances are I'm able to access it thru the MCP. The more things I add the larger the maintenance surface is, so I tend to not add things that I don't think will get used, but I'll gladly add anything requested (within the realm of possibility of course).

My instance did have an issue writing. I had to do any edit manually which sometimes I prefer. I created a bug that reports. hile working with Claude to edit and clone Hubitat Rule Machine rules tonight, a couple of write operations failed with a generic error. After that, all further attempts to edit or clone any rule failed too, saying too many writes were already in progress — even though nothing was actually still running. Had to end the session and start fresh to get unstuck. Reproduced addAction failing with the same generic "Error occurred during tool execution" on a small, simple rule (167 settings keys, paused test rule) — not just the large ~300-key rules from the original report. Tested with the simplest possible action type:

Call: hub_set_rule with addAction={capability:'comment', text:'Hello this is Claude'}
Confirmed via addAction={capability:'comment', discover:true} that the call shape was exactly correct per the tool's own schema (comment requires only text) — not a usage error on the caller's end
Failed 3 consecutive times, identical generic error each time
No stuck write-lock this time (distinct from the original issue) — just an outright failure to execute
Confirmed via hub_get_app_config after each attempt: zero partial writes, rule completely unchanged

I have a poor memory, so I'll ask my buddy Claude what it wasn't able to access and what screenshots I supplied over the 14 major documentation iterations we've been through. You'll get a complete list of what it can't get, and I'll leave the priority/feasibility to you.

At first, if everything can be read at a minimum, that would useful. Beyond that, if writing some of the basic config/settings happens, then that would be peachy, as I'm looking into creating a commissioning script to set up new hubs for friends and family. I'm all into automating processes, and if I'm setting up a hub for someone else on my own time beyond my own hubs, it's got to be automated! :grinning_face_with_smiling_eyes:

Claude.ai currently has a bug that makes it noncompliant with the new MCP 2.0 spec which is causing a lot of the generic tool errors. Claude Code is unaffected. I'm uncertain about Claude Desktop but I'm assuming it has the same problem though with mcp-proxy it might actually be falling back to the legacy path so maybe it will be fine. Just ask your Claude to use the hub get info tool to check tool completion status. The docstrings in the tools already reflect this but Claude isn't great at reading instructions.

In order to keep it simple (for me? :wink:) I have posted a feature request with a list. List was generated and refined by Claude on my requests.

Yes the desktop is also affected, I haven't gotten around to installing code yet. For now Desktop is the best rule checker in the world and is great with VBR.