Fix docker-entrypoint.sh to support http-streamable related parameters - #142
Fix docker-entrypoint.sh to support http-streamable related parameters#142AntonioL wants to merge 1 commit into
Conversation
jssmith
left a comment
There was a problem hiding this comment.
Review: Fix docker-entrypoint.sh to support http-streamable parameters
Verdict: Approve.
Assessment
The Docker entrypoint was not propagating --streamable-http-host, --streamable-http-port, and --transport parameters. This PR fixes that by adding the missing --transport case and the streamable-http host/port case to the argument-matching loop.
Strengths
- Correctly handles all three streamable-http related arguments.
- Uses the same pattern as the existing SSE and other argument cases.
--transporthandling with"$arg" --transport=""is correct fornargs='?'cases.
Comments
-
Missing
--streamable-http-path— if the server supports--streamable-http-path(which it appears to based on the transport implementation), the entrypoint should also handle that flag. Otherwise, users setting it via env var or CLI will have it silently dropped. -
No test coverage — the Docker entrypoint is hard to unit test, but a smoke test that builds the image and checks
docker run postgres-mcp --transport=streamable-http --streamable-http-port=8080would verify the fix end-to-end. -
The PR description references issue #141 about the Docker image not being maintained — worth the maintainers' attention.
This review was created by an AI agent (OpenHands) on behalf of @jssmith.
jssmith
left a comment
There was a problem hiding this comment.
Review — concise
Verdict: Approve. Correct, straightforward fix for docker-entrypoint.sh.
Summary
Extends the existing SSE host auto-detection to also handle streamable-http transport. Adds --streamable-http-host=0.0.0.0 when --transport=streamable-http is used without an explicit host.
Correctness
- Detection logic mirrors the existing SSE pattern: checks both
--transport streamable-http(space-separated) and--transport=streamable-http(equals form). - Checks for
--streamable-http-hostprefix to avoid overriding user-specified values. Correct. - No changes to existing SSE behavior. Additive only.
Minor (non-blocking)
- The inner loop that checks for "streamable-http" after finding
--transportiterates over all args again (same pattern as the SSE check). This works but is O(n²). Not a concern for a handful of CLI args. - No test coverage. The entrypoint is a bash script, which is harder to test, but a simple integration test that verifies the host flag is injected would be valuable.
This review was created by an AI agent (OpenHands) on behalf of @jssmith.
The Dockerfile entrypoint was not propagating the http-streamable parameters. This Pull Request fixes that.
I am not sure if the Docker image is meant to be maintained because I see that has not been updated in a long time on your end, I created this issue #141