diff --git a/cmd/github-mcp-server/main.go b/cmd/github-mcp-server/main.go index 4d5368ec..5ca0e21c 100644 --- a/cmd/github-mcp-server/main.go +++ b/cmd/github-mcp-server/main.go @@ -29,7 +29,7 @@ var ( Use: "server", Short: "GitHub MCP Server", Long: `A GitHub MCP server that handles various tools and resources.`, - Version: fmt.Sprintf("%s (%s) %s", version, commit, date), + Version: fmt.Sprintf("Version: %s\nCommit: %s\nBuild Date: %s", version, commit, date), } stdioCmd = &cobra.Command{ @@ -65,6 +65,8 @@ var ( func init() { cobra.OnInitialize(initConfig) + rootCmd.SetVersionTemplate("{{.Short}}\n{{.Version}}\n") + // Add global flags that will be shared by all commands rootCmd.PersistentFlags().StringSlice("toolsets", github.DefaultTools, "An optional comma separated list of groups of tools to allow, defaults to enabling all") rootCmd.PersistentFlags().Bool("dynamic-toolsets", false, "Enable dynamic toolsets")