-
Notifications
You must be signed in to change notification settings - Fork 555
Add create command to publisher CLI for generating server.json files
#152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
create command to the publisher CLI to generate a server.jsoncreate command to publisher CLI for generating server.json files
|
@copilot please fix the linting errors. |
Head branch was pushed to by a user without write access
Fixed all linting errors in commit 02e653b. The changes include:
All linting now passes cleanly with golangci-lint. |
|
If you run the |
Updated the publisher CLI help output in commit 4149a24. The usage/help now prints to standard output without log timestamps, and all flags are displayed in the |
Co-authored-by: toby <[email protected]>
Co-authored-by: toby <[email protected]>
…ated documentation Co-authored-by: toby <[email protected]>
Co-authored-by: toby <[email protected]>
Co-authored-by: toby <[email protected]>
…t timestamps and show flags in --long-flag/-short format Co-authored-by: toby <[email protected]>
This PR adds a new
createcommand to the MCP Registry Publisher CLI tool that generates properly formattedserver.jsonfiles from command-line flags, addressing the difficulty of manually creating these files.Changes Made
Core Implementation
main.goto support subcommands (publishandcreate)publishcommand functionality remains unchangedCreate Command Features
Required Flags
--name,-n: Server name (e.g.,io.github.owner/repo-name)--description,-d: Server description--repo-url: Repository URLOptional Flags
--execute,-e: Command invocation that generates runtime arguments--version,-v: Server version (default: "1.0.0")--env-var: Environment variables in formatNAME:DESCRIPTION(repeatable)--package-arg: Package arguments in formatVALUE:DESCRIPTION(repeatable)--runtime-hint: Runtime hint (e.g., "docker")--registry: Package registry name (default: "npm")--output,-o: Output file path (default: "server.json")Smart Command Parsing
The
--executeflag intelligently parses command invocations:Generates runtime arguments with context-aware descriptions:
--rm,--config)/path/config.jsonfor--config)Generated Output
Creates complete
server.jsonfiles with:Documentation
Example Usage
The generated files provide a solid foundation that users can then edit to fine-tune descriptions, set argument requirements, and add remote server configurations.
Fixes #151.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.