Home Assistant and ESPHome for coding agents: states, services, automations, dashboards, flashing.
Home Assistant MCP Server
Published by foreverworksRead your Home Assistant's states, areas and history, and run its actions, approving locks first.
- CATEGORY
- More to explore
- DEPLOYMENT
- Local package
- LATEST SOURCE VERSION
- 0.1.3
- SOURCE CHECKED
- Nov 28, 2026
Quick answers
How do I add Home Assistant MCP Server to Claude Code, Cursor or Codex?
Claude CodeCommand
Run this in your terminal:
claude mcp add --env 'HOME_ASSISTANT_URL=<your-home-assistant-url>' --env 'HOME_ASSISTANT_TOKEN_FILE=<your-home-assistant-token-file>' --transport stdio home-assistant -- npx -y @foreverworks/mcp-home-assistantReplace the <your-…> placeholder with your own HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN_FILE.
CursorConfig
Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project:
{
"mcpServers": {
"home-assistant": {
"command": "npx",
"args": [
"-y",
"@foreverworks/mcp-home-assistant"
],
"env": {
"HOME_ASSISTANT_URL": "<your-home-assistant-url>",
"HOME_ASSISTANT_TOKEN_FILE": "<your-home-assistant-token-file>"
}
}
}
}Replace the <your-…> placeholder with your own HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN_FILE.
CodexCommand
Run this in your terminal:
codex mcp add home-assistant --env 'HOME_ASSISTANT_URL=<your-home-assistant-url>' --env 'HOME_ASSISTANT_TOKEN_FILE=<your-home-assistant-token-file>' -- npx -y @foreverworks/mcp-home-assistantReplace the <your-…> placeholder with your own HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN_FILE.
VS CodeConfig
Add this to .mcp.json at the root of your workspace:
{
"mcpServers": {
"home-assistant": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@foreverworks/mcp-home-assistant"
],
"env": {
"HOME_ASSISTANT_URL": "<your-home-assistant-url>",
"HOME_ASSISTANT_TOKEN_FILE": "<your-home-assistant-token-file>"
}
}
}
}Replace the <your-…> placeholder with your own HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN_FILE.
Claude DesktopConfig
Add this to claude_desktop_config.json, then restart Claude:
{
"mcpServers": {
"home-assistant": {
"command": "npx",
"args": [
"-y",
"@foreverworks/mcp-home-assistant"
],
"env": {
"HOME_ASSISTANT_URL": "<your-home-assistant-url>",
"HOME_ASSISTANT_TOKEN_FILE": "<your-home-assistant-token-file>"
}
}
}
}Replace the <your-…> placeholder with your own HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN_FILE.
ChatGPTNot available
ChatGPT can't add it from its published details: it connects from the cloud and needs a public address, and this server runs on your computer.
ChatGPT setup guideWhich apps can use Home Assistant MCP Server?
Claude Code, Cursor, Codex, VS Code and Claude Desktop can add it from its published details. ChatGPT can't: it connects from the cloud and needs a public address, and this server runs on your computer.
Does Home Assistant MCP Server need an API key?
To run it on your computer, set HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN_FILE first, with values from the publisher.
Is Home Assistant MCP Server official?
It's published by foreverworks. The Official MCP Registry accepts names under com.foreverworks only from someone who proved they control foreverworks.com. We last checked its listing on Nov 28, 2026. A listing shows where a server comes from; it isn't a security review.
Published packages
npm · @foreverworks/mcp-home-assistant@0.1.3