docker
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.
claude mcp add --transport stdio 0xshariq-docker-mcp-server docker run -i ghcr.io/0xshariq/docker-mcp-server:latest \ --env DOCKER_HOST="unix:///var/run/docker.sock" \ --env MCP_NETWORK_MODE="bridge" \ --env MCP_SERVER_LOG_LEVEL="info"
How to use
Docker MCP Server provides a unified MCP interface for managing comprehensive Docker workflows. It exposes 25+ aliases and 16 Docker-centric MCP tools that cover container lifecycle operations, image management, registry interactions, network and volume handling, and maintenance tasks. The server is designed to work with MCP-compatible clients and IDEs, offering a consistent API, detailed built-in help for each command, and safe defaults to reduce the risk of destructive actions. You can use the server to perform day-to-day Docker tasks through simple, standardized commands as well as advanced workflows like multi-container orchestration and registry publishing. The included aliases simplify common sequences (e.g., listing containers, pulling images, running containers, logging into registries) while providing rich output for quick decision making.
How to install
Prerequisites:
- Docker installed and running on the host
- Optional: natively available if you prefer building from source or using npm (for development or contributing)
Install and run the MCP server via Docker:
-
Pull and run the MCP server image: docker pull ghcr.io/0xshariq/docker-mcp-server:latest docker run -i --rm --name docker-mcp-server ghcr.io/0xshariq/docker-mcp-server:latest
-
If you want to expose commands locally, you can map ports or volumes as needed (adjust according to your environment): docker run -i --rm -v /var/run/docker.sock:/var/run/docker.sock:ro ghcr.io/0xshariq/docker-mcp-server:latest
-
Alternative development workflow (for contributors): git clone https://github.com/0xshariq/docker-mcp-server.git cd docker-mcp-server npm install npm run build npm link dlist
-
Quick startup script (universal MCP startup): ./start-mcp.sh ./start-mcp.sh --help
Note: If you plan to deploy this server in a production environment, customize environment variables and Docker run options (logging, networking, security) to suit your infrastructure.
Additional notes
Tips and considerations:
- Ensure Docker daemon is accessible by the MCP server (proper permissions on /var/run/docker.sock).
- Use the provided environment variables to control log levels, network mode, and security settings. Avoid exposing sensitive credentials in command history.
- When running in multi-user environments, prefer non-root users and secure token authentication as supported by the server.
- The server supports registry login to Docker Hub, AWS ECR, Azure ACR, Google GCR, and other registries via the built-in login tooling; ensure appropriate credentials are available to the MCP server.
- If you encounter command not found errors for aliases, verify that the MCP client is correctly configured and that the container image is up to date.
- For development contributions, consult the repository’s docs for building from source and running local tests.
Related MCP Servers
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
shadcn-ui
MCP server for shadcn/ui component references
advanced-homeassistant
An advanced MCP server for Home Assistant. 🔋 Batteries included.
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.