Skip to main content
Glama
mpgharris
by mpgharris

docker-mcp

MCP (Model Context Protocol) server wrapping the Docker Engine API. Exposes Docker operations as typed MCP tools, reducing token consumption versus generating CLI commands.

Quick Start

npx docker-mcp

Or add to your MCP client config (OpenCode, Claude Desktop, etc.):

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["docker-mcp"]
    }
  }
}

Related MCP server: MCP Docker Server

Configuration

Configure via environment variables, matching Docker CLI conventions:

Variable

Purpose

Example

DOCKER_HOST

Docker daemon address

ssh://user@192.168.1.111

DOCKER_TLS_VERIFY

Enable TLS

1

DOCKER_CERT_PATH

TLS cert directory

~/.docker/certs

Default: Connects to local Docker socket (/var/run/docker.sock).

  1. SSH (preferred): DOCKER_HOST=ssh://user@host — dockerode handles SSH natively. Pre-populate ~/.ssh/known_hosts to avoid host key prompts.

  2. TCP + TLS: DOCKER_HOST=tcp://host:2376 with DOCKER_TLS_VERIFY=1 and DOCKER_CERT_PATH.

  3. Plain TCP: DOCKER_HOST=tcp://host:2375warning: unencrypted TCP grants root access to anyone on the network. Only use on trusted LANs.

Authentication

For private registries, prefer pre-configuring credentials:

docker login myregistry.io

dockerode reads ~/.docker/config.json automatically. Inline auth parameters are also supported on image_action pull/push, but note that credentials transit the MCP protocol (stdin/stdout).

Tools (17 total)

Container tools

Tool

Description

container_query

List or inspect containers. Supports filters (status, label), limit, field selection, verbose mode.

container_action

Start, stop, restart, pause, unpause, or remove containers.

container_create

Create a container from an image with env, ports, volumes.

container_logs

Get container logs with tail limit (default 100, max 10,000) and timestamps. ANSI codes stripped.

container_exec

Run a command inside a running container. Output capped at 10KB/200 lines.

Image tools

Tool

Description

image_query

List or inspect images. Supports dangling filter, field selection.

image_action

Pull, remove, tag, or push images. Supports registry auth.

image_build

Build an image from a Dockerfile.

Volume tools

Tool

Description

volume_query

List or inspect volumes.

volume_action

Create or remove volumes.

Network tools

Tool

Description

network_query

List or inspect networks.

network_action

Create, remove, connect, or disconnect networks.

Compose tools

Tool

Description

compose_action

Up, down, pull, or stop Compose projects. Fire-and-forget for up (check with compose_query ps).

compose_query

List services (ps), validate config, or get logs.

System tools

Tool

Description

system_df

Docker disk usage breakdown.

system_prune

Prune unused resources by scope (all, containers, images, volumes, networks, builder).

Health

Tool

Description

docker_ping

Check Docker daemon connectivity and return version info.

Token Optimization

This server is designed to minimize token consumption:

  • Default summaries: Query tools return curated fields by default. Use verbose: true for full payloads.

  • Field selection: Pass fields: ["Id", "State.Status"] to get only the data you need.

  • Pagination: Use limit on list tools to cap result size.

  • Log capping: Logs default to 100 lines (max 10,000). Exec output capped at 10KB/200 lines.

  • Compact IDs: 12-character IDs by default. Use fullId: true for full 64-char IDs.

  • ANSI stripping: All output has ANSI codes stripped server-side.

  • Tool consolidation: Related operations merged into 17 tools via action enums instead of 35 individual tools.

Security Notes

  • container_exec allows arbitrary command execution in any container — equivalent to docker exec.

  • image_build accepts a context path — ensure it points to a project directory, not / or /etc.

  • Inline auth credentials on image_action transit the MCP protocol (stdio). Prefer docker login.

  • Plain TCP Docker sockets grant root access without authentication. Use SSH or TLS when accessing remote hosts.

Development

# Install
npm install

# Dev server with hot reload
npm run dev

# Build
npm run build

# Test
npm test                 # Unit tests (no Docker needed)
npm run test:integration # Integration tests (requires Docker)
npm run lint             # Lint
npm run typecheck        # TypeScript check

# Format
npm run format

Architecture

src/
  index.ts         — Entrypoint, DI wiring, stdio transport
  config.ts        — Docker client factory (reads DOCKER_HOST env vars)
  error.ts         — Centralized error handler with status-code mapper
  utils/
    compose.ts     — Compose arg builder + JSON output parser (pure)
    summarize.ts   — Token optimization utilities (field projection, ID truncation, ANSI stripping, output capping)
  tools/
    types.ts       — Shared types + tool registration helpers
    health.ts      — docker_ping (validates pipeline)
    containers.ts  — 5 container tools
    images.ts      — 3 image tools
    volumes.ts     — 2 volume tools
    networks.ts    — 2 network tools
    compose.ts     — 2 compose tools
    system.ts      — 2 system tools

License

MIT

Available Tools

17 tools
compose_actionA

Run a docker compose lifecycle action (up, down, pull, stop) against a compose project file. Uses the local Docker socket.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesLifecycle action to run.
servicesNoOptional subset of services to target. Omit for all.
downVolumesNoFor "down": also remove named volumes.
projectFileYesPath to the docker-compose.yml file.
projectNameNoOptional project name (-p flag).

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It mentions 'Uses the local Docker socket,' a useful behavioral detail, and implicitly conveys mutation through action names (up, down, pull, stop). However, it does not explicitly disclose side effects like container creation or volume removal, nor idempotency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences front-loaded with the core action and key details. Every word adds value without redundancy. Efficient and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a tool with fully described parameters and no output schema. It covers the action, target, and environment (local Docker socket). However, it could mention return behavior or blocking nature, especially given no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds no additional parameter meaning beyond what the input schema already provides. It does not explain parameter formats, defaults, or relationships.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool runs docker compose lifecycle actions (up, down, pull, stop) against a compose project file, distinguishing it from sibling tools like compose_query (for queries) and other container/image actions. The verb 'run' and resource are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The description only states what it does, without indicating when to choose it over compose_query, container_action, or other siblings. There are no when-not or alternative recommendations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

compose_queryA

Query docker compose state: "ps" (container status), "config" (resolved compose config), or "logs" (service log tail).

ParametersJSON Schema
NameRequiredDescriptionDefault
tailNoFor "logs": lines to tail (max 10000). Defaults to 100.
actionYesQuery action.
servicesNoOptional services (primarily for "logs").
projectFileYesPath to the docker-compose.yml file.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description shoulders behavioral disclosure. It names three actions and details the 'tail' parameter for logs, but does not declare read-only status, output format, or potential side effects. Adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with front-loaded verb and resource. Every word adds value—no fluff. Efficiently conveys the tool's purpose and key parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and 4 parameters, the description covers main actions and common parameters but lacks return value details and behavioral notes (e.g., read-only nature). Adequate for experienced users but missing context for newcomers.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds meaning: it clarifies action enum values ('container status', 'resolved compose config', 'service log tail') and specifies 'tail' defaults and limit. This goes beyond the schema's brief descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool queries docker compose state, listing three specific actions (ps, config, logs). It distinguishes from sibling tools like compose_action (which likely modifies) and container_logs (which targets individual containers).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description implies usage for querying compose state via the three actions, but does not explicitly state when to use this tool vs alternatives (e.g., container_logs for single container logs). It provides no when-not or context for exclusion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_actionB

Start, stop, restart, pause, unpause, or remove a container.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNoForce removal (only for remove)
actionYesAction to perform
timeoutNoGrace period in seconds (only for stop)
containerYesContainer name or ID

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description lists actions but fails to disclose behavioral traits such as destructiveness of 'remove', need for permissions, or side effects like data loss. Transparency is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with 10 words, completely front-loaded. Every word is necessary and earns its place. Highly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters and 6 actions, including destructive ones, the description lacks completeness. Does not warn about irreversible removal or note that timeout applies only to stop. No output schema to supplement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% description coverage, so the description adds no new meaning beyond what the schema already provides (e.g., action enum, timeout, force). Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool performs container lifecycle actions (start, stop, restart, etc.), with a specific verb and resource, differentiating it from sibling tools like container_create or container_logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by listing actions, but no explicit guidance on when to use this tool versus alternatives (e.g., use container_create for new containers) or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_createB

Create a new container from an image.

ParametersJSON Schema
NameRequiredDescriptionDefault
envNoEnvironment variables (e.g., ["KEY=val"])
nameNoContainer name
imageYesImage name (e.g., nginx:latest)
portsNoPort mappings (e.g., ["8080:80"])
volumesNoVolume mounts (e.g., ["vol:/data"])

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It only states 'Create a new container' without disclosing whether the container also starts, requires specific permissions, or any side effects. Minimal behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded with the action and resource. It is concise but could be slightly more structured to include key details without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 5 parameters and no output schema. The description does not explain return values (e.g., container ID), side effects, or prerequisites, making it incomplete for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description does not add meaning beyond the schema (e.g., 'from an image' matches the required 'image' param).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and the resource ('a new container'), with the dependency ('from an image'). This distinguishes it from sibling tools like container_action (modifies existing containers) and compose_action (multi-container orchestration).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like compose_action for groups or container_action for modifications. The description lacks context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_execA

Run a command in a running container. Output capped at 200 lines / 10KB.

ParametersJSON Schema
NameRequiredDescriptionDefault
ttyNoAllocate a TTY
commandYesCommand and arguments
containerYesContainer name or ID

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description mentions output capping (200 lines/10KB), which is useful. However, it lacks disclosure that the command may modify the container state, that the container must be running, or details about exit code handling. Since no annotations exist, the description carries full burden and misses several behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two concise sentences. The first sentence immediately states the purpose, and the second provides a key behavioral constraint. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with three parameters and no output schema, the description is mostly adequate. It covers output capping but omits the prerequisite that the container must be running. Given the low complexity, this is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters are described in the input schema (100% coverage). The description does not add extra meaning beyond what the schema already provides, such as clarifying the TTY parameter or command format. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Run' and clearly identifies the resource as 'a command in a running container'. It distinguishes this tool from sibling tools like container_logs or container_action by focusing on command execution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for executing commands in a running container but provides no explicit guidance on when to use this tool over alternatives like container_action or compose_action. No exclusions or prerequisites are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_logsB

Get container logs. ANSI codes stripped, capped at max tail.

ParametersJSON Schema
NameRequiredDescriptionDefault
tailNoNumber of recent log lines (default 100, max 10000)
containerYesContainer name or ID
timestampsNoInclude timestamps

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes two key behaviors: ANSI code stripping and log line cap. But with no annotations, it should also disclose error conditions, blocking behavior, or response size limits. Acceptable but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no wasted words. Front-loaded with core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema provided, and description does not explain return format (plain text? JSON?), pagination, or streaming behavior. Incomplete for a log retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers all parameters with descriptions. The description adds 'capped at max tail' which relates to the tail parameter but adds no other meaning beyond schema. Baseline 3 due to full schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves container logs with specific verb and resource. However, it does not explicitly differentiate from sibling tools like container_query or container_action, which could also involve log retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. No mention of prerequisite (container must exist) or caveats (e.g., only recent logs, no streaming).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_queryC

List or inspect Docker containers.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax results
actionYeslist or inspect
fieldsNoFields to return (dot notation)
fullIdNoReturn full 64-char IDs
filtersNoFilter by status, label, etc.
verboseNoReturn full payload
containerNoContainer name or ID (required for inspect)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It does not disclose that the operations are read-only, nor does it mention any behavioral traits like authentication requirements, error handling, or response size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

At only four words, the description is under-specified. While concise, it sacrifices necessary detail, failing to earn its place by providing useful context beyond the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 parameters, no output schema, and no annotations, the description is insufficient. It does not explain return values, how 'list' differs from 'inspect', or how parameters interact, leaving the agent underinformed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal value beyond the schema, merely summarizing the two actions without explaining parameters like 'filters' or 'container' in more context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List or inspect Docker containers' clearly specifies the tool's purpose using a verb and resource, and distinguishes it from sibling tools like container_action, container_create, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives (e.g., container_logs for logs). There is no differentiation between the 'list' and 'inspect' actions, or exclusions for other container operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

docker_pingA

Check connectivity to the Docker daemon and return version/diagnostics.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully convey behavior. It states the tool returns version/diagnostics, which suggests a read-only operation, but doesn't explicitly confirm safety or idempotency. For a simple ping tool, the description is adequate but could be more explicit about being non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, well-structured sentence front-loads the tool's purpose. Every word contributes meaning, with no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no output schema), the description is sufficient to understand its role. It could mention that the operation is safe and has no side effects, but for a basic ping, the current description is largely complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, so the description doesn't need to explain parameter meanings. Baseline for zero-parameter tools is 4. The description adds value by indicating the output (version/diagnostics), which helps the agent understand what the tool returns.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: checking connectivity to the Docker daemon and returning version/diagnostics. It uses a specific verb ('Check connectivity') and identifies the resource ('Docker daemon'). This distinguishes it from sibling tools that target containers, images, or system maintenance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for basic connectivity checks but offers no explicit guidance on when to use this tool versus alternatives like system_df or container_query. No exclusion criteria or recommended contexts are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

image_actionB

Perform actions on Docker images: pull, remove, tag, or push.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagNoTarget tag (tag only). Default: "latest".
authNoRegistry authentication credentials (for pull/push).
repoNoTarget repository name (tag only).
forceNoForce removal even if image is in use (remove only). Default: false.
imageYesImage name or ID (e.g., "nginx:latest" or "abc123").
actionYesAction to perform on the image.

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully cover behavioral traits. It fails to disclose side effects (e.g., pull modifies local storage, remove deletes images, push sends to registry), error conditions, or authentication requirements. For a tool performing mutations, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is concise and to the point. However, it lacks any structure or front-loading of critical info like safety or prerequisites. Still, it is not verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, nested object for auth, no output schema, potentially destructive actions), the description is too minimal. It does not explain what the tool returns, how to handle errors, or that operations are singular (e.g., one image at a time).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters adequately. The tool description adds minimal value beyond restating the actions, not enhancing understanding of parameters beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs actions on Docker images and lists the four specific actions (pull, remove, tag, push). It distinguishes from siblings like image_build and image_query which handle different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the description and the enum of actions, but there is no explicit guidance on when to use this tool versus siblings like image_build or image_query, nor any exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

image_buildB

Build a Docker image from a context (tar file path) and optional Dockerfile.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagNoTag for the built image (e.g., "myapp:latest").
contextYesPath to the build context (tar file).
buildargsNoBuild-time variables as key-value pairs.
dockerfileNoPath to the Dockerfile within the context. Default: "Dockerfile".

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description should fully disclose behavioral traits. It does not mention side effects (e.g., image creation on host), potential failures, output format, or permissions needed for the build operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no unnecessary words. It is front-loaded with the key action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a relatively complex build tool with a nested object parameter and no output schema, the description is very short. It lacks information about return values, error behavior, or how to verify the image was built successfully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so each parameter has a description in the schema. The tool description adds minimal context beyond paraphrasing the schema, such as stating the context is a tar file path. Baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Build') and resource ('Docker image') along with required inputs ('context', 'optional Dockerfile'), clearly distinguishing it from sibling tools like image_action or image_query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives like container_create or compose_action. No explicit context, prerequisites, or exclusions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

image_queryA

Query Docker images: list all images or inspect a specific image by name or ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
imageNoImage name or ID (required for "inspect").
limitNoMaximum number of images to return (list only).
actionYesQuery action: "list" all images or "inspect" a specific image.
fieldsNoSpecific fields to project (dot-notation supported). Overrides verbose.
fullIdNoReturn full 64-char image IDs instead of 12-char truncation. Default: false.
filtersNoList filters. Currently supports: { dangling: boolean }.
verboseNoReturn full image data without summarization. Default: false.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses two modes but does not mention side effects, permissions, or whether it is read-only. For a query tool, the lack of side-effect disclosure is acceptable but could be better.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that gets to the point. It could benefit from slight restructuring or bullet points, but it is efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters, no output schema, and nested objects, the description is too brief. It does not clarify the behavior of parameters like fields, filters, or verbose, which would help an agent invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds minimal value beyond the schema: it only restates the action enum values. No additional parameter details beyond what is in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries Docker images with two actions: list all or inspect a specific image. It uses specific verbs and distinguishes itself from sibling tools like image_action or image_build.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions when to use it (list all images or inspect a specific image) but does not explicitly exclude alternatives or state when not to use it. Context from sibling tools implies it is for queries only.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

network_actionC

Create, remove, connect, or disconnect a Docker network.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full burden. It states the actions but does not disclose side effects (e.g., network removal is destructive), required permissions, or idempotency. An agent cannot anticipate consequences beyond the bare action name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence listing all actions. However, it could be structured to differentiate actions or provide quick reference. It earns points for brevity but loses for lack of structure in a multi-action tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool performs four distinct operations with no output schema, the description is incomplete. It does not explain return values, error scenarios, or behavior after each action (e.g., connection status). An agent lacks sufficient context to use the tool reliably.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already defines parameters with brief descriptions, and the tool description adds no additional meaning. It does not explain how parameters interact (e.g., driver only used with create) or provide examples. Schema coverage is 0% per context, but the schema itself has parameter descriptions; still, the description fails to add value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs four specific actions (create, remove, connect, disconnect) on a Docker network. It uses specific verbs and a clear resource, distinguishing it from sibling tools like network_query which is for querying.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. For example, it does not mention that network_query should be used for inspecting networks, nor does it give any prerequisites or when-not conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

network_queryC

List or inspect Docker networks.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of networks to return (list).
actionYesList all networks or inspect a single network.
fieldsNoProject results to these dot-notation field paths.
networkNoNetwork name or ID (required for inspect).
verboseNoReturn full detail. Defaults to false (compact summary).

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as auth needs, rate limits, or that the tool is read-only. It only states the basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise but lacks structure. It could benefit from a brief second sentence to clarify the distinction between list and inspect actions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description and schema together provide a basic understanding, but there is no information about return values or behavior differences between list and inspect. The agent may need to infer from parameter constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents all parameters. The description adds no additional meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb (list/inspect) and resource (Docker networks). It is specific enough to distinguish from siblings like 'network_action' by context, though it could explicitly differentiate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like 'network_action' or other query tools. It does not mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

system_dfA

Return Docker disk usage: breakdown by containers, images, volumes, and build cache. Output is already compact — shipped raw.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It adds that the output is 'already compact — shipped raw,' hinting at minimal formatting. However, it does not disclose whether the operation is read-only, requires any special permissions, or has any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no wasted words. The purpose is front-loaded, and the additional note about output compactness adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description adequately explains what the tool returns. It mentions the categories (containers, images, volumes, build cache) and the output nature. However, it could be slightly more complete by explicitly stating it provides read-only information about disk usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty (0 parameters, 100% coverage). With no parameters, the description does not need to add parameter semantics. The baseline of 4 applies because the schema already covers all parameter information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns Docker disk usage with a breakdown by containers, images, volumes, and build cache. The verb 'return' and specific resource 'Docker disk usage' make the purpose unambiguous, and it distinguishes from sibling tools like system_prune.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives. While the purpose is clear, there is no discussion of appropriate contexts, prerequisites, or comparisons to sibling tools such as system_prune or volume_query.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

system_pruneA

Prune unused Docker resources by scope and return a summary of reclaimed space. Use scope "all" to prune every category and aggregate reclaimed bytes.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeYesWhat to prune. "all" prunes every category and aggregates reclaimed space.

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It mentions returning a summary but does not explain destructive nature, required permissions, confirmation prompts, or error conditions. The description is insufficient for safe agent invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences front-load the purpose and output, with a second sentence providing a key usage tip. Every word earns its place; no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple input (one enum parameter) and no output schema, the description is mostly adequate. However, it lacks detail on the return format beyond 'summary of reclaimed space', and does not cover edge cases like no unused resources. The overall completeness is sufficient but not exemplary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by noting that scope 'all' prunes every category and aggregates reclaimed space, which goes beyond the schema enum definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool prunes unused Docker resources by scope and returns a summary. The verb 'prune' and resource 'unused Docker resources' are specific. It distinguishes from sibling tools like container_action or image_action, which operate on individual resource types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for cleanup but provides no explicit guidance on when to use this tool versus individual sibling prune commands. It does not mention exclusions or alternatives, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

volume_actionB

Create or remove a Docker volume.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoVolume name (required for create).
forceNoForce removal (remove).
actionYesCreate or remove a volume.
driverNoVolume driver (e.g. "local"). Optional for create.
labelsNoLabels to attach to the volume (create).
volumeNoVolume name (required for remove).

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations and the description lacks behavioral details such as idempotency, error handling, or side effects of create/remove actions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Short and to the point, though it could include more context without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six parameters and no output schema or annotations, the description is too brief to fully inform an agent about usage and behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions cover all parameters; the tool description adds no extra meaning beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates or removes Docker volumes, distinguishing it from sibling actions like compose_action or container_action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like volume_query, nor conditions for creating vs removing volumes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

volume_queryB

List or inspect Docker volumes.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of volumes to return (list).
actionYesList all volumes or inspect a single volume.
fieldsNoProject results to these dot-notation field paths (e.g. ["Name","Driver"]).
volumeNoVolume name (required for inspect).
filtersNoList filters.
verboseNoReturn full detail. Defaults to false (compact summary).

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries full burden. It only states the actions (list/inspect) but omits behavioral traits like side effects, read-only nature, authorization needs, or pagination behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with no wasted words. It front-loads the key purpose, though it could be slightly more informative without harm.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 6 parameters, no output schema, and no annotations, the description is insufficient. It doesn't clarify return format, pagination, or the interplay between parameters (e.g., volume required for inspect, filters for list).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds no extra meaning beyond the parameter descriptions already in the schema. Baseline 3 is appropriate; the description could clarify parameter relationships but doesn't.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List or inspect Docker volumes.' is a specific verb+resource pair that clearly communicates the tool's two main actions, distinguishing it from sibling tools like volume_action or compose_query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use volume_query vs alternatives (e.g., volume_action or other query tools). The description does not mention prerequisites, context, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 17 tool updatesv0.1.0
    • First observedcompose_action
    • First observedcompose_query
    • First observedcontainer_action
    • First observedcontainer_create
    • First observedcontainer_exec
    • First observedcontainer_logs
    • First observedcontainer_query
    • First observeddocker_ping
    • First observedimage_action
    • First observedimage_build
    • First observedimage_query
    • First observednetwork_action
    • First observednetwork_query
    • First observedsystem_df
    • First observedsystem_prune
    • First observedvolume_action
    • First observedvolume_query

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a distinct resource (compose, container, image, network, system, volume) and action (action, query, create, etc.), with no overlaps. Even similar verbs like 'action' and 'query' are clearly separated by resource type.

Naming Consistency5/5

Tool names follow a consistent snake_case pattern: resource_action (e.g., container_create, image_build, network_query). The only exception is 'docker_ping', but it still follows the convention of prefixing with the resource name.

Tool Count5/5

17 tools is appropriate given Docker's broad domain, covering containers, images, networks, volumes, compose, and system operations. Each tool serves a distinct purpose without unnecessary bloat.

Completeness4/5

The tool set covers core CRUD and lifecycle operations for all major Docker resources, including compose. Minor gaps exist (e.g., container commit, stats, login), but the surface is sufficient for most common workflows.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Allows Claude and other AI assistants to interact with Docker through the MCP protocol, enabling container and image management including listing, running, stopping, and pulling Docker resources.
    6
    186
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables secure Docker command execution from isolated environments like containers through MCP protocol. Provides tools for managing Docker containers, images, and Docker Compose services with security validation and async operation support.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables remote Docker management over SSH via a local MCP server, providing tools to manage containers, images, Compose, and system resources.
    1
    GPL 3.0

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/mpgharris/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server