Home Assistant MCP Server
홈 어시스턴트 MCP 서버
Home Assistant와 상호 작용하기 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버는 MCP 지원 애플리케이션을 통해 Home Assistant 기기를 제어하고 모니터링하는 도구를 제공합니다.
이 프로젝트는 AI 모델 컨텍스트 프로토콜(MCP) 생태계의 일부입니다. MCP 도구에 대한 자세한 정보와 문서는 www.aimcp.info 에서 확인하세요.
특징
장치 상태 가져오기
제어 장치 상태(켜짐/꺼짐)
자동화 트리거
사용 가능한 엔터티 나열
Related MCP server: Hass-MCP
설치
이 저장소를 복제하세요:
지엑스피1
종속성 설치:
npm install프로젝트를 빌드하세요:
npm run build다음을 MCP 설정 파일(일반적으로 VSCode의 경우
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json에 위치)에 추가하여 MCP 서버를 구성합니다.
{
"mcpServers": {
"homeassistant": {
"command": "node",
"args": ["/path/to/homeassistant-mcp/homeassistant-server/build/index.js"],
"env": {
"HA_URL": "http://your-homeassistant-url:8123",
"HA_TOKEN": "your-long-lived-access-token"
}
}
}
}your-homeassistant-url 과 your-long-lived-access-token Home Assistant 인스턴스 URL과 액세스 토큰으로 바꾸세요.
용법
서버는 다음과 같은 도구를 제공합니다.
1. 장치 상태 가져오기
// Example usage
use_mcp_tool({
server_name: "homeassistant",
tool_name: "get_state",
arguments: {
entity_id: "light.living_room"
}
});2. 장치 상태 전환
// Example usage
use_mcp_tool({
server_name: "homeassistant",
tool_name: "toggle_entity",
arguments: {
entity_id: "switch.bedroom",
state: "on" // or "off"
}
});3. 트리거 자동화
// Example usage
use_mcp_tool({
server_name: "homeassistant",
tool_name: "trigger_automation",
arguments: {
automation_id: "automation.morning_routine"
}
});4. 엔터티 나열
// Example usage
use_mcp_tool({
server_name: "homeassistant",
tool_name: "list_entities",
arguments: {
domain: "light" // optional, filters by domain
}
});기여하다
참여를 환영합니다! 다음과 같은 방법으로 도움을 주세요.
저장소를 포크하세요
기능 브랜치를 생성합니다(
git checkout -b feature/amazing-feature)변경 사항을 커밋하세요(
git commit -m 'Add some amazing feature')브랜치에 푸시(
git push origin feature/amazing-feature)풀 리퀘스트 열기
적절하게 테스트를 업데이트하고 기존 코드 스타일을 따르세요.
선적 서류 비치
MCP 도구 및 생태계에 대한 자세한 설명서는 다음과 같습니다.
www.aimcp.info 를 방문하세요
웹사이트에서 MCP 도구 디렉토리를 확인하세요
통합 가이드와 모범 사례를 읽어보세요
특허
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 아래를 참조하세요.
MIT License
Copyright (c) 2024 homeassistant-mcp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.보안
이 서버를 안전하게 사용하려면:
Home Assistant 인스턴스에는 항상 HTTPS를 사용하세요.
액세스 토큰을 안전하게 보관하고 버전 제어에 커밋하지 마십시오.
액세스 토큰을 정기적으로 순환하세요
민감한 정보에는 환경 변수를 사용하세요
지원하다
문제가 발생하거나 질문이 있는 경우 다음을 확인하세요.
저장소에 있는 기존 이슈를 확인하세요
문제가 보고되지 않은 경우 새 문제를 생성하세요.
문제를 보고할 때 가능한 한 많은 맥락을 제공하세요.
추가 지원 리소스를 보려면 www.aimcp.info를 방문하세요.
Available Tools
4 toolsget_stateC
Get the current state of a Home Assistant entity
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | The entity ID to get state for (e.g., light.living_room) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation, implying read-only behavior, but doesn't clarify if it requires authentication, has rate limits, returns error states, or what the output format might be (e.g., JSON with state attributes). For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action ('Get the current state'). There is zero waste—every word contributes directly to understanding the tool's purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (1 parameter, 100% schema coverage) but lack of annotations and output schema, the description is incomplete. It doesn't address what the tool returns (e.g., state value, attributes, timestamps) or potential errors, which is critical for a read operation in a home automation context. The description alone is insufficient for full agent understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the 'entity_id' parameter fully documented in the schema. The description adds no additional meaning beyond what the schema provides (e.g., no examples beyond the schema's 'light.living_room', no context on entity ID formats). Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('current state of a Home Assistant entity'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'list_entities' (which likely lists entities rather than getting state) or 'toggle_entity' (which changes state), but the specificity of 'current state' provides some implicit distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'list_entities' or 'toggle_entity'. It doesn't mention prerequisites (e.g., needing a valid entity ID) or exclusions (e.g., not for modifying state). Usage is implied by the action but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_entitiesC
List all available entities in Home Assistant
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | Optional domain filter (e.g., light, switch, automation) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. It states what the tool does but doesn't describe how it behaves: no information on permissions needed, rate limits, pagination, return format, or whether it's safe/read-only. For a listing tool with zero annotation coverage, this leaves significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with zero wasted words. It's appropriately sized for a simple tool and front-loads the core purpose immediately.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a tool that likely returns a list of entities. It doesn't explain what information is returned (e.g., entity IDs, names, states) or behavioral aspects like safety. For a listing tool in this context, more detail would be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the single parameter 'domain' documented as an optional filter. The description doesn't add any parameter details beyond what the schema provides, so it meets the baseline score of 3 where the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and resource ('all available entities in Home Assistant'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_state' which might also retrieve entity information, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'get_state' (which might retrieve specific entity states) or 'toggle_entity' (which modifies entities). The description implies a broad listing function but doesn't specify use cases or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
toggle_entityC
Toggle a Home Assistant entity on/off
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | The entity ID to toggle (e.g., switch.bedroom) | |
| state | Yes | The desired state (on/off) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as required permissions, whether this is a destructive/mutative operation (implied but not explicit), error handling, or side effects (e.g., triggering automations).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste, front-loading the core action. It's appropriately sized for a simple toggle operation with well-documented parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a mutative tool. It lacks context on permissions, error responses, or what happens post-toggle (e.g., state change confirmation), leaving gaps for agent usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents both parameters (entity_id with examples, state with enum). The description adds no additional meaning beyond implying the tool uses these parameters, meeting the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('toggle') and resource ('a Home Assistant entity'), specifying the action of switching between on/off states. It distinguishes from siblings like 'get_state' (read-only) and 'list_entities' (listing), but doesn't explicitly differentiate from 'trigger_automation' (which might involve entities).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., entity must be toggleable), exclusions (e.g., not for sensors), or compare to siblings like 'get_state' for checking current state before toggling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
trigger_automationC
Trigger a Home Assistant automation
| Name | Required | Description | Default |
|---|---|---|---|
| automation_id | Yes | The automation ID to trigger (e.g., automation.morning_routine) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'trigger' implies an action that may have side effects (e.g., starting an automation sequence), the description doesn't specify whether this requires authentication, what happens if the automation fails, or if there are rate limits. It lacks critical context for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple tool with one parameter. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (a mutation operation with potential side effects), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like error handling, response format, or prerequisites, leaving significant gaps for the agent to navigate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the single parameter 'automation_id' fully documented in the schema. The description doesn't add any parameter details beyond what the schema provides (e.g., it doesn't explain how to find automation IDs or provide examples beyond the schema's example). Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('trigger') and the resource ('a Home Assistant automation'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from its siblings (get_state, list_entities, toggle_entity) which all operate on different resources, so it doesn't fully distinguish itself in context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid automation ID), when not to use it, or how it differs from sibling tools like toggle_entity. The agent must infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
get_state - First observed
list_entities - First observed
toggle_entity - First observed
trigger_automation
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: get_state retrieves entity status, list_entities enumerates available entities, toggle_entity changes binary states, and trigger_automation initiates automations. The actions (get, list, toggle, trigger) and targets (state, entities, entity, automation) are uniquely paired, eliminating any ambiguity.
All tool names follow a consistent verb_noun pattern using snake_case: get_state, list_entities, toggle_entity, and trigger_automation. The verbs are precise and descriptive, and the naming convention is uniform across all four tools, making them predictable and easy to understand.
With 4 tools, the count is slightly low but reasonable for basic Home Assistant control. It covers core operations like monitoring and toggling entities, and triggering automations, though it lacks advanced actions like setting specific states or managing scenes, which might be expected in a more comprehensive set.
The tool set covers essential read and toggle operations for entities and automations, providing a functional surface for basic interactions. However, there are minor gaps, such as the inability to set specific entity states (e.g., brightness or temperature) or manage other Home Assistant components like scenes or scripts, which could limit more complex agent workflows.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates with Home Assistant to provide smart home control capabilities through natural language, supporting devices like lights, climate systems, locks, alarms, and humidifiers.3MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact directly with Home Assistant, allowing them to query device states, control smart home entities, and perform automation tasks.16344MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows large language models to control and query Home Assistant smart home systems through natural language interactions.29 npm5MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive Model Context Protocol server providing 60 tools across 9 categories to interact with and manage Home Assistant smart home systems via the REST API.5MIT