fix: hardcode transport.url port for MCP Registry validation#58
Merged
Conversation
mcp-publisher rejected packages[0].transport.url: a template variable
in the URL may only reference env-var names or argument names, NOT an
argument's local variables. {PORT} existed only as the -p argument's
local variable, so the registry validator saw it as undefined.
Hardcoded the transport URL to http://localhost:8000/mcp and the -p
mapping to 8000:8000 (dropping the PORT variable). The container always
listens on 8000 (Dockerfile ENV), so this is correct — and hardcoding
both keeps the published URL consistent with the port mapping (no
override footgun). Host-port customization wasn't meaningfully
supported anyway, since the registry URL can't follow a templated port.
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.
Summary
mcp-publisher publishfailed validation:The MCP Registry only allows a
transport.urltemplate variable to reference env-var names or argument names — not an argument's localvariables.{PORT}existed only as the-pargument's local variable, so it's "undefined" for the URL.Fix
transport.url:http://localhost:{PORT}/mcp→http://localhost:8000/mcp-pruntime arg:{PORT}:8000(with aPORTvariable) → fixed8000:8000The container always listens on
8000(DockerfileENV PORT=8000), so the hardcoded URL is correct. Hardcoding the-pmapping too keeps the published URL consistent with the port mapping (no override footgun). Host-port customization via the registry wasn't actually supportable anyway, since the URL can't follow a templated port.This is registry-metadata only — no image rebuild/release needed (
packages[0].versionstays0.15.4).Validation
jq: valid;transport.urlhas no remaining{templates}Generated by Claude Code