MCP server for Docker
An MCP server for managing Docker with natural language!
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"mcp-server-docker": {
"command": "uv",
"args": [
"--directory",
"/path/to/repo",
"run",
"mcp-server-docker"
]
}
}
After cloning this repository, build the Docker image:
docker build -t mcp-server-docker .
And then add the following to your MCP servers file:
"mcpServers": {
"mcp-server-docker": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/var/run/docker.sock:/var/run/docker.sock",
"mcp-server-docker:latest"
]
}
}
docker_composeUse natural language to compose containers.
Provide a Project Name, and a description of desired containers, and let the LLM do the rest.
This prompt instructs the LLM to enter a plan+apply loop. Your interaction
with the LLM will involve the following steps:
nginx, containers: “deploy an nginx container exposing it on port
9000”wordpress, containers: “deploy a WordPress container and a supporting
MySQL container, exposing Wordpress on port 9000”When starting a new chat with this prompt, the LLM will receive the status of
any containers, volumes, and networks created with the given project name.
This is mainly useful for cleaning up, in-case you lose a chat that was responsible for many containers.
The server implements a couple resources for every container:
list_containerscreate_containerrun_containerrecreate_containerstart_containerfetch_container_logsstop_containerremove_containerlist_imagespull_imagepush_imagebuild_imageremove_imagelist_networkscreate_networkremove_networklist_volumescreate_volumeremove_volumeDO NOT CONFIGURE CONTAINERS WITH SENSITIVE DATA. This includes API keys, database passwords, etc.
Any sensitive data exchanged with the LLM is inherently compromised, unless the LLM is running on your local machine.
If you are interested in securely passing secrets to containers, file an issue on this repository with your use-case.
Be careful to review the containers that the LLM creates. Docker is not a secure sandbox, and therefore the MCP server can potentially impact the host machine through Docker.
For safety reasons, this MCP server doesn’t support sensitive Docker options
like --privileged or --cap-add/--cap-drop. If these features are of interest
to you, file an issue on this repository with your use-case.
This server uses the Python Docker SDK’s from_env method. For configuration
details, see
the documentation.
Prefer using Devbox to configure your development environment.
See the devbox.json for helpful development commands.
An MCP (Model Context Protocol) server for executing macOS terminal commands with ZSH shell. This server provides a secure way to execute shell commands with built-in whitelisting and approval mechanisms.
A Model Context Protocol (MCP) server for querying the CVE-Search API
DevEnvInfoServer - Cursor MCP Server for Development Environment Information