Docker Container Manager MCP Server
Provides tools to list, inspect, start, stop, and monitor Docker containers, as well as fetch logs and stats.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Docker Container Manager MCP Servershow me all running containers with their status and ports"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Docker Container Manager MCP Server
An MCP server that gives any LLM client the ability to list, inspect, start, stop, and monitor Docker containers on the host machine — putting your entire container stack at your AI assistant's fingertips.
Overview
This server wraps the Docker SDK for Python using FastMCP, exposing container management operations as tools any MCP-compatible client can call. Connect it to Claude Desktop and you can ask Claude to check container health, fetch logs, inspect configuration, or monitor live CPU and memory usage — all from a single conversation.
The server connects to the Docker daemon via the Unix socket on startup, verifies connectivity with a ping, and shares the client across all tool calls via FastMCP's lifespan context. No tokens required — just a running Docker daemon.
Related MCP server: dockhand
Tools
Tool | Description |
| List running or all containers with status and port mappings |
| Start a stopped container by name or ID |
| Stop a running container gracefully |
| Fetch the last N lines of timestamped logs |
| Get full container details — image, env vars, mounts, network |
| Get live CPU and memory usage matching |
Project Structure
docker-manager-mcp/
├── server.py # FastMCP instance, lifespan, tool registration
├── config.py # Environment variables and constants
├── tools/
│ ├── __init__.py
│ ├── containers.py # list, start, stop, logs, inspect
│ └── stats.py # get_container_stats with accurate CPU/memory calculation
├── .env # Optional overrides
├── .env.example # Template
├── requirements.txt
├── Dockerfile
└── README.mdRequirements
Python 3.11+
Docker running on the host machine
Your user in the
dockergroup:sudo usermod -aG docker $USER
Setup
1. Clone the repository:
git clone https://github.com/Festuskipkoech/docker-manager-mcp.git
cd docker-manager-mcp2. Install dependencies:
uv sync3. Configure your environment (optional):
cp .env.example .envThe defaults work out of the box on Linux and macOS. No tokens or credentials needed.
DOCKER_HOST=unix:///var/run/docker.sock
DEFAULT_LOG_LINES=50
DEFAULT_STOP_TIMEOUT=10Running Locally
uv run python server.pyOr with the FastMCP CLI on Streamable HTTP transport:
fastmcp run server.py:mcp --transport streamable-httpTesting with MCP Inspector
Start the server in one terminal:
fastmcp run server.py:mcp --transport streamable-httpLaunch the Inspector in a second terminal:
npx -y @modelcontextprotocol/inspectorIn the Inspector UI:
Transport: Streamable HTTP
URL:
http://127.0.0.1:8000/mcpClick Connect
Recommended test sequence:
Step | Tool | Input |
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
Using with Claude Desktop
Add the following to ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"docker-manager": {
"command": "/home/your-user/.local/bin/uv",
"args": [
"run",
"--directory",
"/absolute/path/to/docker-manager-mcp",
"python",
"server.py"
]
}
}
}Use the full path to uv (find it with which uv). Restart Claude Desktop after saving, then try:
List all my running Docker containers and show me their status and portsClaude calls list_containers and returns your full container stack:

Inspect a container and check live resource usage:
Inspect the prepwise_postgres container and show me its CPU and memory usage
Running with Docker
When running the server itself inside a container, mount the Docker socket so it can reach the host daemon:
docker build -t docker-manager-mcp .
docker run -v /var/run/docker.sock:/var/run/docker.sock -p 8000:8000 docker-manager-mcpTroubleshooting
Error | Cause | Fix |
| Docker not running or socket inaccessible | Run |
| User not in docker group | Run |
| Wrong name or ID | Run |
| Container is stopped | Start the container first with |
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- FlicenseAqualityFmaintenanceA Model Context Protocol server that enables Docker container management through natural language interactions using a custom GPT interface.715-
- FlicenseBqualityBmaintenanceAn MCP server that gives LLMs direct control over a local Docker daemon, enabling container, image, volume, network, and Compose stack management through natural language.234-
- FlicenseNot gradedqualityDmaintenanceA read-only MCP server that exposes your Docker daemon, allowing AI assistants to list containers, inspect their details, and fetch logs without write access.-
- AlicenseBqualityCmaintenanceMCP server for managing Docker containers, images, and Compose services via natural language, with configurable tool permissions and safety annotations.16MIT