Home Assistant
v0.1.4Read your Home Assistant's states, areas and history, and run its actions, approving locks first.
Values you need
| Variable | What it is | |
|---|---|---|
HOME_ASSISTANT_URL | required | The address you open Home Assistant at, such as http://homeassistant.local:8123. |
HOME_ASSISTANT_TOKEN_FILE | required | Path of a file holding a long-lived access token made in an administrator's Home Assistant profile. |
HOME_ASSISTANT_CONFIRM_DOMAINS | optional | Action domains you approve call by call, comma-separated (default lock,alarm_control_panel,cover,valve; none for none). |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add home-assistant -e 'HOME_ASSISTANT_TOKEN_FILE=<HOME_ASSISTANT_TOKEN_FILE>' -e 'HOME_ASSISTANT_URL=<HOME_ASSISTANT_URL>' -- npx -y @foreverworks/mcp-home-assistant@0.1.4Add to
claude_desktop_config.json{
"mcpServers": {
"home-assistant": {
"args": [
"-y",
"@foreverworks/mcp-home-assistant@0.1.4"
],
"command": "npx",
"env": {
"HOME_ASSISTANT_TOKEN_FILE": "<HOME_ASSISTANT_TOKEN_FILE>",
"HOME_ASSISTANT_URL": "<HOME_ASSISTANT_URL>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"home-assistant": {
"args": [
"-y",
"@foreverworks/mcp-home-assistant@0.1.4"
],
"command": "npx",
"env": {
"HOME_ASSISTANT_TOKEN_FILE": "<HOME_ASSISTANT_TOKEN_FILE>",
"HOME_ASSISTANT_URL": "<HOME_ASSISTANT_URL>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "HOME_ASSISTANT_TOKEN_FILE",
"id": "home-assistant-token-file",
"password": true,
"type": "promptString"
},
{
"description": "HOME_ASSISTANT_URL",
"id": "home-assistant-url",
"password": true,
"type": "promptString"
}
],
"servers": {
"home-assistant": {
"args": [
"-y",
"@foreverworks/mcp-home-assistant@0.1.4"
],
"command": "npx",
"env": {
"HOME_ASSISTANT_TOKEN_FILE": "${input:home-assistant-token-file}",
"HOME_ASSISTANT_URL": "${input:home-assistant-url}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.home-assistant]
command = "npx"
args = ["-y", "@foreverworks/mcp-home-assistant@0.1.4"]
env = { "HOME_ASSISTANT_TOKEN_FILE" = "<HOME_ASSISTANT_TOKEN_FILE>", "HOME_ASSISTANT_URL" = "<HOME_ASSISTANT_URL>" }For AI agents
- Ask the user for: HOME_ASSISTANT_URL, HOME_ASSISTANT_TOKEN_FILE. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: call_action, call_action_confirmed, get_states, health, history, list_actions, list_areas, list_entities, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json