Skip to main content
Glama
provider_chain.go640 B
package credentials import ( "errors" ) type providerChain struct { Providers []Provider } var defaultproviders = []Provider{providerEnv, providerOIDC, providerProfile, providerInstance} var defaultChain = newProviderChain(defaultproviders) func newProviderChain(providers []Provider) Provider { return &providerChain{ Providers: providers, } } func (p *providerChain) resolve() (*Config, error) { for _, provider := range p.Providers { config, err := provider.resolve() if err != nil { return nil, err } else if config == nil { continue } return config, err } return nil, errors.New("no credential found") }

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/mozillazg/kube-audit-mcp'

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