A comprehensive Model Context Protocol (MCP) server that provides Docker container and image management capabilities for AI assistants and automation tools. Includes 15 Docker operations + workflow combinations with complete CLI alias system, enhanced log
npm install @0xshariq/docker-mcp-serverA 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.
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:
--helpInstall Docker MCP Server globally to use it anywhere on your system:
``bashInstall with npm
npm install -g @0xshariq/docker-mcp-server
That's it! All 25 CLI aliases are now available system-wide.
$3
If you want to contribute or customize the server:
`bash
Clone and setup
git clone https://github.com/0xshariq/docker-mcp-server.git
cd docker-mcp-server
npm install
npm run buildTest locally
npm link # Makes commands available globally
dlist # Verify it works
`$3
Before installing, make sure you have:
- Node.js 18+ - Download here
- Docker - Install Docker
- npm (comes with Node.js)
Check if you have them:
`bash
node --version # Should show v18 or higher
docker --version # Should show Docker version
`๐ Quick Start
$3
Once installed, try these commands to see Docker MCP Server in action:`bash
See all available commands
dlistBasic Docker operations
dps # List running containers
dimages # List Docker images
drun -it ubuntu bash # Run interactive Ubuntu containerAdvanced operations
dcompose up -d # Start Docker Compose services
dlogin # Login to Docker registries
dpublish myapp:v1.0 # Publish image to registry
`$3
Learn More:
- ๐ Basic Commands - 8 essential Docker operations made simple
- โก Advanced Commands - 14 powerful tools for complex workflows
- ๐ง MCP Server Setup - Connect with Claude Desktop and other MCP clients
๐ฏ What You Get
$3
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$3
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
$3
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.json2. Add this to your config:
`json
{
"mcpServers": {
"docker": {
"command": "node",
"args": ["/path/to/docker-mcp-server/dist/index.js"]
}
}
}
`3. Restart Claude Desktop and you'll see Docker tools available!
$3
Use our startup script for automatic setup with any MCP client:`bash
./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:
- Basic Commands Reference - 8 essential Docker operations
- Advanced Commands Reference - 14 powerful workflow tools
- All Available Commands - Complete syntax and examples
โก All Available Commands
$3
Essential Docker operations for daily use:
- dimages, dps, dpsa, dpull, drun, dlogs, dexec, dbuild$3
Powerful tools for complex workflows:
- dcompose, dup, ddown, dnetwork, dvolume, dinspect, dprune
- dlogin, dlogout, dpublish, dbridge, ddev, dclean, dstop, dreset$3
- docker-mcp-server, dms, dlist๐ See detailed documentation: Use
dlist command or check the README files linked above.๐ง Development
$3
`bash
Setup development environment
git clone https://github.com/0xshariq/docker-mcp-server.git
cd docker-mcp-server
npm installDevelopment 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
$3
`bash
After installation, test these commands
dlist # Should show all 25 commands
dps # Should list containers
dimages # Should list images
`$3
`bash
./start-mcp.sh # Should start without errors
`๐ Common Issues
$3
`bash
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"
`$3
`bash
Check Docker status
docker infoStart Docker (Linux)
sudo systemctl start dockerStart Docker Desktop (macOS/Windows)
Launch the Docker Desktop app
`$3
`bash
Add yourself to docker group (Linux)
sudo usermod -aG docker $USER
Then logout and login again
`๐ More Help:
- Check
dlist --help` for all commands---
ISC License
Sharique Chaudhary (@0xshariq)
Contributions welcome! Please:
1. Fork the repository
2. Create a feature branch
3. Test your changes
4. Submit a pull request
- GitHub Repository
- NPM Package
- Issues & Support
---
โจ Docker MCP Server - Making Docker workflows simple and powerful for everyone!