MCPHub is a command-line tool for building and managing Model Context Protocol (MCP) servers with Docker.
- 🚀 Initialize MCP server configurations
- 📦 Build Docker images from MCP server zip files
- 🔄 Load Docker images from tar files
▶️ Run Docker containers with custom configurations
- Docker installed and running
- Go 1.22+ (for building from source)
git clone <repository-url>
cd MCPHub
go build -o mcphub cmd/main.gomcphub init [--yes]Creates a new mcp.json configuration file. Use --yes to skip prompts and use defaults.
mcphub push <zip-file>Extracts the zip file, reads the MCP configuration, and builds a Docker image.
mcphub pull <tar-file>Loads a Docker image from a tar file.
mcphub run <image-name> [flags]Flags:
--detach, -d: Run container in detached mode (default: true)--port, -p: Port mapping (e.g., 8080:8080)--name, -n: Container name (defaults to image name)
The mcp.json file structure:
{
"name": "my-mcp-server",
"version": "1.0.0",
"description": "My MCP server",
"author": "Author Name",
"license": "MIT",
"keywords": ["mcp", "server"],
"repository": "https://github.com/user/repo",
"run": {
"command": "node",
"args": ["server.js"],
"port": 3000
}
}-
Create a new MCP server configuration:
mcphub init --yes
-
Build and run a server:
mcphub push my-server.zip mcphub run my-mcp-server --port 3000:3000
-
Run in interactive mode:
mcphub run my-server --detach=false