feat: add node-runner base image for npm-based MCP servers #11

Merged
michal merged 1 commits from feat/node-runner-base-image into main 2026-02-22 23:41:37 +00:00
Owner

Summary

  • Add Dockerfile.node-runner: minimal node:20-alpine image for running npm-based MCP servers via npx -y <packageName>
  • Fix instance service to use node-runner image when server has packageName but no dockerImage (was causing "invalid reference format" errors)
  • Fix NanoCPUs: only set when explicitly provided (kernel CFS not available on all hosts)
  • Add mcp-servers network with explicit name for container isolation
  • MCP server containers: no host port bindings (only mcpd can reach them), but outbound access allowed for API calls

Test plan

  • 236 mcpd tests pass
  • 196 CLI tests pass
  • Build node-runner image on deployment host
  • Redeploy mcpd, reconcile servers
  • Verify grafana/home-assistant/node-red instances start successfully
## Summary - Add `Dockerfile.node-runner`: minimal node:20-alpine image for running npm-based MCP servers via `npx -y <packageName>` - Fix instance service to use node-runner image when server has `packageName` but no `dockerImage` (was causing "invalid reference format" errors) - Fix NanoCPUs: only set when explicitly provided (kernel CFS not available on all hosts) - Add `mcp-servers` network with explicit name for container isolation - MCP server containers: no host port bindings (only mcpd can reach them), but outbound access allowed for API calls ## Test plan - [x] 236 mcpd tests pass - [x] 196 CLI tests pass - [ ] Build node-runner image on deployment host - [ ] Redeploy mcpd, reconcile servers - [ ] Verify grafana/home-assistant/node-red instances start successfully
michal added 1 commit 2026-02-22 23:41:30 +00:00
feat: add node-runner base image for npm-based MCP servers
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / package (pull_request) Has been cancelled
a2cda38850
STDIO servers with packageName (e.g. @leval/mcp-grafana) need a Node.js
container that runs `npx -y <package>`. Previously, packageName was used
as a Docker image reference causing "invalid reference format" errors.

- Add Dockerfile.node-runner: minimal node:20-alpine with npx entrypoint
- Update instance.service.ts: detect npm-based servers and use node-runner
  image with npx command instead of treating packageName as image name
- Fix NanoCPUs: only set when explicitly provided (kernel CFS not available
  on all hosts)
- Add mcp-servers network with explicit name for container isolation
- Configure MCPD_NODE_RUNNER_IMAGE and MCPD_MCP_NETWORK env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal merged commit e4aef3acf1 into main 2026-02-22 23:41:37 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: michal/mcpctl#11