Docker MCP Server

Universal Docker MCP server for AI assistants (Cursor, Claude Desktop)

Local serverstdioPython

What is the Docker MCP server?

If you already use Docker, the docker mcp server is the piece that lets your assistant work with it directly. Universal Docker MCP server for AI assistants (Cursor, Claude Desktop).

What the server does

Universal Docker MCP server for AI assistants (Cursor, Claude Desktop). Manage Docker containers, execute commands, query databases, and handle environment configurations — all through natural language.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • docker_container_list — List all containers (grouped by project)
  • docker_container_start — Start a container
  • docker_container_stop — Stop a container
  • docker_container_restart — Restart a container
  • docker_container_logs — View container logs
  • docker_container_stats — Get container resource usage
  • docker_compose_up — Start entire stack
  • docker_compose_down — Stop entire stack
  • docker_resource_list — List Docker images, volumes, or networks
  • docker_db_query — Execute SQL query or database command
  • docker_db_backup — Create database backup
  • docker_db_restore — Restore from backup

Credentials and setup notes

Configuration is passed through the environment: DOCKER_MCP_AUTO_DISCOVER, DOCKER_MCP_MASK_SECRETS, DOCKER_MCP_PROFILES_FILE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Installation

@hypnosis/docker-mcp-server on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Where it fits

Plenty of database access servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Docker's toolset — docker_container_list, docker_container_start, docker_container_stop and 11 more — is a fair guide to whether it matches your workflow. It is maintained by hypnosis; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Docker.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
docker_container_listList all containers (grouped by project)
docker_container_startStart a container
docker_container_stopStop a container
docker_container_restartRestart a container
docker_container_logsView container logs
docker_container_statsGet container resource usage
docker_compose_upStart entire stack
docker_compose_downStop entire stack
docker_resource_listList Docker images, volumes, or networks
docker_db_queryExecute SQL query or database command
docker_db_backupCreate database backup
docker_db_restoreRestore from backup
docker_db_statusShow database status
docker_env_listList environment variables (with secret masking)

How to install the Docker MCP server

{
  "mcpServers": {
    "docker-1": {
      "command": "npx",
      "args": ["-y", "@hypnosis/docker-mcp-server"],
      "env": {
        "DOCKER_MCP_AUTO_DISCOVER": "your-value",
        "DOCKER_MCP_MASK_SECRETS": "your-value",
        "DOCKER_MCP_PROFILES_FILE": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
DOCKER_MCP_AUTO_DISCOVERConfiguration value read at startup.Optional
DOCKER_MCP_MASK_SECRETSCredential the server authenticates with.Yes
DOCKER_MCP_PROFILES_FILEConfiguration value read at startup.Optional

Example prompts to try

  • Use Docker to docker container list.
  • Use Docker to docker container start.
  • Use Docker to docker container stop.

Frequently asked questions

It connects Docker to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (docker_container_list, docker_container_start, docker_container_stop, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Docker directly.