Server facts
mcp-server-docker
GitHub stars
762
Last commit
Aug 7, 2026
Runtime
python
License
GPL-3.0
Project
- Author
- ckreiling
- Repository
- github.com/ckreiling/mcp-server-docker
- License
- GPL-3.0
- Category
- Cloud & DevOps
Tech
- Runtime
- python
- Transports
- stdio
- Remote access
- No
- Authentication
- Local Docker Socket or SSH DOCKER_HOST
Activity
- GitHub stars
- 762
- Last commit
- Data as of
Overview
Developers comparing docker mcp options should distinguish Docker Inc.'s Docker MCP Toolkit/Gateway from this open-source, community-built server (`ckreiling/mcp-server-docker`, GPL-3.0) designed specifically to control a Docker daemon via natural language. Implemented with MCP Python SDK v2's `MCPServer` API and the Python Docker SDK (`from_env`), it exposes 19 focused tools covering container lifecycle management (listing, creating, running, recreating, starting, stopping, removing, and pulling logs with `fetch_container_logs`) alongside Docker image, network, and persistent volume operations, plus live resource templates for container logs (`docker://containers/{container_id}/logs`) and JSON stats (`docker://containers/{container_id}/stats`). A built-in `docker_compose` prompt guides the LLM through a structured `plan+apply` review loop and resumes project state across fresh chats.
Install it quickly in Claude Desktop or any stdio MCP host via `uvx mcp-server-docker`, or build the repository's Dockerfile locally and bind-mount `/var/run/docker.sock` inside a container running over interactive stdio. To administer remote engines without installing an HTTP gateway, pass `DOCKER_HOST=ssh://user@host` in `env`. For host safety, the server deliberately omits dangerous flags such as `--privileged` and `--cap-add`/`--cap-drop`, and the README warns never to pass API keys or database passwords into containers through cloud LLMs.
Install & configure
Requirements
- `uv`/`uvx` (from Astral) to launch `mcp-server-docker` from PyPI, or Docker to build and run the local image
- Running local Docker daemon (with `/var/run/docker.sock` access) or remote Docker daemon reachable over `DOCKER_HOST=ssh://...`
- Stdio MCP client such as Claude Desktop
uvx mcp-server-dockerAdd `uvx mcp-server-docker` to `claude_desktop_config.json`, or clone and build `docker build -t mcp-server-docker .` and mount `/var/run/docker.sock`. Set `DOCKER_HOST` to `ssh://user@host` in `env` to control a remote engine over SSH.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-server-docker": {
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-server-docker": {
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"mcp-server-docker": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-server-docker": {
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-server-docker": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| list_containers | Lists containers managed by the connected local or remote Docker engine. |
| create_container | Creates a new Docker container definition without starting it immediately. |
| run_container | Creates and starts a Docker container in a single step. |
| recreate_container | Recreates an existing Docker container cleanly with updated settings. |
| start_container | Starts a stopped Docker container. |
| fetch_container_logs | Retrieves output logs from a running or stopped container for debugging. |
| stop_container | Stops a running Docker container. |
| remove_container | Removes a Docker container from the host daemon. |
| list_images | Lists container images stored on the connected Docker daemon. |
| pull_image | Pulls a container image from a configured registry. |
| push_image | Pushes a local Docker image to a registry. |
| build_image | Builds a Docker image through the connected Docker engine. |
| remove_image | Deletes a container image from the Docker daemon. |
| list_networks | Lists Docker networks configured on the daemon. |
| create_network | Creates a Docker network for inter-container communication. |
| remove_network | Removes an existing Docker network. |
| list_volumes | Lists persistent Docker volumes on the host. |
| create_volume | Creates a persistent Docker volume for stateful containers. |
| remove_volume | Deletes a Docker volume from the host. |
Use cases
- Spin up multi-container prototypes (such as WordPress plus MySQL on port 9000) interactively using the `docker_compose` plan+apply prompt.
- Troubleshoot failing containers by reading `fetch_container_logs` and resource URIs (`docker://containers/{container_id}/logs` and `stats`).
- Manage containers, images, volumes, and networks on a remote Linux host over SSH by setting `DOCKER_HOST=ssh://...`.
- Resume and cleanly tear down previously composed project stacks in a new chat session by referencing the project name.
Strengths
- Covers 19 container, image, network, and volume tools plus log/stats resource templates and a resumable `docker_compose` plan+apply prompt.
- Supports remote Docker hosts natively via Python Docker SDK `from_env` and `DOCKER_HOST=ssh://...` with no extra gateway software.
- Intentionally blocks dangerous Docker flags like `--privileged` and `--cap-add`/`--cap-drop` to reduce host risk.
Limitations
- Docker is not a security sandbox—review every container action before approval, and never pass API keys or database passwords through cloud LLMs.
- Licensed under GPL-3.0 (copyleft) and runs over local stdio only, without a built-in HTTP server transport.
- Containerized installation requires cloning and running `docker build` locally while mounting `/var/run/docker.sock`.
mcp-server-docker setup notes
- mcp-server-docker's stdio example needs a client that launches local processes.