docs(complete): align publish CLI flags with implementation (closes #767)#1278
Merged
rdimitrov merged 1 commit intoMay 11, 2026
Merged
Conversation
…textprotocol#767) complete.md still documented three flags for `mcp-publisher publish` (`--file=PATH`, `--registry=URL`, `--dry-run`) that the CLI does not parse. Reading the publisher source confirms the actual interface is a positional `PATH` argument (default `./server.json`); registry URL is bound at login time via the saved token, and "validate without publishing" is a separate `mcp-publisher validate` subcommand. Per the discussion on the earlier flag-implementation attempt (modelcontextprotocol#771), maintainers preferred fixing the documentation rather than adding the unimplemented flags. `docs/reference/cli/commands.md` was already updated to the correct positional shape, but `complete.md` (which mirrors the docs/ tree into a single file for LLM/quickstart use) had drifted out of sync. This change syncs the `mcp-publisher publish` block in `complete.md` with the canonical version in `docs/reference/cli/commands.md`, removing the three stale flags and the corresponding example. Closes modelcontextprotocol#767. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rdimitrov
approved these changes
May 11, 2026
Contributor
Author
|
Thanks for the quick review and merge, @rdimitrov! |
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
complete.mddocuments three flags formcp-publisher publishthat the CLI does not actually parse:--file=PATH— Path to server.json--registry=URL— Registry URL override--dry-run— Validate without publishingReading
cmd/publisher/commands/publish.goandcmd/publisher/main.goconfirms the actual interface is a single positionalPATHargument (default./server.json):Registry URL is bound at login time via the saved token, and "validate without publishing" is a separate
mcp-publisher validatesubcommand. The bug user in #767 hit "server.json not found" precisely because--file .registry/server.jsonis filtered out by theHasPrefix(args[0], \"-\")check, leaving the default lookup in place.Background
The canonical reference at
docs/reference/cli/commands.mdwas already updated to the correct positional shape.complete.md(the concatenated single-file mirror ofdocs/used for LLM/quickstart consumption) had drifted out of sync — these were the only remaining--filereferences in the repo outside of test fixtures.Per the discussion on the prior flag-implementation attempt in #771, maintainers preferred fixing the documentation over adding the unimplemented flags:
This PR closes that loop on the last stale doc surface.
Changes
complete.md: themcp-publisher publishblock now matchesdocs/reference/cli/commands.mdline-for-line (positionalPATH, no spurious flags, no dry-run example).Closes #767.
Out of scope
cmd/publisher/README.md:17still shows./bin/mcp-publisher publish --registry=http://localhost:8080in the contributor quickstart. The flag is silently ignored at runtime (caught by the sameHasPrefix(\"-\")filter). Happy to fold that fix into this PR or send a follow-up — flagging here in case a maintainer prefers one option.complete.mdis missingmcp-publisher validateandmcp-publisher statussections that exist indocs/reference/cli/commands.md. Out of scope for this single-concern PR; if there's interest, a broader sync would be a separate PR.Test plan
grep -r -- '--file' .outside test fixtures returns 0 hits after the changegrep -r 'mcp-publisher publish --' docs/ complete.mdshows only legitimate flags (--registryonlogin)make checknot exercised since this is doc-only🤖 Generated with Claude Code