Skip to content

Fix docker-entrypoint.sh to support http-streamable related parameters - #142

Open
AntonioL wants to merge 1 commit into
crystaldba:mainfrom
AntonioL:main
Open

Fix docker-entrypoint.sh to support http-streamable related parameters#142
AntonioL wants to merge 1 commit into
crystaldba:mainfrom
AntonioL:main

Conversation

@AntonioL

Copy link
Copy Markdown

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

@jssmith jssmith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
  • --transport handling with "$arg" --transport="" is correct for nargs='?' cases.

Comments

  1. 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.

  2. 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=8080 would verify the fix end-to-end.

  3. 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 jssmith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-host prefix 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 --transport iterates 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants