mait.sh1.132.1

Private beta: features and content may change. No warranty; use at your own risk.

Install and configure mcp-docker

Check that MCP Docker is there and can reach Docker, connect it to your agent, look at the daemon and run a first container.

Beta
Steps

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.

  1. Capturedmcp-docker 0.7.4
    Check the version
    $ mcp-docker version
    mcp-docker 0.7.4
    Step 1 of 5

    Check that it arrived

    The MAIT image ships mcp-docker and updates it with the image. Check that it runs.

    See mait-image.

    What you get

    The version command answers, and you know which build you are on when you report a problem.

  2. Choose the daemon and read it
    $ export DOCKER_HOST=unix:///var/run/docker.sock
    $ mcp-docker cli system info
    Step 2 of 5

    Point it at a daemon

    Set DOCKER_HOST in the environment that launches the service. The conventional local socket is shown; replace it with your own endpoint if it differs. Unix sockets and tcp:// 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 get

    Proof that the service reaches the daemon you intend, before any container exists.

  3. mcpServers entry
    {
      "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 5

    Connect it to your agent

    Any client that accepts an mcpServers launch 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_FORMAT unset: its json value corrupts the stream. If you reach your tools through the registry, add docker once with mcp_registry_add and the tools carry the docker__ prefix (registry guide).

    What you get

    A 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.

  4. Capturedmcp-docker 0.7.4
    YouWhich 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 system call with query:version reports the service, not the daemon. Also request system with query:info and verify the intended daemon identity. A category-wide container list is not proof of exclusive ownership or complete cleanup inventory.

    What you get

    Evidence of tool access and the actual returned inventory.

  5. Illustrative conversation
    YouRun 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 errors list 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 get

    A container that ran, was checked from the inside and was removed, and a clear record of what the agent created.

Result

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.

Next

Where to go next.