{"record":{"id":"ace46772280850c6","repo":"charmbracelet/crush","slug":"docker-mcp-is-not-available-please-ensure-docker","errorCode":null,"errorMessage":"docker mcp is not available, please ensure docker is installed and 'docker mcp version' succeeds","messagePattern":"docker mcp is not available, please ensure docker is installed and 'docker mcp version' succeeds","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/config/docker_mcp.go","lineNumber":87,"sourceCode":"\t_, exists := c.MCP[DockerMCPName]\n\treturn exists\n}\n\n// DockerMCPConfig returns the default Docker MCP stdio configuration.\nfunc DockerMCPConfig() MCPConfig {\n\treturn MCPConfig{\n\t\tType:     MCPStdio,\n\t\tCommand:  \"docker\",\n\t\tArgs:     []string{\"mcp\", \"gateway\", \"run\"},\n\t\tDisabled: false,\n\t}\n}\n\n// PrepareDockerMCPConfig validates Docker MCP availability and stages the\n// Docker MCP configuration in memory.\nfunc (s *ConfigStore) PrepareDockerMCPConfig() (MCPConfig, error) {\n\tif !IsDockerMCPAvailable() {\n\t\treturn MCPConfig{}, fmt.Errorf(\"docker mcp is not available, please ensure docker is installed and 'docker mcp version' succeeds\")\n\t}\n\n\tmcpConfig := DockerMCPConfig()\n\t// In-memory only; persistence happens in PersistDockerMCPConfig.\n\ts.mutateInMemory(func(c *Config) {\n\t\tif c.MCP == nil {\n\t\t\tc.MCP = make(map[string]MCPConfig)\n\t\t}\n\t\tc.MCP[DockerMCPName] = mcpConfig\n\t})\n\treturn mcpConfig, nil\n}\n\n// PersistDockerMCPConfig persists a previously prepared Docker MCP\n// configuration to the global config file.\nfunc (s *ConfigStore) PersistDockerMCPConfig(mcpConfig MCPConfig) error {\n\tif err := s.SetConfigField(ScopeGlobal, \"mcp.\"+DockerMCPName, mcpConfig); err != nil {\n\t\treturn fmt.Errorf(\"failed to persist docker mcp configuration: %w\", err)","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/charmbracelet/crush/blob/7944b8e52225d8805e31eacbf7ef24856b0dfb7a/internal/config/docker_mcp.go#L69-L105","documentation":"Returned by ConfigStore.PrepareDockerMCPConfig when IsDockerMCPAvailable() reports that Docker MCP is not usable on this machine. Availability requires the Docker CLI to be installed and `docker mcp version` to succeed — i.e. Docker with the MCP Toolkit feature present and working.","triggerScenarios":"Enabling Docker MCP (via EnableDockerMCP / `docker mcp` enable flow in the UI) when Docker is not installed, the Docker daemon/CLI is too old to include the `mcp` subcommand, or `docker mcp version` fails (daemon not running, plugin missing).","commonSituations":"Docker Desktop without MCP Toolkit enabled; plain docker Engine (Linux) lacking the docker-mcp plugin; Docker not installed at all; daemon stopped; older Docker Desktop version predating `docker mcp`.","solutions":["Install or update Docker Desktop (or the docker-mcp CLI plugin) to a version that supports `docker mcp`.","Run `docker mcp version` manually to reproduce and diagnose the underlying failure.","Start the Docker daemon (Docker Desktop running / systemctl start docker) and retry.","If Docker MCP is not wanted, skip enabling it — this error only blocks the Docker MCP integration."],"exampleFix":"// before\n$ docker mcp version\ndocker: 'mcp' is not a docker command. // old Docker\n// after\n$ # update Docker Desktop to >= 4.43 (or install docker-mcp plugin), then:\n$ docker mcp version\nDocker MCP version vX.Y.Z","handlingStrategy":"validation","validationCode":"cmd := exec.Command(\"docker\", \"mcp\", \"version\")\nif err := cmd.Run(); err != nil {\n    return errors.New(\"docker MCP unavailable: install/update Docker Desktop or the docker-mcp plugin first\")\n}","typeGuard":"func dockerMCPAvailable() bool {\n    out, err := exec.Command(\"docker\", \"mcp\", \"version\").Output()\n    return err == nil && len(out) > 0\n}","tryCatchPattern":"if err := store.EnableDockerMCP(); err != nil {\n    if strings.Contains(err.Error(), \"docker mcp is not available\") {\n        showInstallInstructions(\"https://docs.docker.com/desktop/\")\n        return nil // degrade gracefully, skip Docker MCP feature\n    }\n    return err\n}","preventionTips":["Probe `docker mcp version` before offering the Docker MCP toggle in tooling.","Keep Docker Desktop updated (MCP Toolkit requires a recent version).","Ensure the Docker daemon is running before enabling integrations."],"tags":["docker","mcp","dependency","environment"],"backgroundTag":"missing-docker-mcp","analyzedSha":"7944b8e52225d8805e31eacbf7ef24856b0dfb7a","analyzedAt":"2026-08-29T12:48:59.079Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}