Homebridge
概览
作者提供的说明(英文原文)
Control Homebridge accessories and scenes, manage plugins and config.json, and read logs
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 开发者工具
- 你需要填写:HOMEBRIDGE_URL, HOMEBRIDGE_TOKEN, HOMEBRIDGE_PASSWORD
安装
选择你使用的 AI 应用,然后复制设置。
通过 2/2 项检查 · 在你的电脑上运行
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude,但需要先准备
不需要密钥,不用安装程序 · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
双击文件,然后在电脑版 Claude 应用中点击 Install
试一试
用 Homebridge 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 Homebridge,或回答中出现 Homebridge 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
ChatGPT 暂时无法连接 Homebridge
Homebridge 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器
你可以改用这些方式
A · 使用能连接 Homebridge 的应用
- 不需要密钥,不用安装程序 · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
- 需要 Homebridge 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
- 需要 Homebridge 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
- 需要 Homebridge 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
B · 开发者工具 类中能连接 ChatGPT 的其他服务器
从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的
- Sentry✓ ChatGPT
- Front-End Checklist✓ ChatGPT
- Compiler Explorer✓ ChatGPT
可连接 Claude Code,但需要先准备
需要 Homebridge 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
打开终端
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
粘贴这条命令并按 Enter
claude mcp add homebridge-ai-kit --env HOMEBRIDGE_URL=your-value --env HOMEBRIDGE_TOKEN=your-value --env HOMEBRIDGE_USERNAME=your-value --env HOMEBRIDGE_PASSWORD=your-value --env HOMEBRIDGE_READ_ONLY=your-value -- npx -y @mp-consulting/homebridge-ai-kit mcp按 Enter 前,把“your-value”改成你的密钥
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 Claude Code 中输入 /mcp
应能看到 Homebridge 在列表中并显示已连接
试一试
用 Homebridge 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 Homebridge,或回答中出现 Homebridge 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor,但需要先准备
需要 Homebridge 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
填写你的密钥
在 Homebridge 的设置中,HOMEBRIDGE_URL, HOMEBRIDGE_TOKEN, HOMEBRIDGE_USERNAME, HOMEBRIDGE_PASSWORD, HOMEBRIDGE_READ_ONLY 还是空的,填入你的密钥并保存
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 Cursor 中以 Agent 模式打开 AI 聊天
试一试
用 Homebridge 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 Homebridge,或回答中出现 Homebridge 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code,但需要先准备
需要 Homebridge 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
填写你的密钥
在 Homebridge 的设置中,HOMEBRIDGE_URL, HOMEBRIDGE_TOKEN, HOMEBRIDGE_USERNAME, HOMEBRIDGE_PASSWORD, HOMEBRIDGE_READ_ONLY 还是空的,填入你的密钥并保存
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 VS Code 中以 Agent 模式打开 AI 聊天
试一试
用 Homebridge 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 Homebridge,或回答中出现 Homebridge 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
开发者专用:终端命令和 JSON 设置
安装在电脑上
Claude Code
claude mcp add homebridge-ai-kit --env HOMEBRIDGE_URL=your-value --env HOMEBRIDGE_TOKEN=your-value --env HOMEBRIDGE_USERNAME=your-value --env HOMEBRIDGE_PASSWORD=your-value --env HOMEBRIDGE_READ_ONLY=your-value -- npx -y @mp-consulting/homebridge-ai-kit mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"homebridge-ai-kit": {
"command": "npx",
"args": [
"-y",
"@mp-consulting/homebridge-ai-kit",
"mcp"
],
"env": {
"HOMEBRIDGE_URL": "your-value",
"HOMEBRIDGE_TOKEN": "your-value",
"HOMEBRIDGE_USERNAME": "your-value",
"HOMEBRIDGE_PASSWORD": "your-value",
"HOMEBRIDGE_READ_ONLY": "your-value"
}
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"homebridge-ai-kit": {
"command": "npx",
"args": [
"-y",
"@mp-consulting/homebridge-ai-kit",
"mcp"
],
"env": {
"HOMEBRIDGE_URL": "your-value",
"HOMEBRIDGE_TOKEN": "your-value",
"HOMEBRIDGE_USERNAME": "your-value",
"HOMEBRIDGE_PASSWORD": "your-value",
"HOMEBRIDGE_READ_ONLY": "your-value"
}
}
}
}VS Code (mcp.json)
{
"servers": {
"homebridge-ai-kit": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mp-consulting/homebridge-ai-kit",
"mcp"
],
"env": {
"HOMEBRIDGE_URL": "your-value",
"HOMEBRIDGE_TOKEN": "your-value",
"HOMEBRIDGE_USERNAME": "your-value",
"HOMEBRIDGE_PASSWORD": "your-value",
"HOMEBRIDGE_READ_ONLY": "your-value"
}
}
}
}需要你填写的值
HOMEBRIDGE_URL必填 envHomebridge UI URL, e.g. http://192.168.1.100:8581HOMEBRIDGE_TOKEN机密 envHomebridge UI API token (Glass UI, hbg_…); replaces username and passwordHOMEBRIDGE_USERNAMEenvHomebridge UI username, when no token is setHOMEBRIDGE_PASSWORD机密 envHomebridge UI password, when no token is setHOMEBRIDGE_READ_ONLYenvtrue registers only read-only tools
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
一览
哪些应用可以使用它
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
在你的电脑上运行,适用于
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月11日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 mp-consulting 验证,该账户拥有此仓库
- ✓ 通过
仍在维护
代码最后更新于4天前
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
讨论
提问、分享技巧或报告无法使用。按“有帮助”数量排序。
用户评价
还没有评价
与“开发者工具”中的其他服务器比较i
- 星标数多于此分类中其他 5757 个服务器的 90%
- 发布到注册中心的时间比此分类中其他 5757 个服务器的 59% 更新
- 基础检查结果等于或优于此分类中其他 5757 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Homebridge 安全吗?
它在 2 项适用的基础检查中通过了 2 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:HOMEBRIDGE_URL, HOMEBRIDGE_TOKEN, HOMEBRIDGE_PASSWORD
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于4天前,最新版本(3.1.3)于20天前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js, MCPB。
有什么可以替代它?
同一分类中有:REA, Netdata, Front-End Checklist
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Netdata
Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Front-End Checklist
Review frontend code and live pages against 386 quality-gated web development rules.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
@mp-consulting/homebridge-ai-kit
AI toolkit for Homebridge, in one package:
- An MCP server that lets AI assistants (Claude Desktop, Claude Code, Cursor) control accessories, manage plugins, edit configuration and read logs, over stdio or Streamable HTTP.
- The Assistant: provider adapters (Claude, OpenAI, Gemini, any OpenAI-compatible server), an agent loop wired to the MCP tools, and ready-made features (log doctor, config copilot, device-error explainer, update-risk briefing, organiser, daily digest). Homebridge Glass UI and the MP Consulting plugins use these.
- A Homebridge plugin (
HomebridgeAiKitplatform) with a settings page to pick the provider and model, test the connection, serve MCP over HTTP and generate client configs.
The AI building blocks that don't need MCP also ship on their own as @mp-consulting/homebridge-ai-core — see Packages.
Renamed from `@mp-consulting/homebridge-mcp-server`. The old
homebridge-mcp-servercommand still works, so existing MCP client configs don't need to change. See Migrating from homebridge-mcp-server.
Contents
- Packages
- Features
- Providers
- Homebridge plugin · MCP tokens
- MCP server
- Library API
- Security
- Migrating from homebridge-mcp-server
- Development
Packages
This repository is an npm workspace that publishes two packages, both at version 2.0.0:
| Package | Use it for | Runtime dependencies |
|---|---|---|
@mp-consulting/homebridge-ai-core | Homebridge plugins. The plugin-UI Assistant routes (registerAiRoutes from ./plugin), providers, redaction, prompts, config and the Assistant features (everything except runAgent). | ajv only |
@mp-consulting/homebridge-ai-kit (this package) | Homebridge Glass UI and MCP. Everything in ai-core (re-exported) plus the MCP server, runAgent, the HomebridgeAiKit Homebridge plugin and mcpClientSnippets. | ai-core, @modelcontextprotocol/sdk, socket.io-client, zod, undici, @homebridge/plugin-ui-utils |
Plugins should depend on ai-core, so installing them doesn't pull in the MCP SDK, socket.io or zod. ai-kit stays backward compatible: its . and ./plugin exports re-export everything ai-core has under the same names, so code that imports from ai-kit keeps working.
Features
MCP tools (43): accessories (list, get, control with value checks, bulk control with dryRun, locks / garage doors / alarms behind confirmation, room layout, sensor history), scenes (list, run, save), server (status, restart, pairing, cached accessories), child bridges (list, health, restart, stop, start), config (read with secrets redacted, full write, partial patch_config, dryRun diffs, backups and restore), instance backups, test notifications, plugins (list, search, versions, schema, changelog, install, update, uninstall), system info and logs (recent lines, filtered regex search).
MCP resources you can subscribe to: homebridge://accessories, homebridge://logs/recent, homebridge://status. Changes arrive over the Homebridge UI's socket.io namespaces, or by polling when the socket can't be used.
MCP resource templates (listed in resources/list, with completion): homebridge://accessory/{uniqueId} (one accessory with every characteristic), homebridge://plugin/{name} (one installed plugin and its child bridges; URL-encode scoped names), homebridge://child-bridge/{id} (one child bridge by username, with its health on Glass UI).
MCP prompts: diagnose-logs, plan-upgrade, audit-config, troubleshoot-device (device, symptom?), nightly-health-check (hours?), scene-builder (description, room?).
Assistant features (library): diagnoseLogs, generatePluginConfig, explainDeviceError, assessPluginUpdate, suggestOrganization, dailyDigest, ask, and runAgent for anything that needs the tools. Every input is redacted before it reaches a provider and trimmed to fit its context window; JSON outputs are checked against a schema with one automatic repair attempt; token usage and Claude costs are tracked.
Providers
All providers use plain fetch (no SDKs). Each declares what it can do, and features without tool calling fall back to prompt-only answers.
provider | Default model | API key | Tools | Streaming | Context |
|---|---|---|---|---|---|
anthropic | claude-sonnet-5-5 | required | yes | yes | 1M (200K for Haiku) |
openai | gpt-6.1-sol | required | yes | yes | 128K (set contextTokens for more) |
gemini | gemini-3.8-flash | required | yes | yes | 1M |
openai-compatible | llama3.1 | optional | yes | yes | 8K (set contextTokens) |
- Claude models:
claude-sonnet-5-5(default),claude-haiku-4-5-20251001(cheapest),claude-opus-5-5(most capable). - OpenAI models:
gpt-6.1-sol(default),gpt-6-luna(cheapest),gpt-6-astra(most capable). Requests use the Responses API withstore: false(nothing is kept on OpenAI's side); newer models only call tools through it. Set"openaiApi": "chat"to use Chat Completions instead, e.g. for a proxy that only speaks it. openai-compatibleworks with Ollama (http://127.0.0.1:11434/v1, the default), LM Studio (http://127.0.0.1:1234/v1), vLLM and similar. SetcontextTokensto your model's context window so inputs are trimmed correctly.- An on-device Apple Foundation Models provider is planned.
Homebridge plugin
Install it like any plugin (Homebridge 1.8+ or 2.x):
npm install -g @mp-consulting/homebridge-ai-kit
Then open its settings in the Homebridge UI. The settings page edits the HomebridgeAiKit platform block, tests the connection with the values in the form, and shows ready-to-paste configs for Claude Desktop, Claude Code and Cursor.
{
"platform": "HomebridgeAiKit", "name": "AI Kit", "enabled": true, "provider": "anthropic", // anthropic | openai | gemini | openai-compatible "model": "claude-sonnet-5-5", // optional, defaults per provider "apiKey": "sk-ant-…", // secret, redacted wherever config is shown to a model "baseUrl": "http://127.0.0.1:11434/v1", // openai-compatible only (or a proxy) "contextTokens": 32768, // optional override, mainly for local models "maxOutputTokens": 2048, "effort": "medium", // Claude and OpenAI: low | medium | high | xhigh | max (unset = model default) "openaiApi": "responses", // openai / openai-compatible: responses | chat (default responses for OpenAI, chat for local servers) "maxRetries": 2, // retries on 408/429/5xx/529 and network errors (backoff, honours retry-after); 0 = off "mcp": { "http": { "enabled": false, "host": "127.0.0.1", "port": 8582, "token": "…", // bearer token MCP clients must send "homebridgeUrl": "http://127.0.0.1:8581", "homebridgeToken": "hbg_…", // Glass UI API token the tools act with "homebridgeTokenId": "…", // written by Glass UI so it can revoke that token; leave as is "homebridgeCertFingerprint": "AB:CD:…", // https UI with a self-signed certificate: its SHA-256 fingerprint "homebridgeCertPath": "/path/to/certificate.pem", // or a PEM with the UI's certificate or its CA "readOnly": false, // true caps every client token at read-only "clients": [ // more client tokens, each with a scope: read | control | admin { "name": "Dashboard", "token": "…", "scope": "read" } ], "allowedOrigins": ["https://my-dashboard.local"], // browser pages allowed besides localhost / this server's IP "auditLog": true, // log every write tool call (JSONL) "auditLogPath": "/var/lib/homebridge/homebridge-ai-kit-audit.jsonl" // default: Homebridge storage path } } }
With mcp.http.enabled, the plugin serves MCP at http:// : /mcp while Homebridge runs. It needs a client token (mcp.http.token, HOMEBRIDGE_AI_MCP_TOKEN, or at least one scoped token in mcp.http.clients) and Homebridge credentials: a Glass UI API token in homebridgeToken, or the HOMEBRIDGE_* environment variables. A read-only API token gives clients read-only access.
MCP tokens
The MCP server uses two different tokens:
| Token | What it is for | Stored in |
|---|---|---|
| Client token | What Claude, Cursor or another MCP client must send (Authorization: Bearer …) to reach the HTTP MCP server. Full access (admin), or read-only with mcp.http.readOnly | mcp.http.token (or HOMEBRIDGE_AI_MCP_TOKEN for the CLI) |
| Scoped client tokens | Optional extra client tokens with less access, e.g. a read-only token for a dashboard | mcp.http.clients (or HOMEBRIDGE_AI_MCP_TOKENS for the CLI) |
| Homebridge API token | What the MCP server sends to the Homebridge UI to run its tools. Its scope decides what clients can do: read gives read-only tools, admin gives all of them | mcp.http.homebridgeToken (or HOMEBRIDGE_TOKEN for the CLI) |
Where to set or generate them:
- Homebridge Glass UI 2.0.0-beta.6 or later: *Settings → Assistant → MCP server* generates the client token, creates the Homebridge API token in one click (read-only or admin, revoked again when you replace or remove it), and shows the client configs. Each secret is shown once; after that the page only says whether one is set.
- This plugin's settings page: *Generate* creates a client token. Paste a Homebridge API token created in Glass UI under *Users → API Tokens*.
- The CLI: set
HOMEBRIDGE_AI_MCP_TOKENandHOMEBRIDGE_TOKEN(see MCP server), e.g.HOMEBRIDGE_AI_MCP_TOKEN=$(openssl rand -base64 24).
Client token scopes (each includes the ones before it):
| Scope | Tools |
|---|---|
read | Every read-only tool |
control | Plus device control: set_accessory, set_security_accessory (locks still need the user's confirmation), set_accessories, run_scene |
admin | Plus everything else: config writes and restores, backups, save_scene, test notifications, plugin installs and updates, restarts, cached accessories, child bridges |
The main client token is admin (as before), or read when readOnly is on; readOnly caps the scoped tokens too. A session belongs to the token that opened it. The client token decides which tools a client sees; the Homebridge API token still limits what the server itself can do, so a read API token keeps everything read-only.
Every write tool call is appended to an audit log ( /homebridge-ai-kit-audit.jsonl by default; mcp.http.auditLog / auditLogPath, or HOMEBRIDGE_AI_AUDIT_LOG for the CLI): one JSON object per line with ts, tool, args (secrets redacted), ok, error, session, client, principal (the token's name: default for the main token, agent for runAgent) and scope; notConfirmed: true marks a destructive call the user declined (MCP elicitation, or runAgent's confirm), which did not run. Dry runs are logged too, with dryRun: true in args. runAgent takes the same audit option. It rotates at 5 MB and keeps three old files.
Glass UI also stores homebridgeTokenId, the id of the API token it created, so it can revoke the token when you replace or remove it. The settings page keeps it (and any other field it doesn't show) when it saves.
Homebridge UI over HTTPS with a self-signed certificate
Node refuses a self-signed certificate, so the MCP server can't reach a Homebridge UI served that way until you tell it which certificate to trust. Verification is never turned off: the setting only appli