Skip to content

Commit 6e1fc10

Browse files
author
Sergey
committed
fix: enable stateless_http in add-on and fix runtime Python version
Enable stateless_http=True in the add-on's mcp.run() call, aligning it with all other HTTP deployment modes (main_web, main_sse, main_oauth). The add-on was missed when stateless mode was introduced in v6.4.0. Without stateless mode, mcp-proxy connections require consistent Mcp-Session-Id header forwarding. If the proxy fails to maintain session state, the server either creates orphaned sessions (stale data) or rejects requests silently — matching the symptoms in #585. Also fix the runtime Docker image from Python 3.14 to 3.13 to match the builder stage, which was causing ModuleNotFoundError for ha_mcp due to mismatched site-packages paths (python3.13 vs python3.14). Fixes #585
1 parent 934ad1c commit 6e1fc10

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

homeassistant-addon/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
2323
uv sync --locked --no-dev --no-editable
2424

2525
# --- Runtime stage: clean image without uv ---
26-
FROM python:3.14-slim-bookworm@sha256:f0540d0436a220db0a576ccfe75631ab072391e43a24b88972ef9833f699095f
26+
FROM python:3.13-slim-bookworm@sha256:8092ae2ef67061f9db412458dbdce44dbf16748fb3cae5cdbd020f467a9712d0
2727

2828
WORKDIR /app
2929

homeassistant-addon/start.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def main() -> int:
144144
port=port,
145145
path=secret_path,
146146
log_level="info",
147+
stateless_http=True,
147148
uvicorn_config={"log_config": _get_timestamped_uvicorn_log_config()},
148149
)
149150
except Exception as e:

0 commit comments

Comments
 (0)