Control Apple Home accessories from a terminal script
Let Claude Desktop or Cursor turn off lights via MCP
Export and version-control scenes as JSON files
Requires the native macOS companion app from the App Store to hold real HomeKit permissions; the Node packages talk to that app.
Homekit is a project that lets you control an Apple Home setup, meaning the lights, locks, thermostats, scenes, and automations registered in Apple's smart home app, by typing commands in a terminal or by talking to an AI assistant. Apple normally only exposes this through its own apps on iPhone or Mac, so this project acts as a bridge that opens it up to scripts and to AI agents. There are three ways to use it. The first is a command line tool called homekit-cli, installed with npm install -g homekit-cli. After running homekit auth once to grant access, the user can run commands like homekit list to see all accessories, homekit set "Living Room Lights" on, homekit set "Living Room Dimmer" 40 to dim to 40 percent, homekit scene "Good Morning" to activate a scene, or homekit automation run "Goodnight" to trigger an automation. Scenes can also be exported and imported as JSON files. The second way is an MCP server called homekit-mcp. MCP, the Model Context Protocol, is a standard for letting AI assistants call external tools. The README shows the config snippets needed to plug it into Claude Desktop, Cursor, and Windsurf, after which the user can ask the agent things like turn off all the lights in the bedroom or set the thermostat to 72 degrees. The server exposes a fixed set of tools, including listing and setting accessories, activating and creating scenes, and running automations. The third way is a plugin for an agent framework called openclaw, added with openclaw plugin add homekit and listed in openclaw.yaml. Under the hood, the CLI and MCP packages are pure Node.js. They talk to Apple Home through a native macOS companion app, written in Swift and SwiftUI and distributed on the App Store, which holds the actual HomeKit permissions. The repository is a monorepo with packages for the CLI, the MCP server, and the openclaw plugin. It is MIT licensed and currently has 0 stars.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.