dockerbro
Provides tools for managing Docker containers, images, and Compose services, including listing, inspecting, starting, stopping, restarting, removing containers, pulling and removing images, and managing Docker Compose services.
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., "@dockerbrolist all running containers"
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.
DockerBro
DockerBro is a proper MCP-compliant Docker management server. Speaks JSON-RPC 2.0 over stdin/stdout and talks to your local Docker daemon.
Works with Zed, Claude, Cursor, VS Code, and any other MCP-compatible AI editor.
Runs on macOS, Linux, and Windows.
pip install dockerbroFeatures
Tool | What it does | Safety |
| List all containers with status, image, ports | Read-only |
| Detailed container info (network, mounts, env) | Read-only |
| Start a stopped container | Reversible |
| Stop a running container | Reversible |
| Restart a container | Reversible |
| Remove a container (with optional force) | ⚠️ Destructive |
| Get recent log output | Read-only |
| Run a command inside a running container | ⚠️ Destructive |
| List local Docker images | Read-only |
| Pull an image from a registry | Reversible |
| Run a new container with ports, env, etc. | Reversible |
| Remove a local image | ⚠️ Destructive |
| List Compose services | Read-only |
| Start Compose services | Reversible |
| Stop and remove Compose services | ⚠️ Destructive |
| Get Compose service logs | Read-only |
Related MCP server: Docker MCP Server
Pre-approving tools
Each tool is annotated with MCP spec annotations (readOnlyHint, destructiveHint, idempotentHint) so spec-aware clients (Claude Code, Cursor, etc.) can auto-approve read-only tools without prompting.
You can also restrict tools at the server level via environment variables, enforced before anything reaches the client:
Env var | Effect |
| Comma-separated allowlist — only these tools are exposed and callable |
| Comma-separated denylist — always blocked (deny wins over allow) |
Example: only safe read-only tools
Pass the env var in your Zed config (add to the env object):
"env": {
"DOCKER_MCP_ALLOW_TOOLS": "list_containers,inspect_container,logs_container,list_images,docker_compose_ps,docker_compose_logs"
}If a tool is not pre-approved, the server returns an error:
Tool 'remove_container' is not pre-approved (blocked by server allow/deny config).Note: Client-side approval (e.g. Zed's
agent.tool_permissions) and server-side pre-approval are independent. The server-side list controls which tools are visible and callable at all; the client controls which of those require a confirmation prompt.
Requirements
Python 3.9+
Docker installed and running
Install
Option A: From PyPI (recommended — all platforms)
Platform | Command |
macOS / Linux |
|
Windows |
|
Any (if |
|
command not found: pip? On macOS and many Linux distros, Python 3 installs it aspip3. On Windows it's usuallypiporpy -m pip. When in doubt,python3 -m pip install dockerbroworks everywhere.
This puts a dockerbro command on your PATH, so your editor config needs no file paths at all.
Verify it works:
dockerbro --version 2>/dev/null; echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | dockerbroOption B: Run from source
git clone https://github.com/ramanailearning-cpu/dockerbro.git
cd dockerbro
pip install -e .Option C: Run in a Docker container
Build it:
docker build -t dockerbro .Run it — the socket mount differs per platform:
macOS / Linux:
docker run --rm -i -v /var/run/docker.sock:/var/run/docker.sock dockerbroWindows (PowerShell):
docker run --rm -i -v //./pipe/docker_engine://./pipe/docker_engine dockerbroConnecting to the Docker daemon
DockerBro auto-detects your daemon, so this usually needs zero configuration:
Platform | Default endpoint |
Linux |
|
macOS (Docker Desktop) |
|
Windows | Named pipe |
To point at a different or remote daemon, set DOCKER_HOST in your config's env block:
"env": { "DOCKER_HOST": "tcp://192.168.1.50:2375" }macOS Docker Desktop note: if you get a connection error, enable Settings → Advanced → Allow the default Docker socket, or set
DOCKER_HOSTtounix:///Users/YOUR_NAME/.docker/run/docker.sock.
Zed Configuration
Add this to your Zed settings file (Cmd-Shift-P → Open Settings on macOS, Ctrl-Shift-P on Linux/Windows):
"context_servers": {
"dockerbro": {
"command": "dockerbro",
"env": {
"DOCKER_MCP_LOG": "/tmp/dockerbro.log"
}
}
}Restricting tools server-side
Optionally, add env vars to limit which tools are exposed:
"env": {
"DOCKER_MCP_LOG": "/tmp/dockerbro.log",
"DOCKER_MCP_DENY_TOOLS": "remove_container,remove_image,exec_container,docker_compose_down"
}Reload Zed (Cmd-Shift-P on macOS / Ctrl-Shift-P on Linux or Windows → Reload Window). The agent will have 16 Docker tools available.
Windows note: If the
dockerbrocommand isn't found by Zed, use the full path shown bywhere dockerbroin your terminal.
Claude Desktop Configuration
macOS
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"dockerbro": {
"command": "dockerbro",
"env": {
"DOCKER_MCP_LOG": "/tmp/dockerbro.log"
}
}
}
}Linux
Edit ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"dockerbro": {
"command": "dockerbro",
"env": {
"DOCKER_MCP_LOG": "/tmp/dockerbro.log"
}
}
}
}Windows
Edit %APPDATA%\Claude\claude_desktop_config.json (paste the path into Explorer's address bar):
{
"mcpServers": {
"dockerbro": {
"command": "dockerbro",
"env": {
"DOCKER_MCP_LOG": "C:\\Users\\YOU\\dockerbro.log"
}
}
}
}Testing
Via terminal (pipe JSON-RPC)
# Initialize
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | dockerbro
# List tools
echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | dockerbro
# Call a tool
echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_containers","arguments":{"all":true}}}' | dockerbroVia MCP Inspector
npx @modelcontextprotocol/inspector dockerbroArchitecture
AI Editor (Zed / Claude / Cursor / VS Code)
| (stdin/stdout: JSON-RPC 2.0)
v
dockerbro (Python)
| (Docker SDK)
v
Docker DaemonLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceAn MCP server that allows managing Docker containers through natural language, enabling users to compose, introspect, and debug containers without running commands themselves.733GPL 3.0
- Alicense-qualityDmaintenanceAn MCP server that enables managing Docker containers through natural language commands, allowing users to create, list, and delete containers. It facilitates automated container orchestration and integrates with VS Code via the Cline extension.101MIT
- Alicense-qualityCmaintenanceA Dockerized MCP server that enables Discord integration, offering tools for role management, messaging, moderation, and server administration via natural language.1MIT
- Flicense-qualityCmaintenanceAn MCP server that gives any LLM client the ability to list, inspect, start, stop, and monitor Docker containers on the host machine.1
Related MCP Connectors
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
A MCP server built for developers enabling Git based project management with project and personal…
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/ramanailearning-cpu/dockerbro'
If you have feedback or need assistance with the MCP directory API, please join our Discord server