MCP Connector

Manage Docker Containers and Registries

A Docker MCP server with 16 tools and 25+ CLI aliases for containers, Compose, registries, and cleanup.

Works with dockergithubawsazuregoogle

90
Spark score
out of 100
Status Verified
Updated 3 months ago
Version 1.0.0
Models
universal

Add to Favorites

Why it matters

Streamline your Docker operations with a unified interface for container lifecycle management, registry interactions, and system cleanup.

Outcomes

What it gets done

01

Manage the complete container lifecycle from build to publish.

02

Perform secure registry operations across Docker Hub, ECR, ACR, and GCR.

03

Orchestrate multi-container Docker Compose applications.

04

Intelligently clean up system resources with multiple security levels.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-docker | bash

Capabilities

Tools your agent gets

list_containers

List all running Docker containers with details

list_images

List all Docker images available on the system

run_container

Run a Docker container with specified configuration

start_compose

Start Docker Compose services for multi-container orchestration

login_registry

Authenticate with Docker registries including Hub, ECR, ACR, GCR

build_image

Build a Docker image from a Dockerfile

push_image

Push Docker image to a registry

pull_image

Pull Docker image from a registry

+7 tools

Overview

Docker MCP Server

A Docker MCP server exposing 16 tools and 25+ CLI aliases for container, Compose, network, volume, registry, and cleanup operations, with Docker-daemon-managed credential security. Use when an AI assistant or terminal workflow needs consistent, secure Docker operations across containers, Compose, and registries.

What it does

Docker MCP Server is a Model Context Protocol server providing advanced Docker operations through a unified interface, combining 16 Docker MCP tools with 25+ CLI aliases into a complete Docker workflow solution for developers, DevOps engineers, and system administrators.

When to use - and when NOT to

Use this when an AI assistant or terminal workflow needs to manage Docker containers, images, networks, volumes, Compose stacks, or registry publishing through a consistent, security-conscious interface rather than raw docker CLI calls.

Capabilities

Organized into basic operations, 8 aliases for everyday container and image management such as dimages, dps, dpsa, dpull, drun, dlogs, dexec, and dbuild, advanced operations covering Docker Compose orchestration via dcompose/dup/ddown, networking and volumes via dnetwork/dvolume/dinspect, registry login and publishing via dlogin/dlogout/dpublish, system maintenance via dprune/dclean/dstop/dreset, and development-focused commands like dbridge and ddev, plus three utility commands, docker-mcp-server, dms, and dlist, for discovering all available commands. Security-first design routes all password operations through the Docker daemon itself so credentials never appear in command history, process lists, or arguments, with token-based authentication supported for Docker Hub, AWS ECR, Azure ACR, Google GCR, and custom registries, plus secure stdin password input for CI/CD pipelines. Every command ships with detailed --help documentation and built-in confirmation prompts for destructive operations.

How to install

Add to an MCP client's config, such as Claude Desktop's claude_desktop_config.json or VS Code Cline's .vscode/mcp.json:

{
  "mcpServers": {
    "docker-mcp-server": {
      "command": "npx",
      "args": ["-y", "@0xshariq/docker-mcp-server@latest"]
    }
  }
}

or install the CLI globally with npm install -g @0xshariq/docker-mcp-server, or pnpm, then verify with docker-mcp-server --version and dlist. Requires Node.js 18+, Docker itself, and npm. A universal ./start-mcp.sh script handles automatic environment setup for Claude Desktop, Cursor IDE, Continue, Open WebUI, and other MCP clients. Common install issues: a missing global npm bin directory in PATH, fixed by adding it to your shell profile, the Docker daemon not running, fixed by starting it or launching Docker Desktop, and permission errors on Linux, resolved by adding the user to the docker group and re-logging in. After install, dlist should show all available commands, dps should list running containers, and dimages should list local images, confirming the setup works before wiring it into an MCP client.

Who it's for

Developers, DevOps engineers, and sysadmins who want Docker container lifecycle, Compose orchestration, registry publishing, and cleanup operations available as both MCP tools inside an AI assistant and as fast CLI aliases in the terminal, built in TypeScript under the ISC license.

Source README

Docker MCP Server

A comprehensive Model Context Protocol (MCP) server that provides advanced Docker operations through a unified interface. This server combines 16 powerful Docker MCP tools with 25+ convenient CLI aliases to create a complete Docker workflow solution for developers, DevOps engineers, and system administrators.

Listed on Spark
Install via Spark

๐ŸŒŸ What Makes Docker MCP Server Special

Docker MCP Server is not just another Docker wrapper - it's a complete Docker workflow enhancement system designed to make Docker operations more intuitive, secure, and efficient:

๐ŸŽฏ Unified Interface

  • MCP Protocol Integration: Seamlessly works with MCP-compatible tools and IDEs
  • CLI Convenience: 25+ carefully crafted aliases for common Docker workflows
  • Consistent API: All operations follow the same patterns and conventions
  • Cross-Platform: Full support for Linux, macOS, and Windows environments

๐Ÿ”’ Security-First Design

  • Docker-Managed Security: All password operations handled by Docker daemon for maximum security
  • Zero Password Exposure: Passwords never appear in command history, process lists, or arguments
  • Token Authentication Support: Full support for Personal Access Tokens and service accounts
  • Registry Flexibility: Secure login to Docker Hub, AWS ECR, Azure ACR, Google GCR, and custom registries
  • CI/CD Security: Secure stdin password input for automated deployment pipelines
  • Permission Management: Proper handling of Docker daemon permissions and credential storage

๐Ÿš€ Developer Experience

  • Comprehensive Help System: Every command includes detailed documentation with --help
  • Smart Defaults: Sensible default configurations for common use cases
  • Error Prevention: Built-in safety checks and confirmation prompts for destructive operations
  • Rich Output: Formatted, colored output with clear status indicators

๐Ÿ“Š Advanced Operations

  • Complete Container Lifecycle: From build to publish with comprehensive registry support
  • Multi-Container Management: Docker Compose integration with service orchestration
  • Registry Publishing: Advanced image publishing with multi-platform support and automated workflows
  • Network & Volume Management: Advanced networking and storage operations
  • System Maintenance: Intelligent cleanup tools with multiple safety levels
  • Development Workflows: Specialized commands for development environments

๐Ÿ“ฆ Installation

Quick Setup for MCP Clients

Add this configuration to your MCP client settings:

{
  "mcpServers": {
    "docker-mcp-server": {
      "command": "npx",
      "args": ["-y", "@0xshariq/docker-mcp-server@latest"]
    }
  }
}

Where to add this:

  • Claude Desktop: claude_desktop_config.json
  • VS Code Cline: .vscode/mcp.json
  • Other MCP Clients: Check your client's configuration documentation

Simple Installation (Recommended)

Install Docker MCP Server globally to use it anywhere on your system:

# Install with npm
npm install -g @0xshariq/docker-mcp-server

# Or install with pnpm (faster)
pnpm add -g @0xshariq/docker-mcp-server

# Verify installation works
docker-mcp-server --version
dlist                        # List all available commands

That's it! All 25 CLI aliases are now available system-wide.

For Developers

If you want to contribute or customize the server:

# Clone and setup
git clone https://github.com/0xshariq/docker-mcp-server.git
cd docker-mcp-server
npm install
npm run build

# Test locally
npm link                     # Makes commands available globally
dlist                       # Verify it works

What You Need First

Before installing, make sure you have:

Check if you have them:

node --version              # Should show v18 or higher
docker --version           # Should show Docker version

๐Ÿš€ Quick Start

Try It Out

Once installed, try these commands to see Docker MCP Server in action:

# See all available commands
dlist

# Basic Docker operations
dps                         # List running containers
dimages                     # List Docker images
drun -it ubuntu bash        # Run interactive Ubuntu container

# Advanced operations
dcompose up -d              # Start Docker Compose services
dlogin                      # Login to Docker registries
dpublish myapp:v1.0         # Publish image to registry

๐Ÿ“š Documentation

Learn More:

๐ŸŽฏ What You Get

Basic Commands (8 aliases)

Simple, everyday Docker operations that just work:

  • Container Management: List, run, stop, and inspect containers
  • Image Operations: Pull, build, and manage Docker images
  • Logs & Debugging: View logs and execute commands inside containers

Advanced Commands (14 aliases)

Powerful tools for complex Docker workflows:

  • Multi-Container Apps: Full Docker Compose integration
  • Registry Operations: Secure login and image publishing to Docker Hub, GitHub, AWS, etc.
  • Network & Storage: Advanced networking and volume management
  • System Maintenance: Intelligent cleanup and environment management
  • Development Tools: Specialized workflows for development environments

๐Ÿ”ง MCP Server Setup

For Claude Desktop

  1. Find your Claude config file:

    • Linux: ~/.config/claude-desktop/claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add this to your config:

    {
      "mcpServers": {
        "docker": {
          "command": "node",
          "args": ["/path/to/docker-mcp-server/dist/index.js"]
        }
      }
    }
    
  3. Restart Claude Desktop and you'll see Docker tools available!

Universal Startup Script

Use our startup script for automatic setup with any MCP client:

./start-mcp.sh              # Automatic environment setup
./start-mcp.sh --help       # See all options

Compatible with: Claude Desktop, Cursor IDE, Continue (VS Code), Open WebUI, and more!

๐Ÿ—๏ธ Project Structure

docker-mcp-server/
โ”œโ”€โ”€ src/                    # TypeScript source code
โ”œโ”€โ”€ bin/                    # CLI alias scripts
โ”‚   โ”œโ”€โ”€ basic/             # 8 basic Docker operations
โ”‚   โ””โ”€โ”€ advanced/          # 14 advanced Docker operations
โ”œโ”€โ”€ help/                  # Documentation for all commands
โ”œโ”€โ”€ start-mcp.sh          # Universal MCP server startup script
โ”œโ”€โ”€ docker-cli.js         # Main CLI wrapper
โ””โ”€โ”€ dist/                 # Compiled JavaScript output

๐Ÿ“š Complete Documentation:

โšก All Available Commands

Basic Operations (8 commands)

Essential Docker operations for daily use:

  • dimages, dps, dpsa, dpull, drun, dlogs, dexec, dbuild

Advanced Operations (14 commands)

Powerful tools for complex workflows:

  • dcompose, dup, ddown, dnetwork, dvolume, dinspect, dprune
  • dlogin, dlogout, dpublish, dbridge, ddev, dclean, dstop, dreset

Utility Commands (3 commands)

  • docker-mcp-server, dms, dlist

๐Ÿ“– See detailed documentation: Use dlist command or check the README files linked above.

๐Ÿ”ง Development

For Contributors

# Setup development environment
git clone https://github.com/0xshariq/docker-mcp-server.git
cd docker-mcp-server
npm install

# Development commands
npm run dev                 # Build and watch for changes
npm run build              # Build TypeScript
npm run start              # Start MCP server
npm run clean              # Clean build files

๐Ÿงช Testing

Quick Test

# After installation, test these commands
dlist                      # Should show all 25 commands
dps                        # Should list containers
dimages                    # Should list images

Test MCP Integration

./start-mcp.sh             # Should start without errors

๐Ÿ†˜ Common Issues

"Command not found"

# Make sure npm global bin is in your PATH
echo $PATH | grep $(npm config get prefix)

# If not found, add this to ~/.bashrc or ~/.zshrc:
export PATH="$(npm config get prefix)/bin:$PATH"

"Docker daemon not running"

# Check Docker status
docker info

# Start Docker (Linux)
sudo systemctl start docker

# Start Docker Desktop (macOS/Windows)
# Launch the Docker Desktop app

"Permission denied"

# Add yourself to docker group (Linux)
sudo usermod -aG docker $USER
# Then logout and login again

๐Ÿ“‹ More Help:


๐Ÿ“„ License

ISC License

๐Ÿ‘จโ€๐Ÿ’ป Author

Sharique Chaudhary (@0xshariq)

๐Ÿค Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Test your changes
  4. Submit a pull request

๐Ÿ”— Links


โœจ Docker MCP Server - Making Docker workflows simple and powerful for everyone!

FAQ

Common questions

Trust

How it checks out

Official By maintainer
Downloads 0

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.