docker-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DOCKER_HOST | No | Docker daemon endpoint (e.g., tcp://..., unix://..., ssh://...). Used when DOCKER_MCP_SERVER_HOSTS is not set. | |
| SSH_AUTH_SOCK | No | Path to SSH agent socket for SSH-based remote daemon connections. | |
| DOCKER_CONTEXT | No | Name of Docker context to use for resolving the default daemon. | |
| DOCKER_CERT_PATH | No | Path to directory containing TLS certificates (ca.pem, cert.pem, key.pem). | |
| DOCKER_TLS_VERIFY | No | Set to '1' to enable TLS verification for the Docker daemon connection. | |
| DOCKER_MCP_SERVER_HOSTS | No | Comma-separated list of name=endpoint pairs for multiple daemons. e.g., 'local=auto, prod=ssh://user@host(ro)' | |
| DOCKER_MCP_SERVER_DISABLE | No | Comma-separated list of domains to disable (e.g., 'swarm,buildx,scout'). | |
| DOCKER_MCP_SERVER_READONLY | No | Set to '1', 'true', 'yes', or 'on' to register only read-only tools. | |
| DOCKER_MCP_SERVER_NO_LABELS | No | Set to '1' to disable provenance labels on created Docker objects. | |
| DOCKER_MCP_SERVER_NO_DESTRUCTIVE | No | Set to '1', 'true', 'yes', or 'on' to register everything except destructive tools. | |
| DOCKER_MCP_SERVER_REGISTRY_PASSWORD | No | Password or token for private registry authentication. | |
| DOCKER_MCP_SERVER_REGISTRY_USERNAME | No | Username for private registry authentication (fallback when not provided in tool call). | |
| DOCKER_MCP_SERVER_ALLOW_SELF_TERMINATE | No | Set to '1' to allow destructive actions on the server's own container (bypasses self-termination guard). |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| buildx_buildA | Build an image with BuildKit via Replaces the legacy args:
context - Build context: a filesystem path or Git/HTTP URL (verbatim; no |
| buildx_bakeA | Build multiple targets defined in a bake file (HCL, JSON, or compose). args:
targets - Bake targets to build (default: the |
| buildx_imagetools_inspectA | Inspect a manifest in a registry without pulling. Replaces args:
image - Image reference, e.g. "alpine:3.19" or "ghcr.io/org/repo@sha256:..."
raw - Return the raw manifest bytes (a JSON document) instead of the
human-rendered tree
format - Go template format string (mutually exclusive with |
| buildx_imagetools_createA | Create a manifest list / OCI image index from existing per-platform tags. Replaces args:
target - Tag for the new manifest list ( |
| buildx_lsA | List builder instances. returns: list - One dict per builder (parsed from |
| buildx_history_lsA | List recent build records (BuildKit build history), parsed from Each record is a past build with its ref, name, status, step counts, and timestamps — useful for
finding a build to drill into with args: builder - Builder instance to read history from (defaults to the active builder) returns: list - One dict per build record (ref, name, status, total/completed/cached steps, times) |
| buildx_history_inspectA | Inspect a single build record by ref, parsed from Returns the full record for one build — duration, materials, attestations, error (if any) — for
debugging a failed or slow build found via args:
ref - Build record ref. Pass the |
| buildx_inspectA | Inspect a builder instance. args: name - Builder name (defaults to the active builder) bootstrap - Boot the builder if it isn't already running returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}. stdout is human-readable; parse with the agent or call buildx_ls for JSON. |
| buildx_duA | Report BuildKit cache disk usage as a list of records. A large cache can easily generate more output than MAX_CLI_OUTPUT_BYTES; if that
happens the captured stdout is truncated and this tool drops the final (partial)
record before parsing. For an exhaustive accounting on a busy builder, run
args: builder - Override the active builder
returns: list - One dict per cache record (parsed from |
| buildx_pruneA | Remove BuildKit cache entries. Destructive: this tool always passes args:
all - Include internal/frontend images
filter - Filter values (e.g. {"until": "24h", "type": "exec.cachemount"})
keep_storage - DEPRECATED; older buildx flag. Use |
| buildx_createA | Create a new builder instance. args:
name - Name for the new builder (defaults to a generated name)
driver - BuildKit driver (e.g. "docker-container", "kubernetes", "remote")
driver_opts - Driver-specific options (each becomes |
| buildx_useA | Select the active builder for subsequent buildx operations. Without args:
name - Builder name to activate (from |
| buildx_rmA | Remove a builder instance. args:
name - Builder name to remove (mutually exclusive with |
| pingA | Check that the Docker server is responsive. returns: bool - True if the daemon responded successfully |
| versionA | Return Docker server version information. returns: dict - Version information from the Docker daemon |
| infoA | Return system-wide Docker information. returns: dict - System information from the Docker daemon |
| dfA | Return Docker disk usage information. returns: dict - Data usage information for images, containers and volumes |
| list_hostsA | List the Docker hosts configured via DOCKER_MCP_SERVER_HOSTS. With a single host (or the var unset) this is the one resolved daemon; with several it is the set the
returns: list[dict] - one per host: name; url (resolved daemon URL, null = docker-py platform default); read_only; tls (whether a per-host cert dir is configured); default (the omitted-host fallback) |
| loginA | Authenticate with a Docker registry. Security: the password is sent as a tool argument, which many MCP clients log verbatim. Prefer
running args: username - Registry username password - Registry password or token email - Registry account email registry - URL to the registry (defaults to Docker Hub) reauth - Force re-authentication even if valid credentials exist dockercfg_path - Path to a custom dockercfg file host - host label whose client caches the credentials (default: the default host) returns: dict - The server response from the login request |
| logoutA | Clear cached registry credentials from this server's in-memory Docker client. docker-py / the Engine have no true logout: Reaches into a private docker-py attribute ( args: registry - Registry key to clear, or None to clear every cached credential host - host label whose client cache to clear (default: the default host) returns: dict - {"cleared": []} |
| eventsA | Stream real-time events from the Docker server, bounded by Returns when Caveat for args: since - Show events created since this timestamp until - Show events created until this timestamp filters - Filters to apply to the event stream limit - Max events to return (default 100) timeout_seconds - Max wall-clock seconds before returning what was collected (default 30) returns: list - A list of decoded event dicts (length <= limit) |
| closeA | Close and drop pooled Docker client connection(s); each is rebuilt lazily on next use. Use this to force a stale or errored connection to be discarded. Prefer args: host - host label to close; omit to close every pooled client returns: bool - True once closed |
| reconnectA | Rebuild a pooled Docker client from its configured endpoint, to recover a wedged connection. Validates the rebuilt client before swapping in (and only then closes the old one), so a failed rebuild leaves the working client in place. It CANNOT retarget to a different daemon — to add or change a daemon, edit DOCKER_MCP_SERVER_HOSTS and restart. args: host - host label to rebuild, or None for the default host
returns: dict - the rebuilt host's version info (same shape as |
| compose_upA | Bring up a Docker Compose project, detached. Always runs detached ( args:
project_dir - Dir with the compose file (default: server cwd; paths verbatim, no shell expansion)
files - Explicit compose file paths (repeatable, |
| compose_downA | Stop and remove containers, networks (and optionally volumes) for a compose project. args:
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_psA | List containers in a compose project, parsed from args:
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_logsA | Fetch a bounded slice of logs from a compose project (never follows). args:
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_configA | Render the canonical compose configuration after merges, profiles, and variable substitution. args:
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_buildA | Build images for a compose project. args:
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_pullA | Pre-fetch images for a compose project's services without starting them. Use this to stage images before an outage window, to refresh cached images before
args:
project_dir - Dir containing the compose file (default: server cwd)
files - Explicit compose file paths, passed as |
| compose_restartA | Stop then start services without recreating containers or applying config changes. Use this to bounce a service (e.g. to pick up a runtime file change or clear an
in-memory state). If the compose file has changed (new image, environment, volumes,
ports) use args:
project_dir - Dir containing the compose file (default: server cwd)
files - Explicit compose file paths, passed as |
| compose_stopA | Stop services in a compose project without removing their containers. Unlike args:
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_startA | Start existing (stopped) containers of a compose project. Counterpart to args:
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_runA | Run a one-off command against a compose service. Always passes args:
service - Service name from the compose file
command - Command + args to run (exec-form; no shell unless you invoke one)
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_execA | Run a command inside an already-running compose service container. Always passes args:
service - Service name from the compose file
command - Argv to execute inside the container
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_imagesA | List the images used by a compose project's services, parsed from args:
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_portA | Resolve the host binding for a service's container port. The compose equivalent of args:
service - Service name from the compose file
private_port - The container-internal port to look up
protocol - "tcp" (default) or "udp"
index - Container index when the service has multiple replicas (default 1)
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_waitA | Block until the named service containers stop, then return their exit codes. For one-shot / batch services. A long-running service that never exits blocks until
args:
services - One or more services to wait on. At least one is required.
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_topA | Show the running processes of a compose project's containers. Output is the args:
services - Restrict to these services (default: all)
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_cpA | Copy files/folders between a service container and the server host's filesystem. Exactly one of args:
source - |
| compose_killA | Send a signal to a compose project's containers (default SIGKILL). args:
services - Restrict to these services (default: all)
signal - Signal to send (default "SIGKILL"; e.g. "SIGTERM", "SIGHUP")
remove_orphans - Also remove containers for services not in the compose file
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_pauseA | Pause the containers of a compose project (freezes their processes). args:
services - Restrict to these services (default: all)
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_unpauseA | Unpause the containers of a compose project (resumes paused processes). args:
services - Restrict to these services (default: all)
project_dir - Dir with the compose file (default: server cwd)
files - Explicit compose file paths (repeatable, |
| compose_lsA | List compose projects known to the daemon (across all directories). args: all - Include stopped projects
returns: list - One dict per project (parsed from |
| create_configA | Create an immutable Swarm config object; requires a swarm manager. Configs store non-sensitive configuration files (nginx.conf, app.yaml, etc.) and mount
them into service containers at a specified path. Unlike secrets, config data is not
encrypted at rest — use args: name - Unique config name within the swarm data - Raw bytes content of the config file labels - Labels to apply to the config object templating - Templating driver config (e.g. {"Name": "golang"} for Go template syntax) returns: dict - The created config's attrs including its id |
| get_configA | Get a swarm config by id. args: config_id - The config id returns: dict - The config's attrs |
| list_configsA | List swarm configs. args: filters - Filter by attributes (e.g. id, name, label) returns: list - A list of config attrs dicts |
| remove_configA | Remove a swarm config. args: config_id - The config id returns: bool - True after removal |
| run_containerA | Run a container from an image. args: image - The image to run command - The command to run in the container name - Name to assign to the container detach - Run in the background and return container info environment - Environment variables to set ports - Port mappings, e.g. {'2222/tcp': 3333} volumes - Volumes to mount network - Name of the network to attach hostname - Optional hostname for the container user - Username or UID to run as working_dir - Working directory inside the container entrypoint - Entrypoint to override the image default restart_policy - Restart policy, e.g. {'Name': 'on-failure', 'MaximumRetryCount': 3} labels - Labels to set on the container remove - Remove the container when it exits (only with detach=False) auto_remove - Enable auto-removal of the container on daemon side privileged - Give extended privileges to the container tty - Allocate a pseudo-TTY stdin_open - Keep STDIN open mem_limit - Memory limit cpu_count - Number of CPUs extra_kwargs - Additional keyword arguments forwarded to ContainerCollection.run returns: dict | str - Container attrs when detach=True, otherwise stdout/stderr as a string |
| create_containerA | Create a container without starting it. args: image - The image to use command - The command to run when started extra_kwargs - Additional keyword arguments forwarded to ContainerCollection.create returns: dict - The created container's attrs |
| get_containerA | Return the full inspect detail for a single container. Use this when you need complete information about one container — config, state,
network settings, mounts, environment variables, and resource limits. For a quick
overview of many containers use args: id_or_name - Container id (full or short) or name
returns: dict - Full container inspect attrs (equivalent to |
| list_containersA | List containers. args:
all - Show all containers, including stopped ones
since - Only show containers created after this id or name
before - Only show containers created before this id or name
limit - Maximum number of results
filters - Filter by attributes (e.g. status, label)
sparse - Skip inspect calls and return less detail
ignore_removed - Ignore containers removed during listing
managed_only - Only return containers created by this MCP server (filters on the
docker-mcp-server.managed label); combines with any |
| prune_containersA | Remove all stopped containers to reclaim disk space. Only removes containers that are not running — running containers are never affected.
Use args: filters - Narrow which stopped containers to remove; omit to remove all stopped returns: dict - {"ContainersDeleted": [...], "SpaceReclaimed": } |
| start_containerA | Start an existing stopped container. Use this to restart a container that was previously created or stopped without removing it.
To create and start a new container in one step use args: id_or_name - Container id (full or short) or name returns: dict - The container's full attrs after starting |
| stop_containerA | Stop a container. args: id_or_name - The container id or name timeout - Seconds to wait before forcing termination returns: dict - The container's attrs after stop |
| restart_containerA | Restart a container. args: id_or_name - The container id or name timeout - Seconds to wait before forcing restart returns: dict - The container's attrs after restart |
| kill_containerA | Send a signal to a container. args: id_or_name - The container id or name signal - Signal to send (defaults to SIGKILL) returns: dict - The container's attrs after kill |
| pause_containerA | Pause all processes in a container. args: id_or_name - The container id or name returns: dict - The container's attrs after pause |
| unpause_containerA | Resume all processes in a paused container. args: id_or_name - The container id or name returns: dict - The container's attrs after unpause |
| remove_containerA | Remove a container. args: id_or_name - The container id or name v - Also remove anonymous volumes link - Remove the specified link force - Force remove a running container returns: bool - True after removal completes |
| container_logsA | Get the logs of a container. args: id_or_name - The container id or name stdout - Include stdout stderr - Include stderr timestamps - Include timestamps tail - Number of lines from the end, or the literal "all" since - Only return logs created after this unix timestamp until - Only return logs created before this unix timestamp returns: str - Decoded log output |
| follow_container_logsA | Tail a container's log stream, bounded by Returns when Caveat for args:
id_or_name - The container id or name
limit_lines - Max lines to collect before returning (default 200)
stdout - Include stdout
stderr - Include stderr
timestamps - Include timestamps
since - Only return logs created after this unix timestamp
timeout_seconds - Max wall-clock seconds to follow before returning what was collected (default 30)
returns: str - Decoded log output containing up to |
| container_statsA | Get a single resource usage stats snapshot for a container. args: id_or_name - The container id or name returns: dict - Decoded stats snapshot |
| container_topA | Show the running processes inside a container. args: id_or_name - The container id or name ps_args - Arguments to pass to ps inside the container returns: dict - Output of the top command |
| exec_in_containerA | Run a command inside a running container. Security: when any element of args: id_or_name - The container id or name cmd - Command to execute (prefer exec-form argv, no shell, when any element is agent-controlled) stdout - Attach to stdout stderr - Attach to stderr stdin - Attach to stdin tty - Allocate a pseudo-TTY privileged - Run with extended privileges user - User to run the command as detach - Detach from the exec environment - Environment variables workdir - Working directory inside the container demux - Return stdout and stderr separately returns: dict - Mapping with exit_code and output keys |
| commit_containerA | Snapshot a container's current filesystem state as a new image. Useful for capturing a debugging state or saving manual changes made inside a container.
For repeatable builds use a Dockerfile instead. The container is paused by default during
the snapshot to ensure filesystem consistency — set args: id_or_name - Container id or name to snapshot repository - Repository name for the new image, e.g. "myorg/myimage" tag - Tag for the new image (default: "latest") message - Commit message stored in the image metadata author - Author string stored in the image metadata pause - Pause the container during commit for consistency (default True) changes - Dockerfile instructions (CMD, ENV, EXPOSE, etc.) to apply to the image conf - Additional image configuration overrides as a dict returns: dict - The new image's attrs |
| container_diffA | Inspect changes on a container's filesystem. args: id_or_name - The container id or name returns: list - Filesystem changes since the image was created |
| rename_containerA | Rename a container. args: id_or_name - The container id or name name - The new name returns: dict - The container's attrs after rename |
| resize_containerA | Resize the tty session of a container. args: id_or_name - The container id or name height - New tty height in characters width - New tty width in characters returns: bool - True after the resize completes |
| update_containerA | Update resource limits on a container without recreating it. Changes take effect immediately on Linux (cgroups); not all fields are updatable on
every platform. Common args: id_or_name - Container id or name to update updates - Resource fields to update; see description for valid keys returns: dict - The container's full attrs after the update |
| wait_containerA | Block until a container stops, then return its exit info. The default args: id_or_name - The container id or name timeout - Maximum seconds to wait before raising (default 600; None waits forever) condition - State to wait for: "not-running" (default), "next-exit", or "removed" returns: dict - The wait result with StatusCode and Error keys |
| wait_for_container_healthyA | Poll a container until its healthcheck reports Complements Health comes from the container's HEALTHCHECK. With none defined, once the container is args:
id_or_name - The container id or name
timeout - Max seconds to wait before returning timed_out (default 120)
poll_interval - Seconds between re-inspections (default 2, > 0); also capped by the time left,
so a large value can't push the total wait past |
| export_containerA | Export a container's filesystem as a tar archive, returned in band. For anything but a small container prefer args: id_or_name - The container id or name max_bytes - Abort with ValueError if the export exceeds this many bytes (defaults to 32 MiB) returns: bytes - The tar archive contents |
| export_container_to_fileA | Export a container's filesystem as a tar archive written to a file on the server host. Streams straight to disk (no in-band byte cap), so it handles large containers. The file is
written by the server's user; args: id_or_name - The container id or name dest_path - Destination path on the server host for the tarball overwrite - Replace dest_path if it already exists (default False) returns: dict - {"path": , "bytes_written": int} |
| get_container_archiveA | Retrieve a file or directory from a container as a tar archive, returned in band. For large paths prefer args: id_or_name - The container id or name path - Path inside the container max_bytes - Abort with ValueError if the archive exceeds this many bytes (defaults to 32 MiB) returns: dict - Mapping with archive (bytes) and stat (dict) keys |
| get_container_archive_to_fileA | Retrieve a file or directory from a container as a tar archive written to a file on the server host. Streams straight to disk (no in-band byte cap). The file is written by the server's user; args: id_or_name - The container id or name path - Path inside the container dest_path - Destination path on the server host for the tarball overwrite - Replace dest_path if it already exists (default False) returns: dict - {"path": , "bytes_written": int, "stat": dict} |
| put_container_archiveA | Upload a tar archive to a path inside a container. For a tarball already on the server host, prefer args: id_or_name - The container id or name path - Destination path inside the container data - Tar archive bytes returns: bool - True if the upload succeeded |
| put_container_archive_from_fileA | Upload a tar archive from a file on the server host to a path inside a container. Streams the file straight to the daemon, so it handles large archives that would be impractical
to pass in band via args: id_or_name - The container id or name path - Destination path inside the container (must already exist) file_path - Path on the server host to the tar archive to upload returns: bool - True if the upload succeeded |
| context_lsA | List Docker CLI contexts known to the host running this MCP server. Contexts are a CLI concept (stored in the docker config dir) letting one CLI target multiple daemons. This server uses whatever DOCKER_HOST / current-context resolved to at startup, so changing contexts only affects future subprocess-based tools, not the docker-py SDK client. returns: list - One dict per context with at least name, description, dockerEndpoint, and current |
| context_inspectA | Return the full configuration for a single Docker context. args: name - Context name (use the |
| context_createA | Create a new Docker CLI context pointing at a daemon endpoint. args:
name - Name for the new context (must not already exist)
docker_host - Daemon URL, e.g. "tcp://10.0.0.5:2376" or "unix:///var/run/docker.sock"
description - Optional human description shown in |
| context_useA | Set the active Docker context for the CLI on the host running this MCP server. Note: this does not retarget the long-lived docker-py client — SDK-backed tools keep using the endpoint they connected to at startup. To retarget those, restart the server with a different DOCKER_HOST / DOCKER_CONTEXT. args: name - Existing context name to set as default returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool} |
| context_rmA | Remove a Docker CLI context. args: name - Context name to remove force - Force removal even if the context is the current one returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool} |
| build_imageA | Build an image from a Dockerfile using the daemon's classic builder. Use this for simple single-platform builds from a local context. For multi-platform
builds, BuildKit cache export/import, or advanced build features prefer args:
path - Build context directory path on the server host
tag - Name and optional tag in "name:tag" format to apply to the built image
quiet - Suppress verbose build output (final image id still returned)
nocache - Ignore the layer cache and rebuild all layers
rm - Remove intermediate containers on success (default True)
pull - Always pull a newer version of each FROM base image before building
forcerm - Remove intermediate containers even on build failure
dockerfile - Dockerfile filename relative to path (default: "Dockerfile")
buildargs - Build-time variables passed as |
| get_imageA | Get an image by name or id. args: name - The image name or id returns: dict - The image's attrs |
| get_registry_dataA | Get registry data for an image without pulling it. Security: args: name - Image reference auth_config - Optional registry authentication config returns: dict - Registry data attrs |
| list_imagesA | List images on the server. args: name - Only show images of this repository all - Show intermediate image layers filters - Filter by attributes (label, dangling, before, since, etc.) returns: list - A list of image attrs dicts |
| pull_imageA | Pull an image of the given name. args: repository - The image repository tag - The image tag (ignored when all_tags=True) all_tags - Pull all tags from the repository platform - Platform in os/arch format returns: dict | list - Pulled image attrs (or a list of attrs if all_tags=True) |
| push_imageA | Push an image or repository to a registry. Security: args: repository - The image repository tag - The tag to push auth_config - Optional registry authentication config returns: str - Push output as a string |
| remove_imageA | Remove a local image by name or id. Fails without args: image - Image name (with optional tag/digest) or id to remove force - Remove even if referenced by stopped containers or multiple tags noprune - Do not delete untagged intermediate parent layers returns: bool - True after removal completes |
| search_imagesA | Search Docker Hub for public images matching a term. Searches Docker Hub only — not GHCR, ECR, or other registries. For listing tags on a
specific image from any OCI registry use args: term - Search keyword, e.g. "nginx" or "python" limit - Maximum number of results to return (Docker Hub default is 25) returns: list - List of matching image dicts from Docker Hub |
| prune_imagesA | Remove unused local images to reclaim disk space. Without filters removes only "dangling" images — untagged layers not referenced by any
tag or container. To remove all images not used by any container (including tagged ones)
pass args: filters - Narrow which images to remove; omit to remove dangling images only returns: dict - {"ImagesDeleted": [...], "SpaceReclaimed": } |
| load_imageA | Load an image from a tarball produced by save_image. For a tarball already on the host running this server, prefer args: data - Tarball contents returns: list - A list of loaded image attrs dicts |
| load_image_from_fileA | Load an image from a tar archive on the host running this MCP server. Streams the file straight to the daemon, so it handles arbitrarily large images that would be
impractical to pass in band via args: file_path - Path to a tarball produced by |
| save_imageA | Save an image as a tar archive, returned in band. For anything but a small image prefer args: name - Image name or id named - Whether to keep the image name when saving max_bytes - Abort with ValueError if the tarball exceeds this many bytes (defaults to 32 MiB) returns: bytes - The tarball contents |
| save_image_to_fileA | Save an image as a tar archive written to a file on the host running this MCP server. Streams the archive straight to disk (no in-band byte cap), so it handles large images. The file
is written by the server's user; args: name - Image name or id dest_path - Destination path on the server host for the tarball named - Whether to keep the image name when saving overwrite - Replace dest_path if it already exists (default False) returns: dict - {"path": , "bytes_written": int} |
| tag_imageA | Tag an image into a repository. args: name - The source image name or id repository - Target repository name tag - Optional tag for the new image force - Force the tag returns: bool - True if the image was tagged |
| image_historyA | Return the layer history of an image. Useful for auditing what commands built each layer and diagnosing image size. Each entry
includes args: name - Image name (with optional tag/digest) or id returns: list - Layer history entries, newest first |
| create_networkA | Create a network. args: name - The name of the network driver - Driver name (e.g. bridge, overlay) options - Driver-specific options ipam - IPAM configuration as a dict check_duplicate - Reject creation if a duplicate name exists internal - Restrict external access labels - Labels to set on the network enable_ipv6 - Enable IPv6 networking attachable - Allow standalone containers to attach (swarm) scope - Network scope (local, global, swarm) ingress - Make this an ingress network for swarm routing-mesh returns: dict - The created network's attrs |
| get_networkA | Get a network by id or name. args: network_id - The network id or name returns: dict - The network's attrs |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| lookup_docker_docs | Read the Docker SDK for Python documentation for a section before writing code that uses it. |
| verify_docker_method | Verify that a specific Docker SDK method exists before relying on it. |
| deploy_container | Deploy a containerized application end-to-end: image, network, volume, container. |
| troubleshoot_container | Troubleshoot a misbehaving container by gathering logs, state, and stats. |
| monitor_container_fleet | Sweep every running container for health and resource pressure (read-only monitoring). |
| triage_incident | Triage a host-wide incident from symptoms when you don't yet know which container is at fault. |
| migrate_container | Replace a running container with a new image while preserving its configuration. |
| clean_environment | Reclaim disk space by pruning unused docker resources. |
| prune_managed | Tear down only the resources this MCP server created, leaving everything else untouched. |
| inspect_stack | Inspect every docker resource that shares a label. |
| plan_compose_stack | Plan a multi-container application from an informal description. |
| deploy_compose_project | Bring up a Docker Compose project and verify it's healthy. |
| troubleshoot_compose_project | Diagnose a misbehaving Docker Compose project. |
| audit_docker_contexts | Review this server's configured hosts and Docker contexts, and the daemon it targets. |
| audit_swarm_health | Audit the health of a docker swarm: nodes, services, and task convergence. |
| find_latest_image_tag | Find the latest tag for an image without pulling it. |
| plan_multiarch_build | Plan and run a multi-platform image build with buildx. |
| audit_image_cves | Audit an image's CVE posture with Docker Scout. |
| compare_image_versions | Compare two image versions and report the CVE delta. |
| recommend_base_image | Recommend a safer base image via Docker Scout. |
| inspect_multiarch_manifest | Inspect a multi-arch manifest list / OCI image index without pulling. |
| create_multiarch_manifest | Create a multi-arch manifest list from existing per-platform tags. |
| migrate_from_docker_manifest | Translate `docker manifest …` commands into buildx imagetools equivalents. |
| review_dockerfile | Review a Dockerfile for security, correctness, and cache-efficiency issues. |
| audit_container_security | Audit running containers for risky runtime configuration (privilege, host access). |
| debug_container_networking | Diagnose why one container cannot reach another over the network. |
| investigate_disk_usage | Investigate what is consuming docker disk space before pruning. |
| backup_volume | Back up a named volume's contents to a tar file on the server host. |
| restore_volume | Restore a named volume's contents from a tar file on the server host. |
| deploy_swarm_stack | Deploy a Compose file to a swarm as a stack and verify the rollout. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| list_docs_sections | List the available documentation sections. The response keeps the original `base_url` and `sections` (a list of section names) fields for backward compatibility with clients that parsed the pre-extension shape. Sections served from external URLs (compose, context, registry specs) appear in `sections` alongside the SDK ones; their absolute URLs live in `section_urls`. returns: str - JSON describing each section's source URL and how to read it |
| get_tool_catalog | List every tool this server knows about with its domain, mutation category, and whether the active env switches actually registered it. Read this to see the blast radius of a tool before calling it (READ_ONLY / MUTATING / DESTRUCTIVE) and to confirm which whole domains the operator disabled via DOCKER_MCP_SERVER_DISABLE (or the read-only switches) — a tool absent from the live tool list but present here as `registered: false` was filtered out by configuration, not missing by mistake. returns: str - JSON with `switches`, per-domain counts, and a per-tool list |
| get_hosts_resource | The Docker hosts configured via DOCKER_MCP_SERVER_HOSTS — the same data as the `list_hosts` tool: each host's name, resolved daemon URL, read_only / tls flags, and which one is the default used when a tool's `host` argument is omitted. The resolved default is observable here but is not itself a selectable label. returns: str - JSON list, one object per configured host |
| list_container_resources | Index every container with the resource URIs for reading its logs and live stats. Lists all containers (running and stopped). Each entry carries a `logs` URI (readable in any state — useful for diagnosing why a container exited) and, for running containers only, a `stats` URI (a stopped container has no live cgroup to sample). Exited containers include their `exit_code` as a triage signal. returns: str - JSON object {"containers": [{id, name, image, status, exit_code?, logs, stats?}, ...]} |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/GavinLucas/docker-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server