list_containersLABSCO SUMMARY
The container work happens where you are describing it.
Lifecycle, images, networks and volumes are all reachable from one connection, so an investigation that starts with "why is this container restarting" can go all the way to reading its logs and running a command inside it without a terminal.
What it is
A Docker management server covering twenty-two operations across the four Docker object types. It talks to the Docker Engine on the machine it runs on, with that machine's Docker permissions.
What you get
- Containers listed, created, run, started, stopped, recreated and removed, with logs fetched on demand
- Commands executed inside a running container, and files copied from the host into one
- Images listed, built, pulled, tagged, pushed and removed
- Networks and volumes listed, created and removed
- Running and stopped containers both in the listing, so a container that exited is still visible
Requirements
Ruby 3.2 or newer, the gem installed, a running Docker Engine, and Docker permissions for the user the server runs as. Two of the tools reach outside the container boundary — one executes arbitrary commands inside a container, the other copies host files in — so the authors recommend restricted Docker permissions and a trusted environment rather than exposure to an untrusted client.
Setup effort
One command — gem install docker_mcp
USE CASES
Working out why a container is not healthy
List what is there including the stopped ones, pull the logs from the container in question, and run a command inside it to confirm what you suspect.
Standing up a service to try something
Pull the image and run a container from it in one exchange, named so you can find it again when you are finished.
Rebuilding after a code change
Build the image, tag it, and recreate the container from the new version, so the loop from edit to running service stays in one place.
Getting a file into a running container
Copy a config file or a fixture from the host into the container and restart it, instead of rebuilding the image for a one-line change.
Reclaiming disk space
List the images, volumes and networks that have accumulated and remove the ones nothing is using — the cleanup that never gets done because it needs four commands.
Setting up an isolated environment
Create the network and the volume first, then create containers attached to them, so a test environment is reproducible rather than assembled by hand each time.
22 tools
Listed in project docs. Your client may show a different list.
create_containerrun_containerstart_containerstop_containerremove_containerrecreate_containerexec_containerfetch_container_logscopy_to_containerlist_imagespull_imagepush_imagebuild_imagetag_imageremove_imagelist_networkscreate_networkremove_networklist_volumescreate_volumeremove_volumeBEFORE YOU INSTALL
What to know first
Tools you get
22 tools named in the project's documentation.
Requires
Ruby 3.2+
INSTALLATION
Connect your client
Add the block to your client, or run the command directly.
Server setup
Configuration file
{
"mcpServers": {
"docker_mcp": {
"command": "bash",
"args": [
"-l",
"-c",
"docker_mcp"
]
}
}
}gem
gem install docker_mcp