Skip to content

Docker-isolated spawn: docker can't find its credential helper (bundle dir missing from child PATH) — #696 follow-on #715

Closed

Description

@algis-dumbris

Summary

Follow-on to #696 (fixed in v0.41.1 — thanks!). mcpproxy now invokes the resolved absolute docker path for docker-isolated servers, but the docker process it spawns inherits mcpproxy's sanitized PATH, which does not include the Docker Desktop bundle dir. So docker can't exec the sibling binaries it depends on — most importantly the credential helper configured in ~/.docker/config.json. Any docker-isolated server whose image isn't already present fails to pull.

Symptom

A docker-isolated upstream (uvx runtime, isolation image ghcr.io/astral-sh/uv:python3.11-bookworm) fails on first run:

core/connection_stdio.go:149 | Docker isolation configured | runtime_type=uvx, container_command=uvx
stdio transport (command="/Applications/Docker.app/Contents/Resources/bin/docker", docker_isolation=true): ...
  | Unable to find image 'ghcr.io/astral-sh/uv:python3.11-bookworm' locally
  | docker: error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
  | Run 'docker run --help' for more information

docker is invoked correctly (absolute path ✅), but it then shells out to docker-credential-desktop (per credsStore) to authenticate the registry pull, and that helper isn't resolvable on the child PATH.

Root cause

  • ~/.docker/config.json → "credsStore": "desktop" (Docker Desktop default), so docker runs docker-credential-desktop for every registry op, including anonymous pulls of public images.
  • docker-credential-desktop lives at /Applications/Docker.app/Contents/Resources/bin/docker-credential-desktop — the same bundle dir as the docker CLI — and is not on PATH.
  • The spawned docker inherits mcpproxy's sanitized PATH (no bundle dir), so the helper exec fails.
  • Image isn't cached locally → docker must pull → helper invoked → failure. (A pre-pulled image sidesteps it, since docker run then performs no registry op.)

Suggested fix

When spawning the resolved absolute docker binary, prepend its own directory (filepath.Dir(resolvedDockerPath), e.g. /Applications/Docker.app/Contents/Resources/bin) to the child process's PATH. That lets docker resolve its sibling helpers — docker-credential-*, docker-compose, docker-buildx, etc. — exactly as it would from a normal Docker Desktop shell. This generalizes the #696 fix from "find docker" to "let docker find its own tooling".

Steps to reproduce

  1. macOS + Docker Desktop, default credsStore: desktop, docker CLI not symlinked onto PATH.
  2. Configure a docker-isolated upstream (global docker_isolation.enabled: true; a uvx/npx server with an isolation image not present locally).
  3. Enable it → pull fails with error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH.

Environment

mcpproxy v0.41.1, macOS 26.5.1 (arm64), Docker Desktop 29.5.3. Resolved docker_path = /Applications/Docker.app/Contents/Resources/bin/docker (reported correctly in docker_status).

Activity

  1. algis-dumbris commented on Jun 18, 2026

    @algis-dumbris
    ContributorAuthor

    Confirmed fixed in v0.41.2: the docker-isolated uvx server (gcore-mcp-server) now pulls its image and connects (740 tools) — the spawned docker resolves docker-credential-desktop correctly. Verified with docker still NOT on PATH, credsStore: desktop, macOS 26.5.1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions