D

Docker MCP Server

by L337-org · io.github.L337-org/docker-mcp-server

More than just an MCP server that covers the entire range of Docker management tasks, it helps you create workflows to easily manage your Docker environments at scale. It allows you manage multiple local or remote (TCP, TLS, SSH) docker instances and exposes things like logs and stats as resources so that you can monitor and triage all of them.

pypi Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-l337-org-docker-mcp-server": {
      "command": "uvx",
      "args": [
        "docker-mcp-server"
      ],
      "env": {
        "DOCKER_HOST": "<VALUE>",
        "SSH_AUTH_SOCK": "<VALUE>",
        "DOCKER_CONTEXT": "<VALUE>",
        "DOCKER_CERT_PATH": "<VALUE>",
        "DOCKER_TLS_VERIFY": "<VALUE>",
        "DOCKER_MCP_SERVER_HOSTS": "<VALUE>",
        "DOCKER_MCP_SERVER_DISABLE": "<VALUE>",
        "DOCKER_MCP_SERVER_READONLY": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_LABELS": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_DESTRUCTIVE": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_PASSWORD": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_USERNAME": "<VALUE>",
        "DOCKER_MCP_SERVER_ALLOW_SELF_TERMINATE": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-l337-org-docker-mcp-server": {
      "command": "uvx",
      "args": [
        "docker-mcp-server"
      ],
      "env": {
        "DOCKER_HOST": "<VALUE>",
        "SSH_AUTH_SOCK": "<VALUE>",
        "DOCKER_CONTEXT": "<VALUE>",
        "DOCKER_CERT_PATH": "<VALUE>",
        "DOCKER_TLS_VERIFY": "<VALUE>",
        "DOCKER_MCP_SERVER_HOSTS": "<VALUE>",
        "DOCKER_MCP_SERVER_DISABLE": "<VALUE>",
        "DOCKER_MCP_SERVER_READONLY": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_LABELS": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_DESTRUCTIVE": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_PASSWORD": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_USERNAME": "<VALUE>",
        "DOCKER_MCP_SERVER_ALLOW_SELF_TERMINATE": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-l337-org-docker-mcp-server": {
      "command": "uvx",
      "args": [
        "docker-mcp-server"
      ],
      "env": {
        "DOCKER_HOST": "<VALUE>",
        "SSH_AUTH_SOCK": "<VALUE>",
        "DOCKER_CONTEXT": "<VALUE>",
        "DOCKER_CERT_PATH": "<VALUE>",
        "DOCKER_TLS_VERIFY": "<VALUE>",
        "DOCKER_MCP_SERVER_HOSTS": "<VALUE>",
        "DOCKER_MCP_SERVER_DISABLE": "<VALUE>",
        "DOCKER_MCP_SERVER_READONLY": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_LABELS": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_DESTRUCTIVE": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_PASSWORD": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_USERNAME": "<VALUE>",
        "DOCKER_MCP_SERVER_ALLOW_SELF_TERMINATE": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-l337-org-docker-mcp-server": {
      "command": "uvx",
      "args": [
        "docker-mcp-server"
      ],
      "env": {
        "DOCKER_HOST": "<VALUE>",
        "SSH_AUTH_SOCK": "<VALUE>",
        "DOCKER_CONTEXT": "<VALUE>",
        "DOCKER_CERT_PATH": "<VALUE>",
        "DOCKER_TLS_VERIFY": "<VALUE>",
        "DOCKER_MCP_SERVER_HOSTS": "<VALUE>",
        "DOCKER_MCP_SERVER_DISABLE": "<VALUE>",
        "DOCKER_MCP_SERVER_READONLY": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_LABELS": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_DESTRUCTIVE": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_PASSWORD": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_USERNAME": "<VALUE>",
        "DOCKER_MCP_SERVER_ALLOW_SELF_TERMINATE": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-l337-org-docker-mcp-server": {
      "command": "uvx",
      "args": [
        "docker-mcp-server"
      ],
      "env": {
        "DOCKER_HOST": "<VALUE>",
        "SSH_AUTH_SOCK": "<VALUE>",
        "DOCKER_CONTEXT": "<VALUE>",
        "DOCKER_CERT_PATH": "<VALUE>",
        "DOCKER_TLS_VERIFY": "<VALUE>",
        "DOCKER_MCP_SERVER_HOSTS": "<VALUE>",
        "DOCKER_MCP_SERVER_DISABLE": "<VALUE>",
        "DOCKER_MCP_SERVER_READONLY": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_LABELS": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_DESTRUCTIVE": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_PASSWORD": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_USERNAME": "<VALUE>",
        "DOCKER_MCP_SERVER_ALLOW_SELF_TERMINATE": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-l337-org-docker-mcp-server": {
      "command": "uvx",
      "args": [
        "docker-mcp-server"
      ],
      "env": {
        "DOCKER_HOST": "<VALUE>",
        "SSH_AUTH_SOCK": "<VALUE>",
        "DOCKER_CONTEXT": "<VALUE>",
        "DOCKER_CERT_PATH": "<VALUE>",
        "DOCKER_TLS_VERIFY": "<VALUE>",
        "DOCKER_MCP_SERVER_HOSTS": "<VALUE>",
        "DOCKER_MCP_SERVER_DISABLE": "<VALUE>",
        "DOCKER_MCP_SERVER_READONLY": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_LABELS": "<VALUE>",
        "DOCKER_MCP_SERVER_NO_DESTRUCTIVE": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_PASSWORD": "<VALUE>",
        "DOCKER_MCP_SERVER_REGISTRY_USERNAME": "<VALUE>",
        "DOCKER_MCP_SERVER_ALLOW_SELF_TERMINATE": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
DOCKER_HOST No Docker daemon endpoint (e.g., tcp://..., unix://..., ssh://...). Used when DOCKER_MCP_SERVER_HOSTS is not set.
SSH_AUTH_SOCK No Path to SSH agent socket for SSH-based remote daemon connections.
DOCKER_CONTEXT No Name of Docker context to use for resolving the default daemon.
DOCKER_CERT_PATH No Path to directory containing TLS certificates (ca.pem, cert.pem, key.pem).
DOCKER_TLS_VERIFY No Set to '1' to enable TLS verification for the Docker daemon connection.
DOCKER_MCP_SERVER_HOSTS No Comma-separated list of name=endpoint pairs for multiple daemons. e.g., 'local=auto, prod=ssh://user@host(ro)'
DOCKER_MCP_SERVER_DISABLE No Comma-separated list of domains to disable (e.g., 'swarm,buildx,scout').
DOCKER_MCP_SERVER_READONLY No Set to '1', 'true', 'yes', or 'on' to register only read-only tools.
DOCKER_MCP_SERVER_NO_LABELS No Set to '1' to disable provenance labels on created Docker objects.
DOCKER_MCP_SERVER_NO_DESTRUCTIVE No Set to '1', 'true', 'yes', or 'on' to register everything except destructive tools.
DOCKER_MCP_SERVER_REGISTRY_PASSWORD No Password or token for private registry authentication.
DOCKER_MCP_SERVER_REGISTRY_USERNAME No Username for private registry authentication (fallback when not provided in tool call).
DOCKER_MCP_SERVER_ALLOW_SELF_TERMINATE No Set to '1' to allow destructive actions on the server's own container (bypasses self-termination guard).

Similar servers