{"record":{"id":"5bfc54308d1117ad","repo":"sipeed/picoclaw","slug":"mcp-server-q-not-found-5bfc54","errorCode":null,"errorMessage":"MCP server %q not found","messagePattern":"MCP server %q not found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/picoclaw/internal/mcp/show.go","lineNumber":159,"sourceCode":"}\n\nfunc newShowCommand() *cobra.Command {\n\tvar timeout time.Duration\n\n\tcmd := &cobra.Command{\n\t\tUse:   \"show <name>\",\n\t\tShort: \"Show details and tools for a configured MCP server\",\n\t\tArgs:  cobra.ExactArgs(1),\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tcfg, err := loadConfig()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tname := args[0]\n\t\t\tserver, exists := cfg.Tools.MCP.Servers[name]\n\t\t\tif !exists {\n\t\t\t\treturn fmt.Errorf(\"MCP server %q not found\", name)\n\t\t\t}\n\n\t\t\tserverInfo := buildServerInfo(name, server, cfg.Tools.MCP.Discovery.Enabled)\n\n\t\t\tif !server.Enabled {\n\t\t\t\tcliui.PrintMCPShow(cmd.OutOrStdout(), serverInfo, nil, true)\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\t\t\tdefer cancel()\n\n\t\t\tdetails, err := serverShowProbe(ctx, name, server, cfg.WorkspacePath())\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to connect to MCP server %q: %w\", name, err)\n\t\t\t}\n\n\t\t\ttools := make([]cliui.MCPShowTool, 0, len(details))","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/picoclaw/internal/mcp/show.go#L141-L177","documentation":"Returned by picoclaw mcp show <name> when the name is not a key under tools.mcp.servers in the loaded config. The lookup is an exact, case-sensitive map-key match. The command exits before printing anything about the server.","triggerScenarios":"picoclaw mcp show with a typo'd or wrongly-cased name; showing a server that was never added to this config; picoclaw resolving a different config file (workspace vs user) than the one containing the entry.","commonSituations":"Documentation or README examples naming servers that were never added locally; multiple config files causing name confusion; automation referencing renamed servers.","solutions":["List configured servers with picoclaw mcp list and copy the exact key","Re-run picoclaw mcp show <exact-name>","If the list is empty, add the server first with picoclaw mcp add","Verify which config file picoclaw loads for the current workspace"],"exampleFix":"# before\n$ picoclaw mcp show github\nMCP server \"github\" not found\n\n# after\n$ picoclaw mcp list\nNAME       TYPE      ENABLED\ngh-tools   http      true\n$ picoclaw mcp show gh-tools","handlingStrategy":"validation","validationCode":"if _, ok := cfg.Tools.MCP.Servers[name]; !ok {\n  available := make([]string, 0, len(cfg.Tools.MCP.Servers))\n  for k := range cfg.Tools.MCP.Servers {\n    available = append(available, k)\n  }\n  return fmt.Errorf(\"MCP server %q not found; available: %v\", name, available)\n}","typeGuard":"func isMCPServerNotFound(err error) bool {\n  return err != nil && strings.Contains(err.Error(), \"MCP server\") && strings.Contains(err.Error(), \"not found\")\n}","tryCatchPattern":"if err := showCmd.Execute(); err != nil {\n  if isMCPServerNotFound(err) {\n    // fall back to `picoclaw mcp list` output so the user sees valid names\n  }\n  return err\n}","preventionTips":["Copy names verbatim from picoclaw mcp list","Remember the config resolved depends on the workspace — run list in the same directory","Add servers before referencing them in scripts"],"tags":["cli","mcp","config","not-found"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}