Skip to main content
Glama
provider.go1.45 kB
package kubernetes import ( "context" "github.com/containers/kubernetes-mcp-server/pkg/config" ) type Provider interface { // Openshift extends the Openshift interface to provide OpenShift specific functionality to toolset providers // TODO: with the configurable toolset implementation and especially the multi-cluster approach // extending this interface might not be a good idea anymore. // For the kubecontext case, a user might be targeting both an OpenShift flavored cluster and a vanilla Kubernetes cluster. // See: https://github.com/containers/kubernetes-mcp-server/pull/372#discussion_r2421592315 Openshift TokenVerifier GetTargets(ctx context.Context) ([]string, error) GetDerivedKubernetes(ctx context.Context, target string) (*Kubernetes, error) GetDefaultTarget() string GetTargetParameterName() string WatchTargets(func() error) Close() } func NewProvider(cfg *config.StaticConfig) (Provider, error) { strategy := resolveStrategy(cfg) factory, err := getProviderFactory(strategy) if err != nil { return nil, err } return factory(cfg) } func resolveStrategy(cfg *config.StaticConfig) string { if cfg.ClusterProviderStrategy != "" { return cfg.ClusterProviderStrategy } if cfg.KubeConfig != "" { return config.ClusterProviderKubeConfig } if _, inClusterConfigErr := InClusterConfig(); inClusterConfigErr == nil { return config.ClusterProviderInCluster } return config.ClusterProviderKubeConfig }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/containers/kubernetes-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server