View and control Home Assistant entities such as lights, switches and sensors.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add home-assistant --env BASE_URL='<BASE_URL>' --env TOKEN='<TOKEN>' -- docker compose up -d~/.codex/config.toml
[mcp_servers.home-assistant]
command = "docker"
args = ["compose", "up", "-d"]
env = { BASE_URL = "<BASE_URL>", TOKEN = "<TOKEN>" }
# codex mcp add home-assistant --env BASE_URL='<BASE_URL>' --env TOKEN='<TOKEN>' -- docker compose up -d~/.cursor/mcp.json
{
"mcpServers": {
"home-assistant": {
"command": "docker",
"args": [
"compose",
"up",
"-d"
],
"env": {
"BASE_URL": "<BASE_URL>",
"TOKEN": "<TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"home-assistant": {
"type": "stdio",
"command": "docker",
"args": [
"compose",
"up",
"-d"
],
"env": {
"BASE_URL": "<BASE_URL>",
"TOKEN": "<TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"home-assistant": {
"command": "docker",
"args": [
"compose",
"up",
"-d"
],
"env": {
"BASE_URL": "<BASE_URL>",
"TOKEN": "<TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"home-assistant": {
"command": "docker",
"args": [
"compose",
"up",
"-d"
],
"env": {
"BASE_URL": "<BASE_URL>",
"TOKEN": "<TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"home-assistant": {
"command": "docker",
"args": [
"compose",
"up",
"-d"
],
"env": {
"BASE_URL": "<BASE_URL>",
"TOKEN": "<TOKEN>"
}
}
}
}Environment variables
BASE_URLTOKEN
Replace the placeholders with your own credentials and keep them out of version control.