Docker MCP Server logo

Docker MCP Server

Operates local or SSH-accessible Docker Compose stacks with structured tools for containers, logs, health, databases, and lifecycle actions.

Install Docker MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "docker-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@hypnosis/docker-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 10 tools correctly (14d ago).

Overview

Docker MCP Server MCP server gives AI agents structured access to Docker containers and Compose projects. It uses the local Docker socket by default and can reach remote Docker hosts over SSH through named profiles. Available operations include container inspection, logs, health checks, database queries and dumps, resource checks, and bringing Compose stacks up or down. Use it when an agent needs to investigate or operate Compose-based environments without parsing terminal output.

Use cases

  • Inspect a Compose stack while debugging an application
  • Read service logs and health information during an incident
  • Query or dump a database running in Docker
  • Start or stop local and remote Compose projects
  • Check multiple Docker hosts through named SSH profiles

Key features

  • Structured Docker and Compose tools
  • Local Docker socket access
  • Remote Docker hosts over SSH profiles
  • Container logs and health inspection
  • Database queries and dumps
  • Compose stack lifecycle operations

Tools10

What Docker MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~4.5k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

6/6 checks healthy over the last 45d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · @hypnosis/docker-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads1.1kPackage downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed10Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Docker MCP Server works

What Docker MCP Server does

Docker MCP Server MCP server exposes Docker and Docker Compose operations through MCP tools designed for AI agents. It works with the project, service, and Compose names already used by a Docker environment, returning named fields such as state, health, ports, timestamps, byte counts, exit codes, and log streams.

The server covers common development, debugging, and operational tasks. An agent can inspect containers, read bounded log windows, check service health, measure resources, query databases running alongside services, create database dumps, and start or stop Compose stacks. It can work with Docker on the current machine or with a remote host selected by profile.

How it works

By default, Docker MCP Server MCP server communicates with the Docker socket available on the local machine. Its Compose-related lookups use project and service information associated with the running containers, so a remote project can be addressed by name without maintaining a remote working directory. For a project that has not yet run on a host, a Compose file can be supplied with compose_path.

Remote hosts are represented by profiles containing connection details such as the host, SSH username, and private key path. Tool calls can name a profile, while omitting profile uses the configured default. An unknown profile produces a response listing the profiles available to the server rather than silently selecting another host.

Results distinguish situations such as an empty result, a missing health check, truncated output, or an action that could not start. This gives an agent more context than screen-oriented Docker CLI output.

Setup and configuration

Docker MCP Server MCP server requires Node.js 18 or newer and access to a Docker daemon. The daemon can be reached through the local socket or through SSH using a key. No global package installation is needed: run npx -y @hypnosis/docker-mcp-server from the MCP client configuration.

For local use, no profiles file or environment variable is needed. To configure remote hosts, set DOCKER_MCP_PROFILES_FILE to a JSON file containing a default profile and named profile definitions. The documented example includes a local profile and a production profile with an SSH host, username, and private key path.

The package can also be installed globally with npm and launched as docker-mcp-server. Claude Code can add it as an MCP server or install the repository's plugin. The README also provides setup guidance for Codex, Cursor, opencode, Gemini CLI, Qwen Code, and other MCP clients.

Tools and capabilities

Docker MCP Server MCP server provides capabilities for:

  • Listing and inspecting containers.
  • Reading container logs with bounded output.
  • Checking Docker and service health.
  • Measuring service resources.
  • Querying databases attached to the Docker environment.
  • Taking database dumps.
  • Starting and stopping Compose stacks.
  • Selecting local or SSH-based Docker hosts with profiles.

The docker_health tool can report the configured profiles when called with the profiles action. Container operations accept a profile such as production, allowing the same workflow to target different Docker hosts.

Limitations and notes

The server does not replace access to Docker: the target daemon must already be reachable, and remote access depends on usable SSH credentials. It can start while Docker is unavailable, but operations made during the outage return a message indicating that Docker should be started; a later call can work without restarting the MCP client.

Destructive-operation safeguards are referenced by the project navigation, but their detailed behavior is not specified here.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Docker MCP Server

Docker MCP Server is an MCP server that connects AI agents to local Docker daemons and remote Docker hosts over SSH. Its main tools inspect containers, read logs, check health, query databases, create dumps, measure resources, and start or stop Docker Compose stacks using structured results.

Install it by running `npx -y @hypnosis/docker-mcp-server` in your MCP client configuration. Node.js 18 or newer and access to a Docker daemon are required. You can also install the npm package globally and use `docker-mcp-server` as the command.

Yes, Docker MCP Server works with Cursor. Local use connects to the available Docker socket; remote use can be configured with `DOCKER_MCP_PROFILES_FILE`.

Connect it by creating a JSON profiles file and setting `DOCKER_MCP_PROFILES_FILE` to its path. A profile can specify the remote host, SSH username, and private key path. Tool calls then select that host with the `profile` argument.

The server still starts when Docker is unavailable, but an operation reports that Docker should be started. Once the daemon is available, a later tool call can work without restarting the MCP client.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDocker MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/docker-mcp-server?style=directory)](https://allmcps.com/mcp/docker-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/docker-mcp-server"><img src="https://allmcps.com/api/badge/docker-mcp-server?style=directory" alt="Docker MCP Server on AllMCPs" /></a>