Skip to the content.

MCP Docker Server Documentation

CI CodeQL Pre-commit Dependency Review License Compliance Documentation codecov Quality Gate Status Maintainability Rating Reliability Rating Security Rating GitHub release Python 3.11-3.14 Docker License: MIT Code style: ruff type-checked: mypy MCP Dependabot

A Model Context Protocol (MCP) server that exposes Docker functionality to AI assistants like Claude. Manage containers, images, networks, and volumes through a type-safe, documented API with safety controls.

Features

Canonical Docs

The project docs live in three Markdown sources. Each section in this site links directly to them:

Quick Start

See Installation Instructions in the main README for a complete setup guide including:

Safety System

Three-tier classification: SAFE (read-only) → MODERATE (create/modify) → DESTRUCTIVE (delete).

Control via environment variables: SAFETY_ALLOW_DESTRUCTIVE_OPERATIONS, SAFETY_ALLOW_PRIVILEGED_CONTAINERS, etc.

See README.md for complete safety system documentation.

What’s Available

For complete list see README.md.

Example Usage

List All Containers

# Using the MCP tool
result = await client.call_tool("docker_list_containers", {
    "all": True,
    "filters": {"status": ["running"]}
})

Troubleshoot a Container

# Using the AI prompt
prompt = await client.get_prompt("troubleshoot_container", {
    "container_id": "my-container"
})
# Returns detailed diagnostics and recommendations

Stream Container Logs

# Using the resource
logs = await client.read_resource("container://logs/my-container")
# Pass tail/follow arguments via your MCP client options

Documentation Sources

For questions or issues, open a ticket in the GitHub repository.

Contributing

Contributions are welcome! Please see the GitHub repository for:

License

MIT License - see LICENSE for details.

Support


Version: 1.1.0 Last Updated: 2025-11-14 Python: 3.11+ Docker: API version 1.41+