Allows Claude and other AI assistants to interact with Docker through the MCP protocol, enabling container and image management including listing, running, stopping, and pulling Docker resources.
A Model Context Protocol (MCP) server for Docker operations. This server allows Claude and other AI assistants to interact with Docker through the MCP protocol.
Note: This MCP server works with standard Docker CLI commands and does not currently support Docker Compose operations, other MCP servers with docker-compose didn't work reliably with cline yet.
npm install -g docker-mcp-server
cd docker-mcp npm install
npm run build
docker-mcp-server
Or if installed from source:
npm start
You can use the included installation script to automatically configure the Docker MCP server with Claude:
npm run install-config
This script will:
If you prefer to configure manually, you need to add the Docker MCP server to your MCP settings configuration file:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
:
{ "mcpServers": { "docker-mcp": { "command": "node", "args": ["/path/to/docker-mcp/dist/index.js"], "disabled": false, "autoApprove": [] } } }
Edit ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
:
{ "mcpServers": { "docker-mcp": { "command": "node", "args": ["/path/to/docker-mcp/dist/index.js"], "disabled": false, "autoApprove": [] } } }
Note: After configuring the Docker MCP server in VS Code, you may need to restart VS Code for the changes to take effect in Cline. If you encounter issues with the Docker MCP server not being recognized or working properly in Cline, try restarting VS Code.
List all Docker containers.
Parameters:
all
(boolean, optional): Show all containers (default shows just running)List all Docker images.
Run a Docker container.
Parameters:
image
(string, required): Docker image to runname
(string, optional): Name for the containerdetach
(boolean, optional): Run container in backgroundports
(array of strings, optional): Port mappings (e.g. ["8080:80"])volumes
(array of strings, optional): Volume mappings (e.g. ["/host/path:/container/path"])env
(array of strings, optional): Environment variables (e.g. ["KEY=value"])command
(string, optional): Command to run in the containerStop a running Docker container.
Parameters:
container
(string, required): Container ID or nameRemove a Docker container.
Parameters:
container
(string, required): Container ID or nameforce
(boolean, optional): Force removal of running containerPull a Docker image from a registry.
Parameters:
image
(string, required): Image name (e.g. "nginx:latest")Once configured, you can ask Claude to perform Docker operations:
This Docker MCP server is available on the Cline MCP Marketplace, making it easy for users to discover and install with one click.
The logo for the MCP Marketplace submission is located in the assets/logo.png
file.
For more information about the MCP Marketplace, visit:
MIT
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!