Docker MCP Server — Docker tools for AI agents
A Docker MCP server that lets AI agents operate Compose stacks with structured,
Docker-native tools — instead of brittle shell commands and terminal-shaped output.
Inspect containers, read logs, check health, query databases, take dumps, and bring stacks up or
down — on your laptop or on a server across the world by naming its profile.
It speaks Docker the way you do: your compose files, project names, and service names. Answers
come back as named fields with enough context for an agent to act on them, rather than parse an
ASCII table and guess.
Works with Claude Code, Codex CLI, Cursor, opencode, Gemini CLI, Qwen Code and other MCP clients.

Install · Tools · Setup · Security · Docs · Changelog
Install in 30 seconds
No global installation required. npx downloads the package on first use:
npx -y @hypnosis/docker-mcp-server
Add it to your MCP client — Claude Code, for example — for every project:
claude mcp add docker -s user -- npx -y @hypnosis/docker-mcp-server
That is the whole setup for the Docker on this machine. No profiles file, no environment
variables: the server uses the local Docker socket, and the compose project of your working
directory is the project it answers about.
For a Docker host on another machine, add one file with the servers you reach over SSH:
claude mcp add docker -s user \
-e DOCKER_MCP_PROFILES_FILE="$HOME/.claude/docker-profiles.json" \
-- npx -y @hypnosis/docker-mcp-server
{
"default": "local",
"profiles": {
"local": { "mode": "local" },
"production": {
"host": "prod.example.com",
"username": "deployer",
"privateKeyPath": "~/.ssh/id_ed25519"
}
}
}
Now every tool takes a profile, and docker_health({ action: "profiles" }) lists what the
server was given.
Codex, Cursor, opencode and other clients are covered in
Set up the Docker MCP server.
Install as a plugin
Some clients — Claude Code, for example — can take the whole thing as a plugin instead:
/plugin marketplace add hypnosis/docker-mcp-server
/plugin install docker-mcp-server@docker-mcp-server
The plugin brings the server up against the Docker on this machine, with no configuration at
all. Point it at other hosts the same way as above, with DOCKER_MCP_PROFILES_FILE.
Requirements

Node.js 18+ and a Docker daemon you can already reach — the local socket, or a remote host
over SSH with a key.
The server starts whether or not Docker is up. A call made while the daemon is down answers
"start Docker" and works on the next try, without restarting your MCP client.
Prefer a pinned version, offline work, or one less registry check per launch:
npm install -g @hypnosis/docker-mcp-server, then use docker-mcp-server as the command
instead of npx.
Who this Docker MCP server is for