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

Function requireClient

internal/cli/mcp.go:313–322  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

311}
312
313func requireClient(name string) (mcp.ClientSpec, error) {
314 if name == "" {
315 return mcp.ClientSpec{}, fmt.Errorf("--client is required")
316 }
317 c, ok := mcp.ClientByName(name)
318 if !ok {
319 return mcp.ClientSpec{}, fmt.Errorf("unsupported client: %s (try one of: %s)", name, strings.Join(mcp.ClientNames(), ", "))
320 }
321 return c, nil
322}
323
324func parseEnv(entries []string) map[string]string {
325 if len(entries) == 0 {

Callers 2

mcpAddCommandMethod · 0.85
mcpRemoveCommandMethod · 0.85

Calls 2

ClientByNameFunction · 0.92
ClientNamesFunction · 0.92

Tested by

no test coverage detected