MCP server for Docker — container management, health checks, auto-restart, Compose lifecycle, and log streaming for Claude, Cursor, and AI agents
This server has 15 well-documented tools with clear verb-based naming and detailed descriptions. However, there are critical gaps: (1) Output schemas are not explicitly documented in the visible source, only input schemas are shown. (2) Many parameters lack type information in the schema definitions (e.g., 'env' is type 'object' without field definitions, 'ports' is type 'object' without structure, 'volumes' is type 'array' without item schema). (3) Error handling descriptions are present but do not always guide recovery with actionable next steps. (4) Some tool descriptions are under the recommended 10 - 1024 character range but acceptable. (5) No explicit documentation of which tools support idempotence, dry-run, or confirmation workflows, critical for destructive operations like remove_container and prune_containers. The naming is consistently strong (all verb-based, clear), and descriptions are generally well-written with context about prerequisites and related tools. But missing output schema documentation and incomplete parameter schemas prevent a higher score.
Tear down Docker Compose services defined by docker-compose.yml at path. Stops and removes containers, networks created by compose_up. Use volumes=true to also remove named volumes (destructive — data is lost). Returns a confirmation string listing stopped services. Use compose_ps to verify teardown. Returns an error string if the Compose file is missing.
Tail logs from one or more services in a Docker Compose stack defined by docker-compose.yml at path. Use this for multi-service log inspection; for single-container logs use stream_logs instead. The services filter limits output to named services; tail controls how many recent lines to return (default 100); follow=true streams new lines until cancelled. Returns UTF-8 log text with stream headers stripped, or 'No logs found.' when the stack has not produced output. Read-only and safe to call repeatedly. Returns an error string if path does not resolve to a Compose project.
List service states across a Docker Compose stack defined by docker-compose.yml at path. Returns an array of services with name, state (running, exited, etc.), health status, and port mappings. Use compose_up to start services; use compose_logs to inspect output. Read-only and safe to call repeatedly. Returns an error string if the Compose file is missing.
Restart Docker Compose services defined by docker-compose.yml at path. Restart specific services or the entire stack. Unlike stop+start, this preserves container configuration. The timeout parameter controls how long to wait before force-killing (default 10s). Returns a confirmation string. Use compose_ps to verify state after restart. Returns an error string if the Compose file is missing.
Output schemas not explicitly documented. Tool descriptions state what fields are returned (e.g., 'Returns an array of objects with ID, name, image, state, ports, and labels') but there is no formal JSON Schema declaration of the response structure. LLMs cannot reliably parse undocumented output or plan downstream tool chains.
Complex parameter types lack schema detail. 'env' is declared as type 'object' with no field structure; 'ports' is type 'object' with no property definitions; 'volumes' is type 'array' with no item schema. This forces LLMs to guess valid structures and invites malformed calls.
Destructive tools (remove_container, prune_containers, compose_down with volumes=true) lack explicit confirmation or dry-run patterns. Error handling describes what happens on failure but does not warn about irreversibility or offer undo mechanisms.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 63 | <=2025-11-25 | v2 |
Bring up Docker Compose services from a docker-compose.yml file at path. Use compose_ps to check service states after bringing them up; use compose_logs to inspect output. Optionally rebuild images before starting (build=true). Returns a confirmation string listing which services were started. Idempotent: already-running services are left untouched. Returns an error string if the Compose file is missing or invalid.
Get detailed configuration and state of a Docker container by ID or name. Returns full JSON including image, command, environment variables, network settings, mount points, restart policy, and health status. Use list_containers to find container IDs; use container_stats for resource usage. Returns an error string if the container does not exist.
List Docker containers with optional filters (state, name, label). Returns an array of objects with ID, name, image, state (running/exited/etc.), ports, and labels. Use all=true to include stopped containers (default shows only running). Use inspect_container for full configuration of a single container. Read-only and safe to call repeatedly.
Remove all stopped containers and unused image layers. Frees up disk space. Use list_containers to review what will be pruned first. Returns a summary of removed items and freed space.
Recreate a Docker container with the same configuration (stop, remove, re-create). Useful for applying config changes without manual editing of run commands. Preserves image, env, ports, volumes, and labels from the original. Returns a confirmation string with the new container ID. Returns an error string if the original container does not exist.
Remove a Docker container by ID or name. Requires the container to be stopped first unless force=true is set (which stops and removes in one step). Use stop_container for graceful shutdown; use restart_container to restart. Returns a confirmation string. Returns an error string if the container does not exist or is running without force.
Restart a Docker container by ID or name with optional timeout. This tears down the running process and starts a new one — use stop_container for a graceful shutdown or remove_container to delete entirely. The timeout parameter (default 10s) controls how long to wait before force-killing. Returns a confirmation string on success. Idempotent: restarting an already-stopped container starts it again. Returns an error string if the container does not exist or is not running.
Create and start a new Docker container with one command. Supports image, env, ports, volumes, restart policy, and command override. Auto-pulls missing images.
Start a stopped Docker container by ID or name. Use list_containers to find stopped containers (state=exited). Returns a confirmation string on success. Idempotent: starting an already-running container is a no-op. Returns an error string if the container does not exist.
Stop a running Docker container by ID or name with optional timeout. Sends SIGTERM, then SIGKILL after timeout seconds (default 10s). Use restart_container to restart without stopping; use remove_container to delete entirely. Returns a confirmation string. Handles the 304 already-stopped case gracefully. Returns an error string if the container does not exist.
Update container resource limits (CPU, memory) and restart policy. Changes take effect on next container restart.
Idempotence guarantees not explicitly documented. Descriptions mention 'Idempotent: starting an already-running container is a no-op' for start_container, but this guarantee is not consistent across tools. restart_container, recreate_container, and compose_up state idempotence differently or not at all. Agents need explicit idempotence guarantees to safely retry.
Error messages lack recovery guidance. Descriptions say 'Returns an error string if X' but do not guide the agent on next steps. E.g., 'Container not found' should suggest 'Call list_containers() to find the correct container ID.' or 'Check the container name matches one of: ...'
Parameter relationships undocumented. compose_up accepts both 'build=true' and 'services=[...]', but the interaction is unclear: does build=true rebuild only the specified services or all services? Does omitting 'services' rebuild everything?