原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Home Assistant

作者:foreverworks版本 0.1.2i★ –i在你的电脑上运行
注册名称com.foreverworks/home-assistant

安装

概览

作者提供的说明(英文原文)

Read your Home Assistant's states, areas and history, and run its actions, approving locks first.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他
  • 你需要填写:HOME_ASSISTANT_URL, HOME_ASSISTANT_TOKEN_FILE

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: HOME_ASSISTANT_URL, HOME_ASSISTANT_TOKEN_FILE, HOME_ASSISTANT_CONFIRM_DOMAINS

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "home-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-home-assistant"
      ],
      "env": {
        "HOME_ASSISTANT_URL": "your-value",
        "HOME_ASSISTANT_TOKEN_FILE": "your-value",
        "HOME_ASSISTANT_CONFIRM_DOMAINS": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add home-assistant --env HOME_ASSISTANT_URL=your-value --env HOME_ASSISTANT_TOKEN_FILE=your-value --env HOME_ASSISTANT_CONFIRM_DOMAINS=your-value -- npx -y @foreverworks/mcp-home-assistant

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "home-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-home-assistant"
      ],
      "env": {
        "HOME_ASSISTANT_URL": "your-value",
        "HOME_ASSISTANT_TOKEN_FILE": "your-value",
        "HOME_ASSISTANT_CONFIRM_DOMAINS": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "home-assistant": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-home-assistant"
      ],
      "env": {
        "HOME_ASSISTANT_URL": "your-value",
        "HOME_ASSISTANT_TOKEN_FILE": "your-value",
        "HOME_ASSISTANT_CONFIRM_DOMAINS": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • HOME_ASSISTANT_URL 必填 env
    The address you open Home Assistant at, such as http://homeassistant.local:8123.
  • HOME_ASSISTANT_TOKEN_FILE 必填 env
    Path of a file holding a long-lived access token made in an administrator's Home Assistant profile.
  • HOME_ASSISTANT_CONFIRM_DOMAINS env
    Action domains you approve call by call, comma-separated (default lock,alarm_control_panel,cover,valve; none for none).

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过域名 foreverworks.com 验证(注册中心会核实域名所有权)

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 18490 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 18490 个服务器的 89% 更新
  • 基础检查结果等于或优于此分类中其他 18490 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Home Assistant 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:HOME_ASSISTANT_URL, HOME_ASSISTANT_TOKEN_FILE

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.1.2)于5天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, Talexio MCP by usefulapi

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

作者:formulahendry起步阶段↓ 66/周★ 44014个月前更新

在你的电脑上运行

Remote Desktop Commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

作者:desktop-commander正在增长★ 2113天前更新

在云端运行✓ desktopcommander.app

Talexio MCP by usefulapi

Read employees, approved pay lines, approved time off and shift templates in Talexio.

作者:m190起步阶段今天更新

在云端运行✓ usefulapi.io

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Home Assistant MCP server

Read your Home Assistant's entities, areas, history and logbook from your AI assistant, ask it anything a template can answer, and run its actions: dim a light, set a thermostat, start a script. Running an action is the only thing that changes anything, and actions on locks, alarm panels, covers and valves are approved by you, call by call, before they run. Nothing here moves money.

You need a Home Assistant this machine can reach (on your network or through its remote address) and a long-lived access token. A token of a user who is not an administrator is the recommended choice: every tool works with it except render_template, and the server refuses by itself, without asking Home Assistant, the few actions Home Assistant keeps for administrators (reloads, restarts and the like). An administrator's token adds those. There is no account to open and no cost. A wrong token costs a failed login, and Home Assistant may ban an address after a few, so the server never sends a refused token twice.

What you can ask

  • "Which lights are on right now?"
  • "How did the living room temperature change overnight?"
  • "Who or what unlocked the front door this morning?"
  • "Which devices are in the hallway?"
  • "Dim the kitchen light to 30 percent."
  • "Lock the front door." (you approve it first)

Install

.%22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40foreverworks%2Fmcp-home-assistant%22%5D%2C%22env%22%3A%7B%22HOME_ASSISTANT_URL%22%3A%22%24%7Binput%3Ahome_assistant_url%7D%22%2C%22HOME_ASSISTANT_TOKEN_FILE%22%3A%22%24%7Binput%3Ahome_assistant_token_file%7D%22%2C%22HOME_ASSISTANT_CONFIRM_DOMAINS%22%3A%22%24%7Binput%3Ahome_assistant_confirm_domains%7D%22%7D%7D)

With Claude Code:

claude mcp add home-assistant -e HOME_ASSISTANT_URL="<Home Assistant address>" -e HOME_ASSISTANT_TOKEN_FILE="<path to Long-lived access token file>" -- npx -y @foreverworks/mcp-home-assistant

Claude Desktop (Settings, Developer, Edit Config) and most other clients read the same command as JSON:

{

"mcpServers": { "home-assistant": { "command": "npx", "args": ["-y", "@foreverworks/mcp-home-assistant"], "env": { "HOME_ASSISTANT_URL": " ", "HOME_ASSISTANT_TOKEN_FILE": " " } } } }

Each runs the published package on Node 22.19 or newer. VS Code and the Claude Desktop bundle ask for each setting as they add the server; leave an optional one empty. Cursor reads each from your environment instead (${env:HOME_ASSISTANT_URL} and so on), so set them before you start Cursor. The commands above set only what is required; Configuration has the rest.

From a clone
git clone https://github.com/foreverworks/mcps.git && cd mcps

npm ci && npm run build claude mcp add home-assistant -e HOME_ASSISTANT_URL=" " -e HOME_ASSISTANT_TOKEN_FILE=" " -- node "$PWD/servers/home-assistant/dist/index.js"

In a JSON configuration, the command is node and its one argument the full path of servers/home-assistant/dist/index.js. To share one running copy between several clients over HTTP, see docs/deploying.md.

Configuration

VariableRequiredMeaning
HOME_ASSISTANT_URLyesThe address you open Home Assistant at, such as http://homeassistant.local:8123 or https://ha.example.com, without /api. A path prefix is kept, for an instance behind a proxy.
HOME_ASSISTANT_TOKEN_FILEyesA file holding the long-lived access token and nothing else (HOME_ASSISTANT_TOKEN takes the token itself, for a local run).
HOME_ASSISTANT_CONFIRM_DOMAINSnoThe action domains you approve call by call, separated by commas. Default lock,alarm_control_panel,cover,valve; none for none. A value that is not a list of domains refuses every action until it is fixed, so a typo never turns approval off.

Every call reads these again, so a corrected value takes effect on the next call without a restart. With them unset the server still starts and lists its tools, and each tool answers a config error naming what is missing.

A deployment that sets MCP_EGRESS_ALLOW must allow the host of HOME_ASSISTANT_URL (homeassistant.local for the address above): the server reaches nothing else, over HTTP or its WebSocket. A sandbox that closes private networks (systemd's IPAddressDeny) must open the instance's address (docs/deploying.md). The variables every server shares are in docs/configuration.md.

Getting a long-lived access token
  1. Make a person for the assistant in Settings, People, let it log in, and leave Administrator off; then sign in as that user. The logbook then names it as the cause of what it does, and it can do everything in your home's entities but change Home Assistant itself. Use an administrator only if you want render_template and the admin-only actions: Home Assistant answers anyone else's request for those with a 401 that it counts as a failed login, which is why this server learns whose token it holds and never sends them one.
  2. Open your profile (your name at the bottom of the sidebar) and its Security tab.
  3. Under Long-lived access tokens, select Create token, give it a name such as "MCP server", and copy the token. Home Assistant shows it once; it is valid for ten years unless you delete it there.
  4. Save it alone in a file only you can read, and point HOME_ASSISTANT_TOKEN_FILE at it:
   umask 077 && printf '%s\n' '<the token>' > home-assistant-token

First run

  1. Ask for health. A good answer says ok: true, the version, state: RUNNING, the time zone, websocket: ok, the token's user and whether it is an administrator (if not, unavailable_tools lists render_template), and how many entities each domain has.
  2. Ask what is in an area, or which lights are on, to see list_areas and list_entities at work, then try an action on a light.
  3. If health answers auth, fix the token before anything else: see Troubleshooting.

Tools

read changes nothing; write runs an action in your home; write in bold is approved by you before every call (below).

ToolAccessWhat it does
healthreadWhether the server works with the instance: version, state, time zone, whether the WebSocket API signs in, and entities per domain; ok: false with the problem.
list_entitiesreadFinds entities by domain, area or words: one row each with id, name, state, unit and area (up to 1,000, default 100).
get_statesreadThe state of up to 50 entities, with their attributes and when they last changed.
list_areasreadEvery area (or one) with its floor, devices and entities, from Home Assistant's registries.
historyreadHow up to 20 entities' states changed over a window (default the last 24 hours, at most 31 days), keeping the newest changes.
logbookreadWhat happened over a window, optionally for one entity, with what caused each entry: a user, an action, an automation.
list_actionsreadThe actions on offer: every domain's action names, or one domain's actions with their fields.
render_templatereadRenders a Home Assistant template, with its states and helpers; with an administrator's token only.
call_actionwriteRuns an action on a target (entities, devices, areas, floors or labels) with its data, and answers with the states that changed; refuses one you approve call by call, and one only an administrator may run when the token's user is not one.
call_action_confirmedwriteThe same, for any action, after you approve the call.
Confirmation

call_action refuses, with needs_confirmation and before sending anything, an action that needs your approval:

  • an action in one of HOME_ASSISTANT_CONFIRM_DOMAINS (lock.unlock, cover.open_cover, alarm_control_panel.alarm_disarm, valve.open_valve);
  • an action of another domain aimed at an entity of one (homeassistant.toggle on cover.garage_door);
  • a homeassistant action aimed at devices, areas, floors, labels or all, which can reach any of them.

Those go through call_action_confirmed, which is confirmed like a payment, though nothing is paid: your client asks you before each call (Claude Code does, in every permission mode). With MCP_CONFIRM=elicit the server asks you itself, in one line computed from the call that will run, a code or a password shown as ****:

home-assistant: run the Home Assistant action lock.unlock on lock.front_door, with code=****

MCP_MAX_ACCESS=read turns both action tools off and leaves every read. How each client asks is in docs/security.md.

Troubleshooting

`auth`, status 401. Home Assistant refused the token: it was deleted, its user was removed or deactivated, or it was copied short. Make a new one (above) and put it in the token file. Until the file holds another token or the server restarts, every call answers auth with sent: false and sends nothing, because Home Assistant logs each refusal as a failed login and can ban the address.

`auth`, status 403. Home Assistant, or a proxy in front of it, refuses this machine's address. Usually Home Assistant banned it after failed logins: remove the address from ip_bans.yaml in Home Assistant's configuration folder, restart Home Assistant, check the token, then restart this server.

`unreachable`. Nothing answered at HOME_ASSISTANT_URL. Check that Home Assistant runs and that this machine reaches it: a browser here should open the same address. The message names what the network said (ECONNREFUSED: nothing listens on that port; ENOTFOUND: the name

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx