@@ -14,6 +14,7 @@ import (
14
14
"k8s.io/klog/v2/textlogger"
15
15
"os"
16
16
"strconv"
17
+ "strings"
17
18
)
18
19
19
20
var rootCmd = & cobra.Command {
@@ -42,7 +43,7 @@ Kubernetes Model Context Protocol (MCP) server
42
43
initLogging ()
43
44
profile := mcp .ProfileFromString (viper .GetString ("profile" ))
44
45
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 , ", " ) )
46
47
os .Exit (1 )
47
48
}
48
49
klog .V (1 ).Infof ("Starting kubernetes-mcp-server with profile: %s" , profile .GetName ())
@@ -121,6 +122,6 @@ func init() {
121
122
rootCmd .Flags ().IntP ("sse-port" , "" , 0 , "Start a SSE server on the specified port" )
122
123
rootCmd .Flags ().StringP ("sse-base-url" , "" , "" , "SSE public base URL to use when sending the endpoint message (e.g. https://example.com)" )
123
124
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 , ", " ) + ") " )
125
126
_ = viper .BindPFlags (rootCmd .Flags ())
126
127
}
0 commit comments