Docker MCP Server
Provides tools for managing Docker containers and images, including listing containers and images, running containers with customizable options, stopping and removing containers, and pulling images from registries.
Mentioned as an example image that can be pulled and run as a container with port mapping.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Docker MCP Server list all Docker containers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Docker MCP Server
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.
Features
List Docker containers
List Docker images
Run Docker containers
Stop running containers
Remove containers
Pull Docker images from registries
Related MCP server: Docker MCP Server
Installation
Prerequisites
Node.js 18 or higher
Docker installed and running on your system
Install from npm
npm install -g docker-mcp-serverInstall from source
Clone this repository
Install dependencies:
cd docker-mcp
npm installBuild the project:
npm run buildUsage
Running the server
docker-mcp-serverOr if installed from source:
npm startConfiguring with Claude
You can use the included installation script to automatically configure the Docker MCP server with Claude:
npm run install-configThis script will:
Detect your Claude installations (Desktop and/or VSCode)
Update the configuration files to include the Docker MCP server
Set up the correct paths for your system
Manual Configuration
If you prefer to configure manually, you need to add the Docker MCP server to your MCP settings configuration file:
For Claude Desktop App (macOS)
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": []
}
}
}For Claude in VSCode
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.
Available Tools
list_containers
List all Docker containers.
Parameters:
all(boolean, optional): Show all containers (default shows just running)
list_images
List all Docker images.
run_container
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 container
stop_container
Stop a running Docker container.
Parameters:
container(string, required): Container ID or name
remove_container
Remove a Docker container.
Parameters:
container(string, required): Container ID or nameforce(boolean, optional): Force removal of running container
pull_image
Pull a Docker image from a registry.
Parameters:
image(string, required): Image name (e.g. "nginx:latest")
Example Usage with Claude
Once configured, you can ask Claude to perform Docker operations:
"Run a hello-world Docker container"
"List all Docker containers"
"Pull the latest nginx image"
"Run an nginx container on port 8080"
"Stop the nginx container"
"Remove all stopped containers"
MCP Marketplace
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:
License
MIT
Available Tools
6 toolslist_containersB
List all Docker containers
Inputs: all.
list_imagesA
List all Docker images
Inputs: no named parameters.
pull_imageB
Pull a Docker image from a registry
Inputs: image (required).
remove_containerC
Remove a Docker container
Inputs: container (required), force.
run_containerC
Run a Docker container
Inputs: image (required), name, detach, ports, +3 more.
stop_containerB
Stop a running Docker container
Inputs: container (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose targeting specific Docker resources and actions. For example, list_containers vs. remove_container vs. run_container have no overlap, making it easy for an agent to select the right tool without confusion.
All tools follow a consistent verb_noun pattern with snake_case (e.g., list_containers, pull_image, stop_container). There are no deviations in naming conventions, making the set predictable and readable.
With 6 tools, this is well-scoped for basic Docker operations. Each tool earns its place by covering essential container and image management tasks without being overly sparse or bloated.
The toolset covers core Docker workflows like listing, running, stopping, and removing containers, plus image listing and pulling. A minor gap exists in image management (e.g., no remove_image or inspect tools), but agents can work around this for most common tasks.
Maintenance
Related MCP Connectors
Hosting for AI agents: your AI client deploys Docker apps to live HTTPS URLs over MCP.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Docker container management directly through Claude using the Model Context Protocol. Provides 14 tools for managing containers, images, volumes, and Docker Compose deployments through natural language commands.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants like Claude to manage Docker containers, images, and Docker Compose deployments through the Model Context Protocol. Provides secure container lifecycle management, image operations, and multi-host Docker server connections.236 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Docker containers, images, networks, volumes, and Compose services through the Model Context Protocol. It supports system operations, command execution within containers, and integration with Docker Hub and GitHub Container Registry.154 npm2MIT
- AlicenseAqualityDmaintenanceEnables managing Docker containers (run, list, stop, remove, view logs) through Claude Desktop using natural language commands.577 npmMIT