fix(chart): homeassistant-mcp sidecar uses wrong fastmcp CLI flags #26

Closed
opened 2026-02-21 16:13:26 +00:00 by cpfarhood · 1 comment
cpfarhood commented 2026-02-21 16:13:26 +00:00 (Migrated from github.com)

Problem

The homeassistant-mcp sidecar container command uses --sse-server-host and --sse-server-port flags which are not valid for the current version of fastmcp (bundled in ghcr.io/homeassistant-ai/ha-mcp:6.7.1).

This causes the sidecar to crash with:

Unknown option: "--sse-server-host". Did you mean "--server-spec"?

Current command

fastmcp run ha_mcp.main:app --transport sse --sse-server-host 0.0.0.0 --sse-server-port 8087

Expected command

fastmcp run ha_mcp.main:app --transport sse --host 0.0.0.0 --port 8087

The correct flags per fastmcp run --help are:

  • --host (not --sse-server-host)
  • --port / -p (not --sse-server-port)

Affected file

chart/templates/deployment.yaml — the homeassistant-mcp sidecar command block.

Additional context

  • Chart version: 0.2.0
  • Image: ghcr.io/homeassistant-ai/ha-mcp:6.7.1
  • The image tag fix from v6.7.16.7.1 was resolved in 0.2.0
## Problem The homeassistant-mcp sidecar container command uses `--sse-server-host` and `--sse-server-port` flags which are not valid for the current version of fastmcp (bundled in `ghcr.io/homeassistant-ai/ha-mcp:6.7.1`). This causes the sidecar to crash with: ``` Unknown option: "--sse-server-host". Did you mean "--server-spec"? ``` ## Current command ``` fastmcp run ha_mcp.main:app --transport sse --sse-server-host 0.0.0.0 --sse-server-port 8087 ``` ## Expected command ``` fastmcp run ha_mcp.main:app --transport sse --host 0.0.0.0 --port 8087 ``` The correct flags per `fastmcp run --help` are: - `--host` (not `--sse-server-host`) - `--port` / `-p` (not `--sse-server-port`) ## Affected file `chart/templates/deployment.yaml` — the homeassistant-mcp sidecar `command` block. ## Additional context - Chart version: 0.2.0 - Image: `ghcr.io/homeassistant-ai/ha-mcp:6.7.1` - The image tag fix from `v6.7.1` → `6.7.1` was resolved in 0.2.0
cpfarhood commented 2026-02-21 16:25:22 +00:00 (Migrated from github.com)

Update — additional findings from v0.2.1

The --host/--port fix alone isn't sufficient. The fastmcp run ha_mcp.main:app approach doesn't work because:

  1. The module path ha_mcp.main doesn't exist — it's ha_mcp.__main__
  2. The app object is a deferred proxy (_DeferredMCP), not directly runnable via fastmcp run

Correct approach

The ha-mcp image provides built-in CLI entrypoints (defined in pyproject.toml):

  • ha-mcp — stdio transport (default)
  • ha-mcp-sse — SSE transport on port 8087
  • ha-mcp-web — HTTP streamable transport on port 8086
  • ha-mcp-oauth — OAuth mode

The chart should use:

command: ["ha-mcp-sse"]
args: []  # no args needed, defaults to 0.0.0.0:8087

Port and path can be configured via env vars:

  • MCP_PORT (default: 8087 for SSE)
  • MCP_SECRET_PATH (default: /mcp)

No fastmcp run wrapper needed.

## Update — additional findings from v0.2.1 The `--host`/`--port` fix alone isn't sufficient. The `fastmcp run ha_mcp.main:app` approach doesn't work because: 1. The module path `ha_mcp.main` doesn't exist — it's `ha_mcp.__main__` 2. The app object is a deferred proxy (`_DeferredMCP`), not directly runnable via `fastmcp run` ### Correct approach The ha-mcp image provides built-in CLI entrypoints (defined in pyproject.toml): - `ha-mcp` — stdio transport (default) - `ha-mcp-sse` — SSE transport on port 8087 - `ha-mcp-web` — HTTP streamable transport on port 8086 - `ha-mcp-oauth` — OAuth mode The chart should use: ```yaml command: ["ha-mcp-sse"] args: [] # no args needed, defaults to 0.0.0.0:8087 ``` Port and path can be configured via env vars: - `MCP_PORT` (default: 8087 for SSE) - `MCP_SECRET_PATH` (default: `/mcp`) No `fastmcp run` wrapper needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: farhoodlabs/devcontainer#26