Kubernetes MCP Server
Manage Kubernetes and OpenShift clusters from an assistant through the cluster's API
Manage Docker containers, images, networks and volumes on a local or remote engine
By Christian Kreiling (individual) Python Local · stdio DevOps and monitoring
66 popularity score ★ 754 ↓ 7.9k/mo
Opens the app, which asks before it adds the server.
claude mcp add docker -- uvx mcp-server-docker{
"mcpServers": {
"docker": {
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}{
"mcpServers": {
"docker": {
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}{
"servers": {
"docker": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}[mcp_servers.docker]
command = "uvx"
args = ["mcp-server-docker"]gemini mcp add --scope user docker uvx -- mcp-server-dockerOpens the app, which asks before it adds the server.
git clone https://github.com/ckreiling/mcp-server-docker.git
cd mcp-server-docker
docker build -t mcp-server-docker .claude mcp add docker -- docker run -i --rm -v /var/run/docker.sock:/var/run/docker.sock mcp-server-docker:latest{
"mcpServers": {
"docker": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/var/run/docker.sock:/var/run/docker.sock",
"mcp-server-docker:latest"
]
}
}
}{
"mcpServers": {
"docker": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/var/run/docker.sock:/var/run/docker.sock",
"mcp-server-docker:latest"
]
}
}
}{
"servers": {
"docker": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/var/run/docker.sock:/var/run/docker.sock",
"mcp-server-docker:latest"
]
}
}
}[mcp_servers.docker]
command = "docker"
args = ["run", "-i", "--rm", "-v", "/var/run/docker.sock:/var/run/docker.sock", "mcp-server-docker:latest"]gemini mcp add --scope user docker docker -- run -i --rm -v /var/run/docker.sock:/var/run/docker.sock mcp-server-docker:latestDOCKER_HOST |
Optional: Address of the Docker engine; set an ssh://user@host URL to manage a remote engine. Defaults to the local socket. |
|---|---|
DOCKER_TLS_VERIFY |
Optional: Turn on TLS verification for a TCP DOCKER_HOST (read by the Docker SDK's from_env). |
DOCKER_CERT_PATH |
Optional: Folder holding the TLS certificates for a TCP DOCKER_HOST. |
In a container, a setting goes in with -e NAME=value after docker run.
MCP Server Docker is a Python server that gives an assistant control of a Docker engine through the Docker SDK for Python. It works on the daemon your environment points at: the local socket by default, or a remote engine over SSH when DOCKER_HOST is set to an ssh:// address.
Its 19 tools cover four kinds of object. For containers it can list, create, run, recreate, start, stop and remove them and fetch their logs; for images it can list, pull, push, build and remove; networks and volumes can each be listed, created and removed. Two resource templates return a container's last 100 log lines and a one-off snapshot of its resource usage, given its ID or name.
It also ships a docker_compose prompt for describing a set of containers in plain language. The prompt has the assistant label and prefix every resource with a project name, present a plan, and apply it only after you approve; starting a new chat with the same project name passes in the containers, volumes and networks already carrying that label, which helps when cleaning up after a lost session.
In version 0.3.0 the fetch_container_logs tool returns the last 100 lines by default; its tail argument takes another number or "all" (server.py). There is no tool to run a command inside a running container.
| Runtime | PythonorDocker |
|---|
uv (for the uvx command) and Python, plus a reachable Docker engine: a running local daemon whose socket your user can use, or a remote engine reached over SSH with an ssh:// DOCKER_HOST and working SSH access. The container way needs a clone of the repository and a locally built image, since the docs publish none.
Its makers leave out sensitive Docker options such as --privileged and --cap-add/--cap-drop, and no tool takes them. It has no tool to exec into a running container or to manage Compose files; the docker_compose prompt works through the individual container, network and volume tools. The makers warn not to configure containers with secrets such as API keys or database passwords, since anything passed through the assistant should be treated as exposed unless the model runs locally. The container way has no published image: you build it yourself from the repository.
It suits developers and administrators who want an assistant to bring up, inspect and tear down containers on their own machine or on a remote host they reach over SSH, and who will review what it creates. It is a third-party server, not one from Docker, and its tools can delete containers, images and volumes and mount host paths, so it is a poor fit for a shared or production engine you cannot afford to have changed. Someone who only wants to read logs or list containers gets no read-only mode here.
list_containerscreate_containerrun_containerrecreate_containerstart_containerfetch_container_logsstop_containerremove_containerlist_imagespull_imagepush_imagebuild_imageremove_imagelist_networkscreate_networkremove_networklist_volumescreate_volumeremove_volume