MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / PreferredInstallation

Method PreferredInstallation

internal/mcp/registry.go:161–171  ·  view source on GitHub ↗

PreferredInstallation returns the best installation method for the schema. Order matches the Python implementation: docker, uvx, npm, python, custom.

()

Source from the content-addressed store, hash-verified

159// PreferredInstallation returns the best installation method for the schema.
160// Order matches the Python implementation: docker, uvx, npm, python, custom.
161func (s ServerSchema) PreferredInstallation() (string, InstallationEntry, bool) {
162 for _, key := range []string{"docker", "uvx", "npm", "python", "custom"} {
163 if entry, ok := s.Installations[key]; ok {
164 return key, entry, true
165 }
166 }
167 for key, entry := range s.Installations {
168 return key, entry, true
169 }
170 return "", InstallationEntry{}, false
171}

Callers 2

ListRegistryMethod · 0.80
ServerFromSchemaFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected