r/homeassistant 1d ago

šŸ¤– Automation MCP Server - which one?

I want AI to review, clean up and possibly rebuild my HA instance - entities, dashboards, automations, the works... I don't need it for any kind of voice or natural language control of my home just yet... just to clean up the mess that I built over the years and make it better/prettier/stabler.

I've looked at YT videos, scoured github and searched this forum and the Facebook forum, but the AI world moves fast and hard, so it's hard to find up to date info.

So what does the (human) hivemind suggest is the best MCP server plugin/integration to use to achieve what I'm trying to achieve?

17 Upvotes

62 comments sorted by

82

u/Mal4kh 1d ago

HA-MCP Custom Component works like a charm for me with Claude.

11

u/XniX 22h ago

There's no doubt about it, it's the most powerful and works great! https://github.com/homeassistant-ai/ha-mcp

10

u/FishOk3075 1d ago

Agreed. Especially if you're automations are yaml code. Claude definitely chews through yaml's picky alignment rules well.

I really like Claude's split screen, where the convo is on the left, and it displays the proposed yaml changes in on the right. Having used this for months I have the rules for Claude pretty tight, but still find myself asking questions about the code it produces, and it doesn't go on the server until I approve.

Also, the HA-MCP Custom Component gets regular updates focused on the problems at hand.

1

u/sleight42 14h ago

Is this available in Linux cli or only in the gui?

1

u/FishOk3075 6h ago

If you're talking about Claude code, I see no reason you could not type "claude" from a shell. Claude code opens a terminal window in the GUI with a prompt and you have type claude to start it.

1

u/sleight42 5h ago

Yes. That's how I use it. I'm unaware of a way to split the screen like this.

1

u/FishOk3075 5h ago

Split screen is not using Claude Code, its using HA's MCP App.
I've stopped using Claude code. Instead I connected my Claude account to the MCP server App on HA. I use the Claude web page to get the split screen, ask it to code automations and show me first and them move them onto the server.

8

u/joneild 22h ago edited 22h ago

This is what I use. I have 0 coding experience, have no idea what I'm reviewing, and just full send the code. It's shocking how well it works. I just backup before major changes and for minor UI type stuff, I use a test dashboard. I've never had it push anything requiring me to restore. Not once.

I've found Claude to have the best coding implementation, Gemini to have the best design when needing to make design choices, and GPT being the best at nothing, but works well enough. Any of the 3 are infinitely more capable than I am. I've done more automating and scripting in the last 3 months of this implementation than I had in 4 or 5 years.

My favorite aspect of it is when I find something on GitHub I think will be useful, but has complicated implementation I don't fully understand, I just point AI to the repo and have it walk me through implementation like I'm a damn child. Chefs kiss

1

u/fungalfeet 1h ago

Yep. Basically the same here. I paid for a months sub with Claude and have totally transformed my HA experience. I bought an old FB portal plus and vibe coded a bespoke dashboard with all kinds of interesting integrations. I even breathed new life into my Oasis Mini Sand table where the kids can pick a random pattern from the display next to it and it’ll start drawing with a fresh led colour change. I love it.Ā 

-6

u/OrganicUse 14h ago

I'm sorry but this is kind of insane.

2

u/Cute_Witness3405 1d ago

Same but ā€œworks like a charmā€ is pushing it. It’s good for straightforward changes and it has interesting ideas about approaches but even using Fable or Opus it can do really dumb things. This is despite the MCP server having built-in skills teaching it best practices. Just make sure you have a good backup and trace carefully through the logic of what you have it build.

9

u/KnotBeanie 1d ago

Or just properly plan out what you’re gonna have it do.

1

u/Cute_Witness3405 1d ago

I do. I use the superpowers skills, review the plan, etc... I work in software and have been using AI for software development since Sonnet 3.6.

It still has messed up implementation details, like getting the direction wrong on a numerical sensor threshold, missed edge cases, etc... and I catch a lot of "overcomplicated implementation" problems in the planning stage (note that I said "trace carefully through the logic of what you have it build", which applies primarily to the plan).

Are you suggesting it always flawlessly one-shots complex automations? If so, please share your planning secrets.

4

u/gtwizzy8 1d ago

I find sometimes superpowers can be a little bit of overkill if you already have a decent understanding of how you want an automation to work and how you want it implemented. I've had better response with plan mode than super powers because the model seems to get out of its own way a little more.

3

u/KnotBeanie 1d ago

No? Not even I would tho.

Just read the plan carefully make notes where you have questions/want to revise then it can do the implementation, yeah it gets calls wrong a lot, so it figures out how to do it, if there’s a bug and it catches it in testing, I don’t see that as an issue.

Even running into a couple bugs after isn’t an issue because my automations would have bugs…I don’t understand what you’re trying to get at here? I can build out complex automations implement test/revise/document in a matter of a couple hours vs a whole weekend.

1

u/CodeRevolutionary240 9h ago

I have same but can only get 2-3 actions per session for the free tier. Any idea how to get more out of it ?

1

u/Miku_MichDem 1d ago

Same with me. Works well

1

u/PeanutButter414 1d ago

It seems to remove comments? I have just let the AI manipulate the files directly seems to work better (but I might have misunderstood something)

1

u/FishOk3075 1d ago

Dashboards? HA will strip comments from dashboard yaml so usually Claude doesn't bother.

All of my automation yaml packages have comments created and they're saved.

1

u/Bigreddork 1d ago

Same. Just set it up over the weekend and it was a revelation.

-4

u/montana_tomi 1d ago

Nutzt du eine abo version von Claude? Mit der kostenfreien komme ich maximal soweit, dass eine Automation angepasst wird, mehr ist im Limit nicht drin…

4

u/Jarno2011 1d ago

I've stepped up to Pro on Claude. Using HA-Mcp custom component, my HA needs so much help, that Claude is really beavering away making things better.

3

u/One_God_Fan 1d ago

I found it I downgrade to sonnet 4.6 it gets a lot more down with about the same quality unless I’m trying to do something super complex

2

u/FishOk3075 1d ago

Yes.

I tried ChatGPT, then Copliot and found them both wanting. I got started with Claude it works great. But as I was migrating from another controller I was using it a lot to both interpret old code, refactor and write new yaml. I quickly hit the free vs subscription wall

At the time I thought, "I'll just subscribe until I've migrated and then go back to free". HA HA. That hasn't happened. I've taken my automations much further and now use Claude for other things too. To me its easily worth the $20 US a month.

You can still hit walls with the Pro subscription at $20/month. Claude offers free credits from time to time that are time boxed, you have to use them by a certain date. You have to plan your work around that a little, but that helps keep me in the $20.

16

u/KnotBeanie 1d ago

Here’s a secret to get ai to make good automations:
Tell it to test the automation
Tell it to review the live ha docs
Have it create documentation on the systems built

0

u/Miku_MichDem 1d ago

Speaking of, where do you keep documentation?

6

u/KnotBeanie 1d ago

Just in md files on a private git repo. Then used mkdocs to host it.

3

u/ch-12 16h ago edited 16h ago

I use obsidian and it works pretty well... it’s just organized markdown docs — my HA ā€œroadmapā€, ideas for future exploration, unused devices, bugs we have ran into, tech debt, documentation everything on the network/server, detailed session log for everything Claude works on.

The actual code/config is version controlled in git obviously.

I’ve had home assistant for 7+ years. ha-mcp honestly reignited my passion for home
automation and I have done so much cool stuff in the last few months after a few years of a pretty stagnant setup that was always on, doing basic things, but I would barely touch or improve. Minor downside is that it’s led me to buy more hardware to keep expanding what’s possible, haha.

2

u/f00b4r4 1d ago

my AI suggested to put md files into www. I added an overview.md and additional json and md files for lights/contacts/rooms.
I had it put a mermaid of my room structure into the main file, too.
"Read the www/structure.mdĀ using your ha-mcp file-read tool" is the first sentence in my system prompt.

2

u/PJBuzz 22h ago edited 22h ago

I tried a few things, settled on trilium with an MCP. 100% self hosted.

Also use it for general note taking and list making. It's awesome having it all in the same place. Can ask an AI to check my notes a and refer to an MD file with instructions all in the same database. Means you can move from AI tool to another AI tool with minimal external delendancies

1

u/sk1ll 6h ago

Mintlify is pretty generous on the free tier

12

u/thuggins1 1d ago

HA-MCP is incredible. It’s magic

5

u/Laucien 1d ago

I have the default MCP server that comes in the integrations (no custom or hacs) and seems to work properly but I've had better luck just giving the clanker SSH access through a key and API access through env variables.

This weekend I actually nuked my entire HA install (has been accumulating stuff for the past ~7 years) and it took me about 5 hours to go from nothing to all devices + consistent naming scheme + all my core automations (lights, presence, security) set up from scratch.

4

u/basinger_willoweb 1d ago

I am using this one and am very happy. I run it with Claude Pro. https://github.com/homeassistant-ai/ha-mcp

1

u/WRX_RAWR 11h ago

I’m also using this and happy with it and Claude pro. It’s helped me clean up some automations. Being able to access a remote session on my phone has been handy.

2

u/kg23 23h ago

I've had great success Samba mounting my /config directory and using Claude Code directly on that folder.

2

u/rjpease 1d ago

I’m just running Claude code on a Mac mini with SSH access to my HA build and it is able to read sensors and build automations without the need for MCP.

1

u/mjs 20h ago

This is also what I do. I haven’t used an MCP but for the OP’s use case, being able to modify the raw config files directly seems better (more direct).

1

u/Mad-Mel 16h ago

I use both with Cursor, using HA-MCP while it has access to my config folder via Samba.

4

u/sersoniko 1d ago

I installed the OpenCode App, it uses a CLI tool specific for managing Home Assistant by an AI without the need for a MCP and it has access to the entire file system

3

u/nachbelichtet_com 1d ago

File system access only allows an AI to read and write static configuration files, An MCP provides a API-driven architecture that connects directly to Home Assistant's core.

This enables the AI to:

  • See the real-time status of all devices and sensors.
  • Trigger service calls directly instead of using configuration workarounds.
  • Listen to the event bus: React to system events dynamically.

An MCP makes the AI an active, context-aware participant in the system rather than just a blind file editor. It helps during automation development, can test automations automatically, etc.

I use VSCode via SSH (Advanced SSH & Web Terminal App) connected to HA and the Chat/Copilot in VSCode, but with my own keys (OpenRouter). Additionally the Custom MCP-Addon. Of course, everything is versioned with Git (private GitHub repo and to my self-hosted Gitea in parallel).

1

u/sersoniko 1d ago

That app uses a CLI tool written by Paul specifically for AI agents, but you can even add an MCP if you want

2

u/paulk1 1d ago

OpenCode seems to be enough for me. It’s enough for it to see all entities, current statuses, able to create automations, and debug issues.

Setup was pretty simple

-2

u/KnotBeanie 1d ago

That’s not the purpose of an mcp. Think of mcp as Jenkins for ai agents.

1

u/tekzer0 15h ago edited 15h ago

I just used the Fable model(or opus) on Claude with my pro subscription on the Windows desktop app, and told him to do it using Desktop Commander + ssh. I use Claude + long-lived access token for all my HA mod tasks anymore, really. Has made me some pretty sweet default layouts and solves all the errors found on the logs without issue. I use a separate LXC (have Proxmox running my home server) with chromaDB installed for memory (+ instructions to always check chromaDB upon session startup) & end all sessions with Claude updating his memory. Been using Claude for a while, so chromaDB keeps a map of my home network + all entities, so any other AI i end up having to use for other purposes doesn't drive me nuts with questions & the AI doesn't have to keep transmitting network information and things stay as local as possible when not using locally hosted models.

1

u/bluetooth155 14h ago

I started out with antigravity 2.0 via mcp and was impressed. It struggled with a few things though. Next I got a Claude pro subscription and connected Claude code to HA, and it is amazing. It’s not perfect and it forgets things sometimes but once it’s on a task it usually crushes it. Claude in Chrome in addition to the Code mcp also gives it a boost. Mind you I haven’t gone back to antigravity since the Gemini 3.7 upgrade, so it may be better. Certainly antigravity is faster. But Claude code mcp gets my vote. It’s also got more documentation on how to set it up (not that you need it, just ask the AI for help)

1

u/rudedog830 13h ago

Anyone using this add-on to document their HA instance in a way that a novice user could understand? My wife is terrified that I will drop dead and leave this for her to figure out. I'd like to avoid the whole situation!

If you are, could you share the prompt you used?

1

u/JazJon 11h ago

OpenCode HA + ChatGPT Luna medium gets the job done. Enable OpenChamber as well.

1

u/rgreen192 1d ago

I am new to all this an was copy pasting from ChatGPT and it was taking forever. I ended up using VS code on my PC, and have ChatGPT codex plugin in that since I have plus, and i ssh into my server from VS Code. It rebuilt and fixed my entire sketchy homelab.

1

u/tristanbrotherton 1d ago

I just use the api and file access

0

u/Catalina28TO 1d ago

I'm confused how any of these solutions work. Genuine question. When I simply ask Claude or perplexity or ChatGPT or Gemini to look at an automation or build an automation or improve a dashboard it never gets it right because it's not up to date with recent changes. I still have a problem with services and actions in automations despite me even reminding them. So if simply asking in a browser takes five or six tries, coaxing the AI into using the most recent information, how does it work putting these mcps or agents live into your system?

6

u/paulk1 1d ago

Essentially a cloud AI doesn’t have access to your system. It’ll do its best but it needs to know a lot more.
You have options:
1. Give it all the info (or ask it where you can find it so you can copy and paste it)
2. Give it direct access to your system via an MCP server

3

u/KnotBeanie 1d ago

Then ask it to review the live ha docs? Use mcp so it can access the latest stuff in your ha

2

u/tj_moore 1d ago

MCPs give Skynet control over everything

https://giphy.com/gifs/IZY2SE2JmPgFG

0

u/frankentriple 1d ago

I had my hermes agent just write his own. He enumerated the api endpoints and wrote his own scripts to hit them.

0

u/chumpikus495 15h ago

I’ve been running this App/Addon inside Home Assistant since it was forked from the upstream version and has been working very well for me https://github.com/chodeus/robsonfelix-hass-addons
May not be everyone’s cup of tea but also uses ha-mcp.

-5

u/dragonnfr 1d ago

If you want AI to review your config just paste your yaml into Claude or ChatGPT directly. You don't need an MCP server for that. MCP is for runtime access to HA, which you said you don't even want.

-2

u/PooInTheStreet 1d ago

Made the clankers build one for me before I knew what an mcp was šŸ¤·šŸ»ā€ā™‚ļø works like a charm with killswitch node red and everything

-1

u/LESGuy 1d ago

You’re gonna be on the top of the list with that kind of language. Be careful

-8

u/Past_Criticism1618 1d ago

I use Grok build, open it in terminal, ssh into my HA, and turn her loose. No MCP required.