{"record":{"id":"c5ea6eb41708a48c","repo":"sipeed/picoclaw","slug":"mcp-server-s-is-not-configured","errorCode":null,"errorMessage":"MCP server '%s' is not configured","messagePattern":"MCP server '(.+?)' is not configured","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/agent/agent_command.go","lineNumber":201,"sourceCode":"\t\t\t\treturn nil, fmt.Errorf(\"command unavailable: config not loaded\")\n\t\t\t}\n\n\t\t\tserverName = strings.TrimSpace(serverName)\n\t\t\tif serverName == \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"server name is required\")\n\t\t\t}\n\n\t\t\tresolvedName := \"\"\n\t\t\tvar serverCfg config.MCPServerConfig\n\t\t\tfor name, candidate := range cfg.Tools.MCP.Servers {\n\t\t\t\tif strings.EqualFold(name, serverName) {\n\t\t\t\t\tresolvedName = name\n\t\t\t\t\tserverCfg = candidate\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif resolvedName == \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"MCP server '%s' is not configured\", serverName)\n\t\t\t}\n\t\t\tif !serverCfg.Enabled {\n\t\t\t\treturn nil, fmt.Errorf(\"MCP server '%s' is configured but disabled\", resolvedName)\n\t\t\t}\n\t\t\tif !cfg.Tools.IsToolEnabled(\"mcp\") {\n\t\t\t\treturn nil, fmt.Errorf(\"MCP integration is disabled\")\n\t\t\t}\n\n\t\t\tif err := al.ensureMCPInitialized(ctx); err != nil {\n\t\t\t\tlogger.WarnCF(\"agent\", \"Failed to initialize MCP runtime for command\",\n\t\t\t\t\tmap[string]any{\n\t\t\t\t\t\t\"server\": resolvedName,\n\t\t\t\t\t\t\"error\":  err.Error(),\n\t\t\t\t\t})\n\t\t\t}\n\n\t\t\tmanager := al.mcp.getManager()\n\t\t\tif manager == nil {","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/agent/agent_command.go#L183-L219","documentation":"ListMCPTools did a case-insensitive scan of cfg.Tools.MCP.Servers and found no key matching the requested server name. The name is not defined in configuration at all, so no tools can be listed. The check is EqualFold, so casing is not the problem — the entry is missing.","triggerScenarios":"Calling the tool-list command with a server name absent from the `tools.mcp.servers` map in the picoclaw config: typo, referencing a server defined in a different config file, or expecting a server that was never added.","commonSituations":"Server was renamed or removed from config; user copies a server name from docs/another project; config file being edited points elsewhere (workspace vs user config precedence); server registered programmatically only in another process.","solutions":["Run /mcp list (ListMCPServers) to see exact configured names, then retry with one of them","Add the missing server under tools.mcp.servers in the active config file and reload","Verify which config file is active (workspace vs global) if you edited one and the server is still reported missing"],"exampleFix":"# before\n/mcp tools clawhubb   # typo\n\n# after\n/mcp list               # confirm exact name\n/mcp tools clawhub","handlingStrategy":"validation","validationCode":"func serverConfigured(cfg *config.Config, name string) bool {\n    for n := range cfg.Tools.MCP.Servers {\n        if strings.EqualFold(n, name) { return true }\n    }\n    return false\n}","typeGuard":"func isConfiguredServer(cfg *config.Config, name string) (string, bool) {\n    for n := range cfg.Tools.MCP.Servers {\n        if strings.EqualFold(n, name) { return n, true }\n    }\n    return \"\", false\n}","tryCatchPattern":null,"preventionTips":["Populate server pickers from cfg.Tools.MCP.Servers keys, not free text","Validate server names against config before invoking tool listing","Keep server names stable across config layers"],"tags":["mcp","configuration","not-found"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}