Fix command documentation for publish (#818)

<!-- Provide a brief summary of your changes -->

## Motivation and Context
<!-- Why is this change needed? What problem does it solve? -->

The `--file=PATH` pattern does not work. The path is an optional,
positional argument not a named option.
The `--dry-run` option is not supported.

Look at the implementation:
d092dd6390/cmd/publisher/commands/publish.go (L19)

## How Has This Been Tested?

Try these options yourself, they are ignored.

## Breaking Changes
<!-- Will users need to update their code or configurations? -->

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [x] I have added appropriate error handling
- [x] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
This commit is contained in:
Joel Verhagen 2025-12-05 10:38:35 -05:00 • committed by GitHub
commit af29c14239
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -215,30 +215,26 @@ For detailed guidance on the publishing process, see the [publishing guide](../.
**Usage:**
```bash
mcp-publisher publish [options]
mcp-publisher publish [PATH]
```
**Options:**
- `--file=PATH` - Path to server.json (default: `./server.json`)
- `--registry=URL` - Registry URL override
- `--dry-run` - Validate without publishing
- `PATH` - Path to server.json (default: `./server.json`)
**Process:**
1. Validates `server.json` against schema
2. Verifies package ownership (see [Official Registry Requirements](../server-json/official-registry-requirements.md))
3. Checks namespace authentication
4. Publishes to registry
2. Publishes the `server.json` to the registry server URL specified in the login token
3. Server: Verifies package ownership (see [Official Registry Requirements](../server-json/official-registry-requirements.md))
4. Server: Checks namespace authentication
5. Server: Publishes to registry
**Example:**
```bash
# Basic publish
mcp-publisher publish
# Dry run validation
mcp-publisher publish --dry-run
# Custom file location
mcp-publisher publish --file=./config/server.json
mcp-publisher publish ./config/server.json
```
### `mcp-publisher logout`