Niles, an MCP for HomeKit
What it is I’m really into configuring my smart home and I’ve always found HomeKit to be a nightmare to work with. There are no ways to programmatically create scenes move accessories around, etc. I built Niles, an MCP that runs on your phone and receives requests to update your smart home.
All requests are require approval, so you don’t have to worry about agents making mistakes.
If there’s enough interest I may put this on the App Store, but for now it’s just open source.
How I built it I built this using Obvious, the platform I work on. Our factory generally promotes spec driven development so my initial requirements were running a server from the phone, reading and writing HomeKit, and the approval queue.
The HomeKit APIs are not great. I had my agent do a full audit of what was available in the sdk and it took some trial and error to get right.
This also has to run on iOS. The Mac OS sdk doesn’t support writing to HomeKit, so it had to run on the phone.
What surprised me or went wrong I spent a lot of time on the skill and the interface for the agent. The naive approach is a 1:1 mapping of the sdk to the MCP but that requires a ton of context.
I ended up distilling it down to just the 4 CRUD operations for scenes, groups, and entities.
My evals were largely on my home, so I’m interested to see what bugs others run into.
I also spent time making pairing as simple as possible. The copy prompt button is a nice affordance.
0 comments
No comments yet.