fix: wire STDIO attach for docker-image MCP servers #49
Reference in New Issue
Block a user
Delete Branch "feat/k8s-operator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
1bd5087addedattachInteractiveto the orchestrator but never called it —sendViaPersistentAttachwas promised in the commit message and missing from the diff. Docker-image STDIO servers like gitea-mcp ended up with a bogusnode dist/index.jsworkaround that silently failed on every exec, leaving Claude with empty tool lists.PersistentStdioClientnow takes aStdioModediscriminated union ({kind:'exec'}|{kind:'attach'}).mcp-proxy-servicedispatches: command → exec, packageName → runtime exec, dockerImage-only → attach to PID 1. Error serialization no longer drops non-Error objects as[object Object].templates/gitea.yaml: dropped the workaround command — image CMD runs as PID 1 and mcpd attaches.Test plan
pnpm --filter mcpd exec vitest run— 634/634 passing (incl. 4 new persistent-stdio tests covering both modes)tools/callround-trip reaches GiteaRequired follow-up (separate repo)
mcpd's k8s Role needs
pods/attachalongsidepods/exec. Updated inkubernetes-deployment/deployments/mcpctl/server.tsand kubectl-patched on the live cluster; the Pulumi apply will pick it up.