@@ -14,6 +14,7 @@ import (
1414	"k8s.io/klog/v2/textlogger" 
1515	"os" 
1616	"strconv" 
17+ 	"strings" 
1718)
1819
1920var  rootCmd  =  & cobra.Command {
@@ -42,7 +43,7 @@ Kubernetes Model Context Protocol (MCP) server
4243		initLogging ()
4344		profile  :=  mcp .ProfileFromString (viper .GetString ("profile" ))
4445		if  profile  ==  nil  {
45- 			fmt .Printf ("Invalid profile name: %s, valid names are: %s\n " , viper .GetString ("profile" ), mcp .ProfileNames )
46+ 			fmt .Printf ("Invalid profile name: %s, valid names are: %s\n " , viper .GetString ("profile" ), strings . Join ( mcp .ProfileNames ,  ", " ) )
4647			os .Exit (1 )
4748		}
4849		klog .V (1 ).Infof ("Starting kubernetes-mcp-server with profile: %s" , profile .GetName ())
@@ -121,6 +122,6 @@ func init() {
121122	rootCmd .Flags ().IntP ("sse-port" , "" , 0 , "Start a SSE server on the specified port" )
122123	rootCmd .Flags ().StringP ("sse-base-url" , "" , "" , "SSE public base URL to use when sending the endpoint message (e.g. https://example.com)" )
123124	rootCmd .Flags ().StringP ("kubeconfig" , "" , "" , "Path to the kubeconfig file to use for authentication" )
124- 	rootCmd .Flags ().Var ( & profileFlag { & mcp. FullProfile {}} , "profile " , "MCP profile to use" )
125+ 	rootCmd .Flags ().String ( "profile" , "full " , "MCP profile to use (one of: "  + strings . Join ( mcp . ProfileNames ,  ", " ) + ") "
125126	_  =  viper .BindPFlags (rootCmd .Flags ())
126127}
0 commit comments