fix: default Docker image to stdio transport (closes #33, #35)#47
Open
MatthewJamisonJS wants to merge 2 commits intoref-tools:mainfrom
Open
fix: default Docker image to stdio transport (closes #33, #35)#47MatthewJamisonJS wants to merge 2 commits intoref-tools:mainfrom
MatthewJamisonJS wants to merge 2 commits intoref-tools:mainfrom
Conversation
The Dockerfile hardcoded TRANSPORT=http, which broke Docker MCP Gateway and Gemini CLI clients that spawn containers over stdio. The TypeScript already defaults TRANSPORT to stdio when unset (index.ts:40), so removing the ENV line restores the correct default for stdio clients. HTTP mode is still available via -e TRANSPORT=http for Smithery and any user who explicitly wants HTTP. Closes ref-tools#33 Closes ref-tools#35
Companion to the Dockerfile change in the previous commit. Removing the hardcoded ENV TRANSPORT=http from the Dockerfile would have caused Smithery deployments to fall back to stdio (matching index.ts defaults), breaking the existing https://smithery.ai/server/@ref-tools deploy. Smithery's project-config supports a top-level `env:` map that the platform applies at container runtime (see blockscout/mcp-server smithery.yaml for an existing precedent). Declaring TRANSPORT=http here keeps Smithery in HTTP mode while letting the image default to stdio for every other Docker consumer. Refs ref-tools#33, ref-tools#35
Author
|
Quick update — pushed Was poking around how other env:
BLOCKSCOUT_MCP_TRANSPORT: "http"Their inline note — "Use environment variables to configure the container at runtime" — plus the project-config schema showing If a different shape would fit your setup better, totally happy to revise — just wanted to surface what I found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dockerfile:28hardcodesENV TRANSPORT=http, forcing every container to start an HTTP server on port 8080. This breaks:Fix
Remove the line.
index.ts:40already defaults to stdio whenTRANSPORTis unset:HTTP mode still available via
-e TRANSPORT=http.Validation
npm run checkpasses.Smithery
smithery.yamldeclaresstartCommand.type: http. Smithery's ownmigrate_stdio_to_httpcookbook ships a Dockerfile that does not setTRANSPORTand still deploys successfully — so Smithery injects it (or routes HTTP) at the platform level, and the Dockerfile ENV is redundant for that path.Happy to do a Smithery test deploy of this branch before merging if you'd prefer empirical confirmation over the cookbook precedent.
Backwards compatibility
docker run -e TRANSPORT=http -p 8080:8080 …unchanged.Closes #33
Closes #35