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

Function installedServerNames

internal/desktop/mcp_service.go:172–184  ·  view source on GitHub ↗

installedServerNames returns, for each supported client, the set of installed server names at scope. Clients whose config cannot be parsed (e.g. codex's TOML via the JSON path, or missing files) contribute an empty set instead of failing the listing.

(scope mcp.Scope)

Source from the content-addressed store, hash-verified

170// TOML via the JSON path, or missing files) contribute an empty set instead of
171// failing the listing.
172func installedServerNames(scope mcp.Scope) map[string]map[string]bool {
173 out := map[string]map[string]bool{}
174 for _, client := range mcp.SupportedClients {
175 names := map[string]bool{}
176 if servers, _, err := mcp.ListServers(client, scope); err == nil {
177 for _, server := range servers {
178 names[server.Name] = true
179 }
180 }
181 out[client.Name] = names
182 }
183 return out
184}
185
186func sortedClientNames() []string {
187 names := mcp.ClientNames()

Callers 1

ListRegistryMethod · 0.85

Calls 1

ListServersFunction · 0.92

Tested by

no test coverage detected