Skip to main content
Glama
docker-mcp
by falkenslab

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DOCKER_MCP_MODENoMode of operation chosen at startup: 'read' only looks, 'lab' only runs labs under a safety policy, and 'full' does everything Docker does (asking before anything dangerous). A tool outside the mode does not exist for the agent.full
DOCKER_MCP_LABS_DIRNoPath to the folder containing the practice labs (each with a compose.yaml and a check). Used in 'lab' mode.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server works Docker on the person's computer through its command line.

  • Each tool is a Docker task: use the one that fits; its description says what it needs and what it returns.

  • Tools annotated read-only only read. Any tool that changes something says so in its annotations and description; confirm with the person before calling one, and name what a destructive one removes.

  • Removals, prune and dangerous container options are confirmed by the person themselves: the server asks them before acting. If it says they said no, don't try again unless they ask; if it says the app can't ask, tell them why.

  • When a tool says Docker is missing or not running, tell the person how to install or start it, as the tool says; never try to install it.

  • server_info shows this server's version, mode and areas; check_requirements whether Docker is there.

  • This server is in full mode: everything Docker does. A container with dangerous options (privileged, the host's network, the Docker socket…) needs the person's explicit yes, which the server asks them for.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
server_infoA

Show this server's name, version, mode (read, lab or full) and areas, who confirms removals and dangerous options, its labs and data folders, and whether Docker is there. Contains no secrets.

check_requirementsA

Check the programs this server needs installed apart on the person's computer: whether each is there, its version, and, when one is missing or too old, how to install it on this system. Never installs anything: tell the person what to do.

docker_infoA

Docker's version, the engine's operating system and architecture, its CPUs and memory, and how many containers (running, stopped) and images there are. A first call to check Docker is up.

disk_usageA

How much disk Docker uses for images, containers, volumes and the build cache, and how much of it could be reclaimed by prune.

pruneA

Remove what isn't in use: stopped containers, dangling images (all unused ones with allImages), unused networks, unused volumes (only when volumes is true: their data is gone) and the build cache. Says how much space it freed. Can't be undone. The server asks the person to confirm it, naming what goes; if they say no, nothing is done.

list_containersA

List Docker containers, running or not (all unless running is true): id, name, image, state, status and ports. Names and ids are what the other container tools take.

inspect_containerA

A container's details: image, command, state (with its exit code), ports, mounts, networks and labels, and the names of its environment variables (never their values, which may hold secrets).

container_logsA

A container's last log lines (stdout and stderr), 200 by default; the start is left out when they're very long.

container_statsA

What containers consume right now, one snapshot (not a stream): CPU, memory (used, limit, percent), network and disk I/O, and processes. All running containers, or the ones named; a stopped one shows zeros. Use it to answer why the computer is slow or which container uses the most; container_processes shows what runs inside one.

container_processesA

The processes running inside a container (docker top): their user, PID, start time, CPU time and command, with the columns Docker gives. The container must be running.

run_containerA

Create and start a container from an image (pulled if missing), in the background unless detach is false. Changes the machine: confirm with the person first. With dangerous options (privileged, the host's network, processes or IPC, extra capabilities, devices, mounting the Docker socket, the host's root or the person's home), the server also asks the person itself, saying what each gives the container; if they say no, it isn't run. To try something without it reaching the computer, isolate it: network "none", cpus, memory and pids limits, readOnly, noNewPrivileges, no ports or host folders, and a label to find and remove it later (list_containers filters by label). A foreground run (detach false) is stopped and removed when timeoutSeconds runs out.

start_containerB

Start an existing container. Confirm with the person first.

stop_containerA

Stop an existing container (it gets 10 seconds to stop cleanly). Confirm with the person first.

restart_containerA

Restart an existing container. Confirm with the person first.

remove_containerA

Remove a container, with force to stop it first if it's running, and with volumes to remove its anonymous volumes. Its data is gone. The server asks the person to confirm it, naming what goes; if they say no, nothing is done.

exec_in_containerA

Run a command in a running container and return its exit code and output (stdout and stderr together), stopped after timeoutSeconds. The command is a list, one argument per item; for a shell line, use ["sh", "-c", "…"]. Can change the container: confirm with the person first unless it only reads.

copy_to_containerA

Copy a local file or folder into a container's path. Overwrites what's there: confirm with the person first.

copy_from_containerA

Copy a container's file or folder to a local path. Overwrites what's there locally: confirm with the person first.

list_imagesA

List the local Docker images: id, repository, tag, size and when each was created.

inspect_imageB

An image's details: tags, size, architecture, the command and entry point it runs, its exposed ports, working directory, volumes and labels.

pull_imageA

Download an image from its registry (Docker Hub unless it names another), e.g. postgres:17. Uses the network and disk: confirm with the person first.

build_imageA

Build an image from a local folder with a Dockerfile, and tag it. Returns the build's output (its end when long). Uses the network and disk: confirm with the person first.

tag_imageA

Give an image another name and tag (the image itself isn't copied). Confirm with the person first.

push_imageA

Upload a local image to its registry: Docker Hub unless its name starts with another (ghcr.io/owner/name:tag); give it that name first with tag_image. It publishes the image, maybe publicly: confirm with the person first, naming the registry and the tag. It uses the login the person made themselves with docker login; without one, it says what they must run in their own terminal. Never ask for their password or token.

remove_imageA

Remove a local image (with force, even if a stopped container uses it). It has to be pulled or built again to be used. The server asks the person to confirm it, naming what goes; if they say no, nothing is done.

list_volumesA

List Docker volumes: name, driver and where it lives.

inspect_volumeB

A volume's details: driver, mount point, labels and when it was created.

create_volumeA

Create a named volume, for data that outlives a container. Confirm with the person first.

remove_volumeA

Remove a volume and every file in it; can't be undone. The server asks the person to confirm it, naming what goes; if they say no, nothing is done.

list_networksA

List Docker networks: id, name, driver and scope.

inspect_networkB

A network's details: driver, subnet, whether it's internal, and the containers attached.

create_networkA

Create a network, internal if it shouldn't reach the outside. Confirm with the person first.

remove_networkA

Remove a network (no container may be attached). The server asks the person to confirm it, naming what goes; if they say no, nothing is done.

compose_psC

The services of a Compose project and their containers' state.

compose_logsB

The last log lines of a Compose project's services (or one), 200 per service by default.

compose_buildA

Build the images of a Compose project's services that have a build (all, or some), without starting anything: to check a Dockerfile change, or to have the images ready. Returns the exit code and the build's output (its end when long); a failed build says why at the end. Uses the network and disk: confirm with the person first.

compose_upA

Start a Compose project's services in the background (building what has a build), or only some. Runs whatever its compose file says, privileged services and host mounts included: read it first and confirm with the person, naming anything dangerous in it.

compose_downA

Stop and remove a Compose project's containers and networks; with volumes, its volumes and their data too. Confirm with the person first; with volumes, the server asks the person to confirm it, naming what goes; if they say no, nothing is done.

compose_execA

Run a command in a running service of a Compose project, returning its exit code and output. The command is a list; for a shell line, ["sh", "-c", "…"]. Can change the service: confirm with the person first unless it only reads.

list_labsA

List the labs: practices in the labs folder (/root/.docker-mcp/labs), each a folder with its compose.yaml and, optionally, a lab.json with the check that says whether it works.

lab_statusC

A lab's services and their containers' state (empty when it isn't running).

lab_logsB

The last log lines of a lab's services (or one), 200 per service by default.

lab_upA

Start a lab under lab mode's policy: no privileged services, no host mounts but the lab's own folder, never the Docker socket, limits of 1 CPU and 512m per service, without internet (so the host can't reach its ports either: check it from inside with lab_exec). A lab that breaks the policy is refused with the reason. Confirm with the person first, saying what it will run (its services and images).

lab_execA

Run a command in one of a running lab's services, returning its exit code and output. The command is a list; for a shell line, ["sh", "-c", "…"]. Can change the lab: confirm with the person first unless it only reads.

lab_checkA

Run the lab's check (its lab.json) in its running service: passed when it exits 0, with its output to explain what failed. For a teacher, whether a statement or a solution works; for a student, whether their practice does. Runs inside the lab: confirm with the person first.

lab_resetA

Back to a clean start: the lab's containers, networks and volumes are removed (what was done inside them is lost; the files in its folder stay) and it starts again. The server asks the person to confirm it, naming what goes; if they say no, nothing is done.

lab_downA

Stop a lab and remove its containers, networks and volumes: what was done inside them is lost, the files in its folder stay, and lab_up brings it back. It doesn't ask the person, so an agent can clean up the labs it started; say what you're stopping.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 47 tools

Disambiguation4/5

Each family targets a distinct resource (images, containers, volumes, networks, compose projects, labs) and descriptions explicitly separate close pairs, e.g. container_stats vs container_processes, or lab_exec vs exec_in_container. The main ambiguity is the deliberate parallel between compose_* and lab_* tools (compose_up/lab_up, compose_logs/lab_logs, compose_exec/lab_exec), which the descriptions clarify but an agent could still misselect when a project is a lab.

Naming Consistency4/5

The dominant pattern is resource-prefixed verb_noun (build_image, list_volumes, remove_network, start_container, lab_up, compose_build), which is predictable and readable. Deviations are minor: compose_ps is noun-first, and bare singletons like prune, disk_usage, server_info and check_requirements sit outside the scheme.

Tool Count2/5

47 tools is heavy for any single MCP server and forces the agent to scan a large surface before acting. Much of the bulk comes from near-triplicated compose/lab families, which could be consolidated or split into separate servers.

Completeness4/5

Coverage is broad and near-lifecycle-complete: images (pull/build/tag/push/list/inspect/remove), containers (run/start/stop/restart/remove/exec/logs/stats/processes/copy), volumes, networks, compose and labs, plus diagnostics and prune. Gaps are modest — no network connect/disconnect, no compose_restart or compose_stop, no restart policy/label update, and no export/save of images.

Maintenance

ActivityMaintained
ResponsivenessUsually handled