Five steps from install to your first container.
MCP Docker is an MCP tool: you check it is installed, point it at a Docker daemon, connect it to your agent and then ask in plain language. Runs on Linux (amd64, arm64). On macOS and Windows, MCP Docker runs in the managed Linux environment that AIDC Launch provides. It does not install or start Docker for you. Output varies by version and machine.
- Capturedmcp-docker 0.7.4$ mcp-docker versionmcp-docker 0.7.4Step 1 of 5
Check that it arrived
The MAIT image ships
mcp-dockerand updates it with the image. Check that it runs.See mait-image.
What you getThe version command answers, and you know which build you are on when you report a problem.
- $ export DOCKER_HOST=unix:///var/run/docker.sock$ mcp-docker cli system infoStep 2 of 5
Point it at a daemon
Set
DOCKER_HOSTin the environment that launches the service. The conventional local socket is shown; replace it with your own endpoint if it differs. Unix sockets andtcp://addresses work. For a remote daemon, use a tunnel that you operate and reach it only from trusted clients.A reply that describes the daemon you meant to use is the check. An error here is a connection problem, not a reason to try anything else.
What you getProof that the service reaches the daemon you intend, before any container exists.
{ "mcpServers": { "docker": { "command": "mcp-docker", "args": ["serve"], "env": { "DOCKER_HOST": "unix:///var/run/docker.sock", "ALLOWED_REGISTRIES": "docker.io,ghcr.io", "MAX_CONTAINERS_PER_SESSION": "100" } } } }Step 3 of 5Connect it to your agent
Any client that accepts an
mcpServerslaunch entry uses this shape. The two safety settings are shown with their defaults.Place it where your client keeps server configuration and restart the client. Leave
MAIT_LOG_FORMATunset: itsjsonvalue corrupts the stream. If you reach your tools through the registry, adddockeronce withmcp_registry_addand the tools carry thedocker__prefix (registry guide).What you getA client that starts the service itself, and an agent that can use its 38 tools. Keep one connection open from creating something to cleaning it up: ownership belongs to the connection.
- Capturedmcp-docker 0.7.4YouWhich version of the docker service are you using, and are any containers running?Tool callsystem { "query": "version" }What happensReturns the service's version, 0.7.4, and the MCP protocol version it speaks.Tool calllist_containers { "fields": ["id", "name", "state"] }What happensReturns an empty list: the service manages no containers.AgentI am using MCP Docker 0.7.4, and there are no containers that I manage.Step 4 of 5
Look at the daemon
Ask your agent what it is talking to. These calls only read.
The
systemcall withquery:versionreports the service, not the daemon. Also requestsystemwithquery:infoand verify the intended daemon identity. A category-wide container list is not proof of exclusive ownership or complete cleanup inventory.What you getEvidence of tool access and the actual returned inventory.
- Illustrative conversationYouRun a small web server, check that it answers, then remove it.Tool callpull_image { "image": "nginx:alpine" }What happensThe image is pulled from docker.io, which is on the approved list.Tool callrun_container { "image": "nginx:alpine", "name": "guide-web", "ports": [{ "host_port": 8081, "container_port": 80, "host_ip": "127.0.0.1" }], "auto_remove": true }What happensThe container starts, is recorded as owned by this connection and its id comes back.Tool callexec_command { "container_id": "guide-web", "command": ["wget", "-qO-", "http://127.0.0.1/"] }What happensReturns stdout with the welcome page, empty stderr and exit code 0.Tool callcleanup_session { "force": true }What happensReview the removed counts and errors, then inspect the remaining container inventory. Images are excluded from this cleanup.AgentThe server answered with its welcome page. I report whether the container was removed and any remaining errors. The nginx:alpine image remains available until its shared dependants are reviewed for separate retirement.Step 5 of 5
Run a container and remove it
Ask for something small and let the agent clean up. It pulls an image from an approved registry, starts a container, reads its output and removes what it created.
Read the
errorslist that comes back from a cleanup even when the call succeeds: it is a best-effort sweep, and it tells you what it could not remove.What you getA container that ran, was checked from the inside and was removed, and a clear record of what the agent created.
A daemon your agent can use and leave clean.
MCP Docker is installed, pointed at a daemon and connected to your agent. A disconnect does not remove anything: containers, networks and volumes stay until something removes them, so decide what to retain, preserve required data and explicitly remove only the disposable inventory before finishing.