MCPcopy Create free account
hub / github.com/diillson/chatcli / mcpServerExists

Method mcpServerExists

cli/mcp_command.go:360–367  ·  view source on GitHub ↗

mcpServerExists returns true when the named server is currently configured (either running or stopped-but-known). Used to give a crisp "unknown server" message instead of a confusing pass-through.

(name string)

Source from the content-addressed store, hash-verified

358// configured (either running or stopped-but-known). Used to give a
359// crisp "unknown server" message instead of a confusing pass-through.
360func (cli *ChatCLI) mcpServerExists(name string) bool {
361 for _, s := range cli.mcpManager.GetServerStatus() {
362 if s.Name == name {
363 return true
364 }
365 }
366 return false
367}
368
369// getMCPSuggestions powers /mcp completion. Two completion phases:
370//

Callers 3

mcpShowToolsMethod · 0.95
mcpRestartOneMethod · 0.95
mcpLogsMethod · 0.95

Calls 1

GetServerStatusMethod · 0.80

Tested by

no test coverage detected