diff --git a/platform/hermes/config.yaml b/platform/hermes/config.yaml index 07a5f28..2f272de 100644 --- a/platform/hermes/config.yaml +++ b/platform/hermes/config.yaml @@ -149,7 +149,7 @@ mcp_servers: timeout: 300 connect_timeout: 30 supports_parallel_tool_calls: false - homeassistant: + homeassistant-admin: url: "http://mcp-homeassistant:8000/mcp" timeout: 300 connect_timeout: 30 diff --git a/platform/hermes/install-profiles.sh b/platform/hermes/install-profiles.sh index 2fb6620..70c11a0 100755 --- a/platform/hermes/install-profiles.sh +++ b/platform/hermes/install-profiles.sh @@ -52,10 +52,21 @@ import pathlib root = pathlib.Path(os.environ["HERMES_DATA_DIR"]) / "profiles" placeholder = "${ROUTER_API_KEY}" -for path in sorted(root.glob("*/config.yaml")): +paths = [pathlib.Path(os.environ["HERMES_DATA_DIR"]) / "config.yaml"] +paths.extend(sorted(root.glob("*/config.yaml"))) +for path in paths: + if not path.exists(): + continue text = path.read_text() if placeholder in text: - path.write_text(text.replace(placeholder, os.environ["ROUTER_API_KEY"], 1)) + text = text.replace(placeholder, os.environ["ROUTER_API_KEY"], 1) + # Avoid collision with Hermes' disabled built-in `homeassistant` toolset. + # The collision filters the healthy external MCP out of agent snapshots. + text = text.replace( + "\n homeassistant:\n url: http://mcp-homeassistant:8000/mcp\n", + "\n homeassistant-admin:\n url: http://mcp-homeassistant:8000/mcp\n", + ) + path.write_text(text) PY "${STACK_DIR:-/opt/mike-ai/stack}/platform/hermes/install-skills.sh"