Basic information
About Docker MCP Server
More than just a fully featured MCP server that lets AI agents manage Docker — containers, images, networks, volumes, swarm services, secrets, configs, nodes, plugins, etc., it helps you create workflows to easily manage your Docker environments.
Docker MCP Server is a MCP server in the Cloud & Infrastructure category listed in the AddMCP.net directory, published by GavinLucas. It exposes 162 tools, including buildx_build, buildx_bake, buildx_imagetools_inspect, buildx_imagetools_create and more. Supported transport: stdio. Runtime: Python. License: MIT. The repository has 11 GitHub stars. Source code is hosted on github.com. Related topics: ai-agents, compose, containers, devops, docker.
Setup
{
"mcpServers": {
"docker-mcp-server": {
"command": "uvx",
"args": [
"docker-mcp-server"
],
"env": []
}
}
}
{
"mcpServers": {
"docker-mcp-server": {
"command": "uvx",
"args": [
"docker-mcp-server"
],
"env": []
}
}
}
{
"servers": {
"docker-mcp-server": {
"command": "uvx",
"args": [
"docker-mcp-server"
],
"env": []
}
}
}
Docker MCP Server — by GavinLucas config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"docker-mcp-server": {
"command": "uvx",
"args": [
"docker-mcp-server"
],
"env": []
}
}
}
Docker MCP Server — by GavinLucas tools
- buildx_build — Build an image with BuildKit via `docker buildx build`. Replaces the legacy `build_image` tool when you need any of: multi-platform output (`platforms`), modern cache export (`cache_from`/`cache_to`), SBOM or provenance attestations, build secrets, or multi-stage builds with...
- buildx_bake — Build multiple targets defined in a bake file (HCL, JSON, or compose). args: targets - Bake targets to build (default: the `default` group) files - Bake file paths (`-f`, repeatable) set_overrides - Per-target overrides, e.g. ["app.platform=linux/amd64"] push...
- buildx_imagetools_inspect — Inspect a manifest in a registry without pulling. Replaces `docker manifest inspect`. The standalone `docker manifest` command is in maintenance mode and lacks support for OCI image indexes, attestations, and annotations — `buildx imagetools inspect` is the path forward an...
- buildx_imagetools_create — Create a manifest list / OCI image index from existing per-platform tags. Replaces `docker manifest create` + `docker manifest push` — builds the index and pushes it in one operation. Source tags must already be pushed; this only stitches them together. args: target -...
- buildx_ls — List builder instances. returns: list - One dict per builder (parsed from `--format '{{json .}}'`). If the captured stdout was truncated by MAX_CLI_OUTPUT_BYTES the last (likely partial) record is dropped before parsing.
- buildx_history_ls — List recent build records (BuildKit build history), parsed from `--format '{{json .}}'`. Each record is a past build with its ref, name, status, step counts, and timestamps — useful for finding a build to drill into with `buildx_history_inspect`. Requires buildx >= v0.13 (...
- buildx_history_inspect — Inspect a single build record by ref, parsed from `--format json`. Returns the full record for one build — duration, materials, attestations, error (if any) — for debugging a failed or slow build found via `buildx_history_ls`. Requires buildx >= v0.13. args: ref - B...
- buildx_inspect — 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-reada...
- buildx_du — 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 b...
- buildx_prune — Remove BuildKit cache entries. Destructive: this tool always passes `--force` because no interactive prompt is available under MCP. Pair with `buildx_du` first to inventory what would be removed. args: all - Include internal/frontend images filter - Filter values (e...
- buildx_create — 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 `--driver-opt KEY=VALUE`) use - ...
- buildx_use — Select the active builder for subsequent buildx operations. Without `default` or `global_default` the switch applies only to the current CLI session. `default` persists the choice for the current Docker context; `global_default` persists across all Docker contexts. Use `buil...
- buildx_rm — Remove a builder instance. args: name - Builder name to remove (mutually exclusive with `all_inactive`) all_inactive - Remove every inactive builder keep_state - Keep the BuildKit state volume keep_daemon - Keep the BuildKit daemon process running force -...
- ping — Check that the Docker server is responsive. returns: bool - True if the daemon responded successfully
- version — Return Docker server version information. returns: dict - Version information from the Docker daemon
- info — Return system-wide Docker information. returns: dict - System information from the Docker daemon
- df — Return Docker disk usage information. returns: dict - Data usage information for images, containers and volumes
- list_hosts — 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 `host` argument selects from. The `default` entry is the one used when `host` is omitted. returns: list[dict] ...
- login — Authenticate with a Docker registry. Security: the password is sent as a tool argument, which many MCP clients log verbatim. Prefer running `docker login` once on the host so the `docker` module reuses the credentials cached in `~/.docker/config.json`, and avoid calling this...
- logout — Clear cached registry credentials from this server's in-memory Docker client. docker-py / the Engine have no true logout: `login` validates against the registry (the daemon's `/auth` is stateless) and caches credentials in-process. This drops that in-memory cache; it does NO...
- events — Stream real-time events from the Docker server, bounded by `limit` events or `timeout_seconds`. Returns when `limit` events are collected or `timeout_seconds` elapses, whichever comes first (`limit` caps memory; `timeout_seconds` caps how long the call blocks — without it ...
- close — 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 `reconnect` when you want to immediately re-establish the connection rather than wait for the next tool call to trig...
- reconnect — 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 �...
- compose_up — Bring up a Docker Compose project, detached. Always runs detached (`-d`) so it can't block the server. Use `compose_ps` to confirm services are running, or `wait=True` to block until they're healthy. args: project_dir - Dir with the compose file (default: server cwd; pa...
- compose_down — 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, `-f`) project_name - Compose project name override profil...
- compose_ps — List containers in a compose project, parsed from `--format json`. args: project_dir - Dir with the compose file (default: server cwd) files - Explicit compose file paths (repeatable, `-f`) project_name - Compose project name override services - Restrict outp...
- compose_logs — 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, `-f`) project_name - Compose project name override services - Restrict t...
- compose_config — 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, `-f`) project_name - Compose project name override ...
- compose_build — Build images for a compose project. args: project_dir - Dir with the compose file (default: server cwd) files - Explicit compose file paths (repeatable, `-f`) project_name - Compose project name override services - Specific services to build (default: all) ...
- compose_pull — 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 `compose_up`, or to verify images are accessible without starting containers. For registry-authenticated pulls ensure th...
- compose_restart — 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 `compose_up` inst...
- compose_stop — Stop services in a compose project without removing their containers. Unlike `compose_down`, containers/networks/volumes survive — use `compose_start` to bring them back. args: project_dir - Dir with the compose file (default: server cwd) files - Explicit compose ...
- compose_start — Start existing (stopped) containers of a compose project. Counterpart to `compose_stop`: starts existing containers without recreating them. Use `compose_up` to (re)create containers from the compose file. args: project_dir - Dir with the compose file (default: server c...
- compose_run — Run a one-off command against a compose service. Always passes `-T` (no TTY under MCP). Defaults to detached with `--rm` so the call returns promptly. args: service - Service name from the compose file command - Command + args to run (exec-form; no shell unless you ...
- compose_exec — Run a command inside an already-running compose service container. Always passes `-T` (no TTY). Pass an exec-form argv (e.g. `["python", "-V"]`); a `["sh", "-c", "..."]` form interprets shell metacharacters in untrusted substrings. args: service - Service name from the ...
- compose_images — List the images used by a compose project's services, parsed from `--format json`. args: project_dir - Dir with the compose file (default: server cwd) files - Explicit compose file paths (repeatable, `-f`) project_name - Compose project name override services...
- compose_port — Resolve the host binding for a service's container port. The compose equivalent of `docker port`: which host address/port a service's private port is published on. `published` is None when the port isn't published. args: service - Service name from the compose file ...
- compose_wait — 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 `timeout_seconds`, then the subprocess is killed (TimeoutExpired) — bound it sensibly. Exit codes are on stdout....
- compose_top — Show the running processes of a compose project's containers. Output is the `ps`-style process table per service (not JSON); read it from `stdout`. args: services - Restrict to these services (default: all) project_dir - Dir with the compose file (default: server cw...
- compose_cp — Copy files/folders between a service container and the server host's filesystem. Exactly one of `source`/`dest` is `SERVICE:PATH`; the other is a path on the host running this MCP server, read/written as the server's user (same host exposure as the file-path archive tools �...
- compose_kill — 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 com...
- compose_pause — 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, `-f`) project_name -...
- compose_unpause — 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, `-f`) project_nam...
- compose_ls — List compose projects known to the daemon (across all directories). args: all - Include stopped projects returns: list - One dict per project (parsed from `--format json`)
- create_config — 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 `create_se...
- get_config — Get a swarm config by id. args: config_id - The config id returns: dict - The config's attrs
- list_configs — List swarm configs. args: filters - Filter by attributes (e.g. id, name, label) returns: list - A list of config attrs dicts
- remove_config — Remove a swarm config. args: config_id - The config id returns: bool - True after removal
- run_container — 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 port...
- create_container — 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_container — 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 `list_containers` inste...
- list_containers — 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 attribut...
- prune_containers — Remove all stopped containers to reclaim disk space. Only removes containers that are not running — running containers are never affected. Use `list_containers(all=True)` to preview what would be removed before calling this. Valid filter keys: `until` (RFC3339 timestamp or...
- start_container — 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 `run_container` instead. Calling on an already-running container has no effect (the daemon ret...
- stop_container — 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_container — 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_container — 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_container — Pause all processes in a container. args: id_or_name - The container id or name returns: dict - The container's attrs after pause
- unpause_container — 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_container — 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_logs — 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 t...
- follow_container_logs — Tail a container's log stream, bounded by `limit_lines`, `timeout_seconds`, or container exit. Returns when `limit_lines` lines are collected, `timeout_seconds` elapses, or the container exits, whichever comes first — so the agent can watch live output without blocking for...
- container_stats — 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_top — 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_container — Run a command inside a running container. Security: when any element of `cmd` is agent-controlled, use an exec-form argv list that does not invoke a shell (e.g. `["python", "-V"]`, `["ls", path]`). A string `cmd`, or a shell form like `["sh", "-c", template]`, interprets she...
- commit_container — 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 filesyste...
- container_diff — 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_container — 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_container — 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_container — 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 `updates` keys: `mem_limit` (bytes, e.g. 134217728 for 128 MB), `memswap_limit` (memory+swap in bytes; -1 =...
- wait_container — Block until a container stops, then return its exit info. The default `timeout` is finite (600s) so the call can't block the MCP server indefinitely on a container that never reaches `condition`. When the timeout is exceeded a RuntimeError is raised (poll `get_container` ins...
- wait_for_container_healthy — Poll a container until its healthcheck reports `healthy` (or it stops, or the timeout elapses). Complements `wait_container` (which waits for *exit*): this waits for a running container to become *healthy*. Re-inspects every `poll_interval`s, never blocks past `timeout` (no ...
- export_container — Export a container's filesystem as a tar archive, returned in band. For anything but a small container prefer `export_container_to_file`, which streams to a host path; the in-band bytes here are capped (default 32 MiB) because MCP base64-encodes them. args: id_or_name -...
- export_container_to_file — 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; `~` is expanded and an existing file is refused unless `overwrite=...
- get_container_archive — Retrieve a file or directory from a container as a tar archive, returned in band. For large paths prefer `get_container_archive_to_file`, which streams to a host path; the in-band bytes here are capped (default 32 MiB) because MCP base64-encodes them. args: id_or_name -...
- get_container_archive_to_file — 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; `~` is expanded and an existing file is refused unless `overwrite=True`. args: ...
- put_container_archive — Upload a tar archive to a path inside a container. For a tarball already on the server host, prefer `put_container_archive_from_file` — it streams from disk instead of carrying the (base64-encoded) bytes through the MCP protocol. args: id_or_name - The container id or...
- put_container_archive_from_file — 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 `put_container_archive`. `file_path` is read by the server's user; `~` is exp...
- context_ls — 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...
- context_inspect — Return the full configuration for a single Docker context. args: name - Context name (use the `Name` field from `context_ls`) returns: dict - The parsed `docker context inspect` entry for that context
- context_create — 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_use — 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 DOCKE...
- context_rm — 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_image — 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 `buildx_build`. `path` must be a directory accessi...
- get_image — Get an image by name or id. args: name - The image name or id returns: dict - The image's attrs
- get_registry_data — Get registry data for an image without pulling it. Security: `auth_config` carries registry credentials, which many MCP clients log verbatim. Prefer `docker login` on the host so the `docker` module reuses credentials cached in `~/.docker/config.json`, and leave `auth_config...
- list_images — 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_image — 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 o...
- push_image — Push an image or repository to a registry. Security: `auth_config` carries registry credentials, which many MCP clients log verbatim. Prefer `docker login` on the host so the `docker` module reuses credentials cached in `~/.docker/config.json`, and leave `auth_config` unset....
- remove_image — Remove a local image by name or id. Fails without `force` if the image is tagged by multiple names (untag first with `tag_image`) or if stopped containers reference it. Running containers always block removal regardless of `force`. `noprune` keeps untagged parent layers that...
- search_images — 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 `registry_list_tags` instead. Each result dict includes `name`, `description`, `star_count`, `...
- prune_images — 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 `filters={"dangling": False}`. Valid filte...
- load_image — Load an image from a tarball produced by save_image. For a tarball already on the host running this server, prefer `load_image_from_file` — it streams from disk instead of carrying the (base64-encoded) bytes through the MCP protocol. args: data - Tarball contents returns:...
- load_image_from_file — 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 `load_image`. The path is read by the server's user; `~` is expanded. args: fi...
- save_image — Save an image as a tar archive, returned in band. For anything but a small image prefer `save_image_to_file`, which streams to a host path; the in-band bytes here are capped (default 32 MiB) because MCP base64-encodes them into the agent's context. args: name - Image na...
- save_image_to_file — 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; `~` is expanded and an existing file is refused unless `ove...
- tag_image — 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_history — Return the layer history of an image. Useful for auditing what commands built each layer and diagnosing image size. Each entry includes `Id` (layer digest or "<missing>" for imported layers), `Created` (unix timestamp), `CreatedBy` (the Dockerfile command that produced the l...
- create_network — 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 e...
- get_network — Get a network by id or name. args: network_id - The network id or name returns: dict - The network's attrs
- list_networks — List networks. args: names - Filter by network names ids - Filter by network ids filters - Additional filters greedy - Fetch extended details per network managed_only - Only return networks created by this MCP server (filters on the ...
- prune_networks — Remove networks that have no active container endpoints. Built-in networks (bridge, host, none) are never removed. Only networks with zero connected containers are eligible. Valid filter keys: `until` (RFC3339 timestamp or duration — removes networks created before that po...
- remove_network — Remove a network. args: network_id - The network id or name returns: bool - True after removal
- connect_network — Attach a running container to an additional network without restarting it. Use this to give a container access to services on a network it was not started with. `aliases` sets extra DNS names for this container within the network (other containers can reach it by those names...
- disconnect_network — Disconnect a container from a network. args: network_id - The network id or name container - The container id or name force - Force disconnect returns: bool - True after the container is disconnected
- get_node — Get a swarm node by id or name. args: id_or_name - The node id or name returns: dict - The node's attrs
- list_nodes — List swarm nodes. args: filters - Filter by attributes (id, name, membership, role) returns: list - A list of node attrs dicts
- update_node — Update a node's spec (availability, name, role, labels). args: id_or_name - The node id or name node_spec - The new node spec returns: bool - True after the update
- remove_node — Remove a node from the swarm. A node should normally be drained (`update_node` with Availability "drain") and have left the swarm first, so its tasks reschedule cleanly. Removing an active/reachable node requires `force=True`. args: node_id - The node id or name to remo...
- get_plugin — Get an installed plugin by name. args: name - The plugin name returns: dict - The plugin's attrs
- install_plugin — Install a plugin from Docker Hub. `remote_name` is a Docker Hub reference in `author/name:tag` form, e.g. `vieux/sshfs:latest`. The daemon handles permission grants non-interactively. After installation use `get_plugin` to confirm the plugin's enabled state, then call `enabl...
- list_plugins — List installed plugins. returns: list - A list of plugin attrs dicts
- configure_plugin — Set runtime configuration options on an installed plugin. Use `get_plugin` first to see which keys the plugin exposes under `Settings.Env`; pass those same keys as a plain dict, e.g. `{"DEBUG": "1", "SOCKET": "/run/x.sock"}`. The plugin must be disabled before reconfiguring ...
- disable_plugin — Disable a plugin so it stops intercepting Docker API calls; the plugin remains installed. A disabled plugin cannot be used by new containers but existing containers that already have it attached are unaffected. Use `force=True` to disable even if active containers are still ...
- enable_plugin — Activate an installed plugin so Docker routes relevant API calls through it. Activates a plugin that is currently disabled — either freshly installed or previously disabled via `disable_plugin`. If the plugin exposes configuration (check via `get_plugin`), call `configure_...
- push_plugin — Push a locally built or pulled plugin image to a remote registry. The daemon must already be authenticated with the target registry — call `login` first if needed. `name` must include the registry host for any registry other than Docker Hub, e.g. "registry.example.com/mypl...
- remove_plugin — Remove a plugin. args: name - The plugin name force - Force removal even if the plugin is enabled returns: bool - True after removal
- upgrade_plugin — Upgrade a plugin. args: name - The plugin name remote - Remote reference to upgrade from (defaults to current name) returns: bool - True after the upgrade completes
- registry_list_tags — List tags for an image in an OCI v2 registry without pulling. Works against Docker Hub, GHCR, ECR, GAR, and any OCI-compliant registry; anonymous if no credentials are passed. Talks directly to the registry over HTTPS and does NOT read `~/.docker/config.json` — for private...
- registry_inspect_manifest — Fetch the manifest for an image reference without pulling. May return a single-platform image manifest or a multi-platform manifest list / OCI image index, depending on what the registry serves for that tag. args: image - Image ref, e.g. "ghcr.io/org/repo"; `:tag`/`@dig...
- registry_get_config — Fetch and parse an image's config blob from a registry without pulling. Answers "what's inside this image?" — env vars, entrypoint/cmd, workdir, exposed ports, user, labels, layer history (what `registry_inspect_manifest` only points at via `config.digest`). Resolves in up...
- hub_list_tags — List tags on a Docker Hub repository with Hub-specific metadata. Hits the Hub UI API (hub.docker.com) for richer per-tag data than `registry_list_tags` — last pushed date, per-platform sizes, digest. Public repos only: sends no auth and does NOT read `~/.docker/config.json...
- hub_repo_info — Fetch Docker Hub metadata for a repository. Public repos only: sends no auth and does NOT read the local Docker credential store; private repos return 404/401. args: repository - Hub repository, e.g. "library/alpine" or "myorg/myimage" returns: dict - The Hub /v2/repositori...
- hub_rate_limit — Report the caller's remaining Docker Hub pull-rate-limit budget. Sends a HEAD to the `ratelimitpreview/test` manifest (a HEAD isn't metered as a pull, so the check costs no budget) and reads the RateLimit-Limit / RateLimit-Remaining headers. Call it before a large `compose_p...
- scout_cves — List vulnerabilities (CVEs) in an image via Docker Scout. Anonymous scans work for public images; Hub policy enforcement and richer recommendations need `docker login` on the host running this MCP server. args: image - Image reference (a tag or a digest) only_fixed ...
- scout_quickview — Render a compact summary of an image's CVE posture. args: image - Image reference format - Output format: "json" (default) or "text" platform - Platform of the image to analyze, e.g. "linux/amd64" returns: dict - {"format": <format>, "result": <parsed-json-or-raw...
- scout_recommendations — Suggest base-image upgrades for an image. Computed against Docker Scout's catalog; generally needs `docker login` on the host running this MCP server to return useful results for private or rarely-scanned base images. args: image - Image reference only_refresh - Onl...
- scout_compare — Compare two image references and report the CVE delta. Exactly one of `to`, `to_env`, or `to_latest=True` must be supplied to identify the comparison target. args: image - The new / candidate image reference to - Compare against this image reference, directory, or a...
- scout_sbom — Generate a Software Bill of Materials (SBOM) for an image. SBOMs can be large; captured stdout is subject to MAX_CLI_OUTPUT_BYTES and may be truncated for big images. If that's a concern, run `docker scout sbom -o file.json …` on the host and load the file separately. arg...
- create_secret — Create a swarm secret. args: name - The name of the secret data - The secret payload labels - Labels to apply driver - Optional secret driver configuration returns: dict - The created secret's attrs
- get_secret — Get a swarm secret by id. args: secret_id - The secret id returns: dict - The secret's attrs
- list_secrets — List swarm secrets. args: filters - Filter by attributes (e.g. id, name, label) returns: list - A list of secret attrs dicts
- remove_secret — Remove a Swarm secret; requires a swarm manager. Removing a secret does not immediately affect running service tasks — tasks that already have the secret mounted retain access until they are restarted or the service is updated. Use `list_services` and inspect each service'...
- create_service — Create a Swarm service; requires a swarm manager node. Use this instead of `run_container` when you need replicated or global scheduling, rolling updates, or automatic restart across the swarm. Common `extra_kwargs` keys: `name` (str), `env` (list of "KEY=VAL"), `mode` ({"Re...
- get_service — Get a swarm service by id or name. args: service_id - The service id or name insert_defaults - Merge default values into the output returns: dict - The service's attrs
- list_services — List swarm services. args: filters - Filter by attributes (id, name, label, mode) managed_only - Only return services created by this MCP server (filters on the docker-mcp-server.managed label); combines with any `filters` given returns: list...
- update_service — Update a swarm service's configuration. args: service_id - The service id or name updates - Fields to update on the service returns: bool - True after the update
- remove_service — Stop and remove a swarm service. args: service_id - The service id or name returns: bool - True after the service is removed
- service_tasks — List the tasks of a swarm service. args: service_id - The service id or name filters - Filter by id, name, node, label, desired-state returns: list - A list of task dicts
- service_logs — Get a bounded snapshot of a swarm service's logs (never follows). `follow` is intentionally not exposed: the stream is joined into one string before returning, so following would block forever and grow unbounded. Collection is capped at `max_bytes` (ValueError if exceeded) s...
- scale_service — Scale a swarm service to a number of replicas. args: service_id - The service id or name replicas - The desired number of replicas returns: bool - True after scaling
- force_update_service — Force update a swarm service even if its config has not changed. args: service_id - The service id or name returns: bool - True after the force update
- rollback_service — Roll a swarm service back to its previous spec (the docker `service rollback` equivalent). Re-applies the service's `PreviousSpec` — the spec from before the most recent `update_service` / `scale_service` / `force_update_service`. Raises ValueError if the service has no Pr...
- stack_deploy — Deploy (or update) a stack to the swarm from one or more Compose files. Requires the target daemon to be a swarm manager. Re-running with the same `stack_name` updates the stack in place. Defaults to `detach=True` (returns once specs are submitted, not on convergence); set `...
- stack_ls — List the stacks deployed to the swarm, parsed from `--format '{{json .}}'`. Requires the target daemon to be a swarm manager (raises otherwise). returns: list - One dict per stack (name, services count, orchestrator)
- stack_ps — List the tasks of a stack, parsed from `--format '{{json .}}'`. args: stack_name - The stack to list tasks for no_trunc - Do not truncate task IDs / errors in the output filters - Repeatable `--filter` expressions, e.g. ["desired-state=running"] returns: list - O...
- stack_services — List the services of a stack, parsed from `--format '{{json .}}'`. args: stack_name - The stack to list services for filters - Repeatable `--filter` expressions, e.g. ["name=web"] returns: list - One dict per service (id, name, mode, replicas, image, ports)
- stack_rm — Remove one or more stacks from the swarm (tears down their services, networks, and secrets). Destructive: this stops and deletes every service in the named stack(s). Defaults to `detach=True` so the call returns once removal is requested rather than waiting for teardown. ar...
- init_swarm — Initialize a new swarm on this Engine. args: advertise_addr - Externally reachable address advertised to other nodes listen_addr - Listen address used for inter-manager communication force_new_cluster - Force a new cluster from current state default_addr_pool...
- join_swarm — Join an existing swarm. args: remote_addrs - Addresses of swarm managers to connect to join_token - The swarm join token listen_addr - Listen address for inter-manager communication advertise_addr - Advertised address data_path_addr - Data path address re...
- leave_swarm — Leave the current swarm. args: force - Force leave even if the node is a manager returns: bool - True after leaving the swarm
- update_swarm — Update swarm-wide settings; currently exposes token and unlock-key rotation. Must be called on a swarm manager node. Token rotation invalidates the old join token immediately — nodes that have not yet joined using the old token must use the new one. Existing joined nodes a...
- reload_swarm — Reload the swarm and return its current attrs. returns: dict - The swarm's current attrs
- unlock_swarm — Unlock a manager node that is locked after restart due to autolock being enabled. When autolock is enabled (via `init_swarm` or `update_swarm`), manager nodes require the unlock key after every restart before they can rejoin the swarm and resume scheduling. Must be called on...
- get_swarm_unlock_key — Return the swarm unlock key. returns: dict - The unlock key info
- get_swarm_join_tokens — Return the swarm's worker and manager join tokens. These are the tokens a new node passes to `join_swarm` — without one, `join_swarm` cannot be called, so this closes the init -> join loop. The tokens are secret bearer credentials (anyone holding the manager token can join...
- rotate_swarm_join_token — Rotate the worker and/or manager join token, then return the fresh tokens. Rotating invalidates the old token immediately — nodes that have already joined are unaffected, but any pending invitations using the old token will fail. At least one of `rotate_worker` / `rotate_m...
- create_volume — Create a volume managed by Docker. Named volumes persist after their containers stop or are removed; use them for databases, uploads, or any data that must outlive a container. Anonymous volumes (no `name`) are only removed automatically when the container was started with `...
- get_volume — Get a volume by name. args: volume_id - The volume name returns: dict - The volume's attrs
- list_volumes — List volumes. args: filters - Filter by attributes (e.g. dangling, name, label) managed_only - Only return volumes created by this MCP server (filters on the docker-mcp-server.managed label); combines with any `filters` given returns: list - ...
- prune_volumes — Remove unused volumes. args: filters - Filters to apply returns: dict - Information on deleted volumes and reclaimed space
- remove_volume — Remove a volume. args: volume_id - The volume name force - Force removal returns: bool - True after removal
Overview
What is Docker MCP Server?
Docker MCP Server is a fully featured Model Context Protocol server that lets AI agents manage Docker environments—containers, images, networks, volumes, swarm services, secrets, configs, nodes, plugins, and more. It works out of the box with no configuration, auto‑discovers your local Docker socket, and supports advanced setups with multiple local or remote daemons (over TCP, TLS, or SSH) and read‑only modes.
How to use Docker MCP Server?
Install and run the server; it automatically discovers your local Docker socket and exposes the full command surface to your AI agent. For advanced use, configure multiple daemons and mark some as read‑only. The server can be run natively, as an mcpb bundle (desktop extension), or containerized.
Key features of Docker MCP Server
- Manages containers, images, networks, volumes, swarm services.
- Supports multiple Docker daemons (local and remote) in one session.
- Read‑only and no‑destructive tool modes for safe monitoring.
- Exposes container logs and stats as MCP resources.
- Optimized for lazy tool loading; can exclude tool domains.
- Runs entirely locally with no telemetry.
Use cases of Docker MCP Server
- Monitor and triage container crashes using live logs.
- Check the health and state of a Docker Swarm.
- Diagnose memory pressure in Docker environments.
- Analyze disk usage of Docker volumes
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In