Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions homeassistant-addon-dev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ schema:
enable_skills_as_tools: bool?
enable_tool_search: bool?
enable_yaml_config_editing: bool?
enable_filesystem_tools: bool?
enable_custom_component_integration: bool?
Comment thread
ekobres marked this conversation as resolved.
Comment thread
ekobres marked this conversation as resolved.
ports:
9583/tcp: 9583
18 changes: 18 additions & 0 deletions homeassistant-addon-dev/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,21 @@ configuration:
require a full HA restart to take effect. See docs/beta.md for known
limitations. Dedicated tools (automations, scripts, scenes, helpers,
template sensors) should be preferred when available.
enable_filesystem_tools:
name: Enable filesystem tools
Comment thread
ekobres marked this conversation as resolved.
Outdated
description: >-
Sets HAMCP_ENABLE_FILESYSTEM_TOOLS=true. Enables direct file read/write
access to your Home Assistant filesystem. WARNING: This gives the MCP
server sensitive direct file access to your system. Only enable if you
trust the AI assistant with file operations. Requires restart to take
effect.
enable_custom_component_integration:
name: Enable custom component integration
Comment thread
ekobres marked this conversation as resolved.
Outdated
description: >-
Sets HAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATION=true. Enables the
ha_install_mcp_tools installer tool, which can help install the
ha_mcp_tools custom component. This setting does not control whether the
MCP server loads or interacts with the custom component, and it is not
required for filesystem tools to function. Only enable if you want to
allow the AI assistant to use the installer tool. Requires restart to
take effect.
16 changes: 16 additions & 0 deletions homeassistant-addon/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,22 @@ Replaces the full tool catalog (~85 tools, ~46K tokens) with search-based discov

Requires add-on restart to take effect.

### enable_filesystem_tools

**Default:** `false`

Enables filesystem tools (ha_list_files, ha_read_file, ha_write_file, ha_delete_file) for managing files in the Home Assistant configuration directory.

Requires add-on restart to take effect.

### enable_custom_component_integration

**Default:** `false`

Enables the ha_install_mcp_tools tool, which allows installing the required custom component via HACS. This component is necessary for advanced features like filesystem access.

Requires add-on restart to take effect.

**Example Configuration:**

```yaml
Expand Down
2 changes: 2 additions & 0 deletions homeassistant-addon/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ schema:
enable_skills: bool?
enable_skills_as_tools: bool?
enable_tool_search: bool?
enable_filesystem_tools: bool?
enable_custom_component_integration: bool?
# Add-on exposes HTTP port for MCP communication (fixed internal port)
ports:
9583/tcp: 9583
8 changes: 8 additions & 0 deletions homeassistant-addon/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def main() -> int:
enable_skills_as_tools = True # default
enable_tool_search = False # default
enable_yaml_config_editing = False # default
enable_filesystem_tools = False # default
enable_custom_component_integration = False # default
config_read_ok = True

if config_file.exists():
Expand All @@ -206,6 +208,10 @@ def main() -> int:
enable_tool_search = raw_tool_search if isinstance(raw_tool_search, bool) else False
raw_yaml_config = config.get("enable_yaml_config_editing", False)
enable_yaml_config_editing = raw_yaml_config if isinstance(raw_yaml_config, bool) else False
raw_filesystem_tools = config.get("enable_filesystem_tools", False)
enable_filesystem_tools = raw_filesystem_tools if isinstance(raw_filesystem_tools, bool) else False
raw_custom_component = config.get("enable_custom_component_integration", False)
enable_custom_component_integration = raw_custom_component if isinstance(raw_custom_component, bool) else False
Comment thread
ekobres marked this conversation as resolved.
except Exception as e:
log_error(f"Failed to read config: {e}, using defaults")
config_read_ok = False
Expand All @@ -231,6 +237,8 @@ def main() -> int:
os.environ["ENABLE_SKILLS_AS_TOOLS"] = str(enable_skills_as_tools).lower()
os.environ["ENABLE_TOOL_SEARCH"] = str(enable_tool_search).lower()
os.environ["ENABLE_YAML_CONFIG_EDITING"] = str(enable_yaml_config_editing).lower()
os.environ["HAMCP_ENABLE_FILESYSTEM_TOOLS"] = str(enable_filesystem_tools).lower()
os.environ["HAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATION"] = str(enable_custom_component_integration).lower()

# Validate Supervisor token
supervisor_token = os.environ.get("SUPERVISOR_TOKEN")
Expand Down
17 changes: 17 additions & 0 deletions homeassistant-addon/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,20 @@ configuration:
deferred tools or with smaller context windows. Tools are found via
ha_search_tools and executed via categorized proxies (read/write/delete).
Requires restart to take effect.
enable_filesystem_tools:
name: Enable filesystem tools
description: >-
Sets HAMCP_ENABLE_FILESYSTEM_TOOLS=true. Enables direct file read/write
access to your Home Assistant filesystem. WARNING: This gives the MCP server sensitive direct
file access to your system. Only enable if you trust the AI assistant
with file operations. Requires restart to take effect.
enable_custom_component_integration:
name: Enable custom component integration
description: >-
Sets HAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATION=true. Enables registration
of the ha_install_mcp_tools installer tool for the ha_mcp_tools custom
component. This setting does not control whether other tools can interact
with the custom component or whether filesystem tools function. WARNING:
This exposes a tool that can help install the custom component. Only
enable if you trust the AI assistant with this level of access. Requires
restart to take effect.