Skip to content

Move the CLI to Cobra framework#1018

Open
deerajkumar18 wants to merge 1 commit intomodelcontextprotocol:mainfrom
deerajkumar18:cli-enhancement
Open

Move the CLI to Cobra framework#1018
deerajkumar18 wants to merge 1 commit intomodelcontextprotocol:mainfrom
deerajkumar18:cli-enhancement

Conversation

@deerajkumar18
Copy link
Contributor

@deerajkumar18 deerajkumar18 commented Mar 1, 2026

Changes towards adapting the cobra framework for the publisher cli . As it continues to function the same way as it did earlier , there are some structural changes which includes :

  1. Defining root commands and commands with usage , examples instead of hard coding
  2. Defining flags only for commands as parsing is taken care internally
  3. Decouple Arg validation from the command execution logic
  4. Version set in the root command definition
  5. Remove explicit help for commands as it is taken care internally

Motivation and Context

This enhancement is based on #936

How Has This Been Tested?

  1. Integration test (tests/integration/run.sh)
  2. Unit tests in the package commands_test

Breaking Changes

Types of changes

  • 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)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant