dockhand
Provides tools for managing Docker containers, images, volumes, networks, and Compose stacks through natural language.
Click on "Install 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., "@dockhandrun an nginx container mapping port 8080 to 80"
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.
Dockhand
An MCP server that gives an LLM (Claude, etc.) direct control over your local Docker daemon — run and manage containers, images, volumes, networks, and Compose stacks through natural language.
Built with FastMCP and the Docker SDK for Python.
Requirements
Python >= 3.14
Docker installed and running locally (Docker Desktop, Docker Engine, etc.)
Docker Compose v2 CLI (
docker compose) available onPATH— required for the stack/compose toolsuv for dependency management
Related MCP server: Docker MCP Server
Installation
git clone <this-repo>
cd dockhand
uv syncThis creates a .venv and installs the dependencies pinned in uv.lock.
Running
uv run main.pyThe server communicates over stdio, so it's meant to be launched by an MCP client rather than run standalone in a terminal.
Connecting to Claude Desktop / Claude Code
Add an entry to your MCP client's configuration (e.g. claude_desktop_config.json):
{
"mcpServers": {
"dockhand": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/dockhand", "run", "main.py"]
}
}
}Restart the client and the tools below become available to the model.
Available tools
Containers (containers.py)
Tool | Description |
| Runs a container from an image, mapping a container port to a host port |
| Stops a running container |
| Starts a stopped container |
| Restarts a container |
| Force-removes a container (stops it first if needed) |
| Lists all containers and their status |
| Fetches the last N log lines from a container |
| Reports live CPU % and memory usage |
| Shows env vars, mounts, network IPs, and health status |
| Executes a shell command inside a running container |
Images (images.py)
Tool | Description |
| Lists all local images with size |
| Builds an image from a Dockerfile already on disk |
| Tags and pushes a local image to a registry (requires prior |
| Force-removes a local image |
Volumes & networks (volumes.py)
Tool | Description |
| Lists volumes with driver and mountpoint |
| Deletes a volume (fails if still in use) |
| Lists networks with driver and scope |
Compose stacks (stacks.py)
Tool | Description |
| Deploys a stack from an inline |
| Stops a stack's containers without removing them |
| Stops and removes a stack, including its volumes ( |
| Lists all compose projects, including stopped ones |
| Shows the status of a stack's containers ( |
| Collects logs from every container in a stack |
Project structure
main.py # Entrypoint: registers tool modules and starts the MCP server
server.py # Shared FastMCP server instance
docker_client.py # Lazy singleton Docker SDK client
compose_client.py # Thin wrapper around the `docker compose` CLI
containers.py # Container lifecycle & inspection tools
images.py # Image build/push/list/delete tools
volumes.py # Volume & network tools
stacks.py # Compose stack toolsSafety notes
This server gives the model real, unsandboxed control over your Docker daemon:
delete_containeranddelete_imageforce-remove resources without confirmation.remove_stackdeletes volumes (-v), which is destructive and irreversible for stateful data.container_execruns arbitrary shell commands inside a container.push_imagepushes to whatever registry you point it at, using your existing local Docker credentials.
Only connect this server to clients/agents you trust, and be deliberate about which containers and stacks you let it touch.
License
No license specified.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Theo-Gkisis/dockhand'
If you have feedback or need assistance with the MCP directory API, please join our Discord server