Skip to content

Add Docker support with HTTP transport for SSH MCP Server#2

Open
wirwolf wants to merge 1 commit into
mainfrom
claude/confident-maxwell-c0HlW
Open

Add Docker support with HTTP transport for SSH MCP Server#2
wirwolf wants to merge 1 commit into
mainfrom
claude/confident-maxwell-c0HlW

Conversation

@wirwolf

@wirwolf wirwolf commented May 28, 2026

Copy link
Copy Markdown

Summary

This PR adds comprehensive Docker support to the SSH MCP Server, enabling users to run the server in containerized environments with HTTP transport. This includes a production-ready Dockerfile, GitHub Actions CI/CD pipeline for automated image builds, and detailed documentation.

Key Changes

  • Dockerfile: Multi-stage build configuration using Node.js 22 Alpine for optimized image size, with separate build and runtime stages
  • docker-entrypoint.sh: Shell script that configures the MCP server with HTTP transport based on environment variables, supporting dynamic configuration without rebuilding images
  • .dockerignore: Excludes unnecessary files from the Docker build context to reduce image size
  • .github/workflows/docker.yml: GitHub Actions workflow that automatically builds and pushes Docker images to GitHub Container Registry on:
    • Every push to main (tagged as latest)
    • Every version tag (semantic versioning support)
    • Pull requests (build only, no push)
    • Multi-platform support for linux/amd64 and linux/arm64
  • README.md: Comprehensive Docker documentation including:
    • Image pull instructions
    • SSH config file setup guide
    • Container startup with environment variable reference
    • MCP client configuration examples for Claude Desktop and Claude Code
    • Docker Compose example for easy deployment

Notable Implementation Details

  • The entrypoint script dynamically constructs CLI arguments based on environment variables (HTTP_HOST, HTTP_PORT, HTTP_PATH, HTTP_API_KEY, SSH_CONFIG_FILE), allowing flexible configuration without image rebuilds
  • Multi-stage Docker build reduces final image size by excluding build dependencies
  • GitHub Actions workflow uses Docker Buildx for efficient multi-platform builds with layer caching
  • Documentation emphasizes security best practices, including read-only volume mounts and API key configuration

https://claude.ai/code/session_01GuVvEMLNxVPgyQjkDvA2Qu

- Dockerfile: multi-stage build (node:22-alpine builder + slim runtime)
- docker-entrypoint.sh: maps HTTP_HOST/HTTP_PORT/HTTP_PATH/HTTP_API_KEY/SSH_CONFIG_FILE env vars to CLI args
- .dockerignore: exclude dev artifacts from build context
- .github/workflows/docker.yml: build and push multi-platform image (amd64/arm64) to ghcr.io on push to main and version tags
- README.md: new Docker section with docker run example, Docker Compose, and MCP client HTTP config snippets for Claude Desktop and Claude Code

https://claude.ai/code/session_01GuVvEMLNxVPgyQjkDvA2Qu

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33dbf52cc5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md
Comment on lines +572 to +575
docker pull ghcr.io/someblackmagic/ssh-mcp-server:latest

# Specific release
docker pull ghcr.io/someblackmagic/ssh-mcp-server:1.8.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point Docker commands at the published GHCR image

The workflow publishes to ghcr.io/${{ github.repository }}, and this README identifies the repository as classfang/ssh-mcp-server, so these commands direct users to ghcr.io/someblackmagic/ssh-mcp-server instead of the image this CI will build. Anyone following the Docker instructions will pull or run the wrong/nonexistent package unless the namespace matches the repository that owns the workflow.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants