← Docker MCP Server

Docker MCP Server 2.0.0

npm · @swartdraak/docker-mcp-server · current release

37
Tools
0
Resources
0
Templates
0
Prompts

Observation

Observed 2026-08-22T10:25:18.203Z using mcpSecurity-inventory. Status: succeeded. Negotiated protocol: 2025-06-18.

Server capabilities
{
  "tools": {}
}

Tools 37

ToolCategoryAnnotationsRisk
build_imageBuild a Docker image from a Dockerfile
Input schema
{
  "type": "object",
  "properties": {
    "context": {
      "type": "string",
      "description": "Path to the build context directory"
    },
    "dockerfile": {
      "type": "string",
      "description": "Path to the Dockerfile (relative to context)",
      "default": "Dockerfile"
    },
    "tag": {
      "type": "string",
      "description": "Name and optionally tag in 'name:tag' format"
    },
    "buildArgs": {
      "type": "object",
      "description": "Build-time variables as key-value pairs"
    }
  },
  "required": [
    "context",
    "tag"
  ]
}
— · —
connect_networkConnect a container to a network
Input schema
{
  "type": "object",
  "properties": {
    "networkId": {
      "type": "string",
      "description": "Network ID or name"
    },
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    }
  },
  "required": [
    "networkId",
    "containerId"
  ]
}
— · —
container_logsGet logs from a container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    },
    "tail": {
      "type": "number",
      "description": "Number of lines to show from the end of the logs",
      "default": 100
    },
    "follow": {
      "type": "boolean",
      "description": "Follow log output",
      "default": false
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
container_statsGet real-time resource usage statistics for a container (CPU, memory, network, I/O)
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    },
    "stream": {
      "type": "boolean",
      "description": "Stream stats continuously",
      "default": false
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
create_containerCreate a new Docker container
Input schema
{
  "type": "object",
  "properties": {
    "image": {
      "type": "string",
      "description": "Docker image name (e.g., 'nginx:latest')"
    },
    "name": {
      "type": "string",
      "description": "Container name"
    },
    "command": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Command to run as an array (e.g., ['python', 'app.py'])"
    },
    "entrypoint": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Entrypoint as an array (e.g., ['/bin/bash', '-c'])"
    },
    "env": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Environment variables as array of KEY=VALUE strings (e.g., ['NODE_ENV=production', 'PORT=3000'])"
    },
    "exposedPorts": {
      "type": "object",
      "description": "Exposed ports as object with port/protocol keys (e.g., {'80/tcp': {}, '443/tcp': {}})"
    },
    "hostConfig": {
      "type": "object",
      "description": "Host configuration including port bindings and volumes",
      "properties": {
        "PortBindings": {
          "type": "object",
          "description": "Port bindings (e.g., {'80/tcp': [{'HostPort': '8080'}]})"
        },
        "Binds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Volume bindings as array (e.g., ['/host/path:/container/path'])"
        }
      }
    },
    "labels": {
      "type": "object",
      "description": "Container labels as key-value pairs"
    }
  },
  "required": [
    "image"
  ]
}
— · —
create_networkCreate a Docker network
Input schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Network name"
    },
    "driver": {
      "type": "string",
      "description": "Network driver (bridge, overlay, host, etc.)",
      "default": "bridge"
    },
    "internal": {
      "type": "boolean",
      "description": "Restrict external access to the network",
      "default": false
    }
  },
  "required": [
    "name"
  ]
}
— · —
create_volumeCreate a Docker volume
Input schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Volume name"
    },
    "driver": {
      "type": "string",
      "description": "Volume driver",
      "default": "local"
    },
    "labels": {
      "type": "object",
      "description": "Labels as key-value pairs"
    }
  },
  "required": [
    "name"
  ]
}
— · —
disconnect_networkDisconnect a container from a network
Input schema
{
  "type": "object",
  "properties": {
    "networkId": {
      "type": "string",
      "description": "Network ID or name"
    },
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    },
    "force": {
      "type": "boolean",
      "description": "Force disconnect",
      "default": false
    }
  },
  "required": [
    "networkId",
    "containerId"
  ]
}
— · —
exec_containerExecute a command in a running container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    },
    "command": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Command to execute as an array (e.g., ['ls', '-la', '/app'])"
    },
    "workingDir": {
      "type": "string",
      "description": "Working directory for the command"
    },
    "env": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Environment variables as array of KEY=VALUE strings"
    }
  },
  "required": [
    "containerId",
    "command"
  ]
}
— · —
inspect_containerGet detailed information about a container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
inspect_networkGet detailed information about a network
Input schema
{
  "type": "object",
  "properties": {
    "networkId": {
      "type": "string",
      "description": "Network ID or name"
    }
  },
  "required": [
    "networkId"
  ]
}
— · —
inspect_volumeGet detailed information about a volume
Input schema
{
  "type": "object",
  "properties": {
    "volumeName": {
      "type": "string",
      "description": "Volume name"
    }
  },
  "required": [
    "volumeName"
  ]
}
— · —
list_containersList all Docker containers
Input schema
{
  "type": "object",
  "properties": {
    "all": {
      "type": "boolean",
      "description": "Show all containers (default shows just running)",
      "default": false
    }
  }
}
— · —
list_imagesList Docker images
Input schema
{
  "type": "object",
  "properties": {
    "all": {
      "type": "boolean",
      "description": "Show all images (default hides intermediate)",
      "default": false
    }
  }
}
— · —
list_networksList Docker networks
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
list_volumesList Docker volumes
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
pause_containerPause all processes within a container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
prune_containersRemove all stopped containers
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
prune_imagesRemove unused images
Input schema
{
  "type": "object",
  "properties": {
    "all": {
      "type": "boolean",
      "description": "Remove all unused images, not just dangling ones",
      "default": false
    }
  }
}
— · —
prune_networksRemove all unused networks
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
prune_volumesRemove all unused volumes
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
pull_imagePull a Docker image from a registry
Input schema
{
  "type": "object",
  "properties": {
    "image": {
      "type": "string",
      "description": "Image name with optional tag (e.g., 'nginx:latest')"
    }
  },
  "required": [
    "image"
  ]
}
— · —
push_imagePush an image to a Docker registry
Input schema
{
  "type": "object",
  "properties": {
    "image": {
      "type": "string",
      "description": "Image name with optional tag (e.g., 'myrepo/myimage:latest')"
    }
  },
  "required": [
    "image"
  ]
}
— · —
remove_containerRemove a Docker container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    },
    "force": {
      "type": "boolean",
      "description": "Force removal of running container",
      "default": false
    },
    "volumes": {
      "type": "boolean",
      "description": "Remove associated volumes",
      "default": false
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
remove_imageRemove a Docker image
Input schema
{
  "type": "object",
  "properties": {
    "image": {
      "type": "string",
      "description": "Image name or ID"
    },
    "force": {
      "type": "boolean",
      "description": "Force removal of the image",
      "default": false
    }
  },
  "required": [
    "image"
  ]
}
— · —
remove_networkRemove a Docker network
Input schema
{
  "type": "object",
  "properties": {
    "networkId": {
      "type": "string",
      "description": "Network ID or name"
    }
  },
  "required": [
    "networkId"
  ]
}
— · —
remove_volumeRemove a Docker volume
Input schema
{
  "type": "object",
  "properties": {
    "volumeName": {
      "type": "string",
      "description": "Volume name"
    },
    "force": {
      "type": "boolean",
      "description": "Force removal",
      "default": false
    }
  },
  "required": [
    "volumeName"
  ]
}
— · —
rename_containerRename a Docker container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or current name"
    },
    "newName": {
      "type": "string",
      "description": "New name for the container"
    }
  },
  "required": [
    "containerId",
    "newName"
  ]
}
— · —
restart_containerRestart a Docker container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    },
    "timeout": {
      "type": "number",
      "description": "Seconds to wait before killing the container",
      "default": 10
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
run_containerRun a container (create and start). This is the preferred method for starting containers.
Input schema
{
  "type": "object",
  "properties": {
    "image": {
      "type": "string",
      "description": "Docker image name (e.g., 'nginx:latest')"
    },
    "name": {
      "type": "string",
      "description": "Container name"
    },
    "command": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Command to run as an array (e.g., ['python', 'app.py'])"
    },
    "entrypoint": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Entrypoint as an array (e.g., ['/bin/bash', '-c'])"
    },
    "env": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Environment variables as array of KEY=VALUE strings (e.g., ['NODE_ENV=production', 'PORT=3000'])"
    },
    "exposedPorts": {
      "type": "object",
      "description": "Exposed ports as object with port/protocol keys (e.g., {'80/tcp': {}, '443/tcp': {}})"
    },
    "hostConfig": {
      "type": "object",
      "description": "Host configuration including port bindings and volumes",
      "properties": {
        "PortBindings": {
          "type": "object",
          "description": "Port bindings (e.g., {'80/tcp': [{'HostPort': '8080'}]})"
        },
        "Binds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Volume bindings as array (e.g., ['/host/path:/container/path'])"
        }
      }
    },
    "labels": {
      "type": "object",
      "description": "Container labels as key-value pairs"
    }
  },
  "required": [
    "image"
  ]
}
— · —
start_containerStart a stopped Docker container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
stop_containerStop a running Docker container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    },
    "timeout": {
      "type": "number",
      "description": "Seconds to wait before killing the container",
      "default": 10
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
system_infoGet Docker system information
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
system_versionGet Docker version information
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
tag_imageTag an image with a new name/tag
Input schema
{
  "type": "object",
  "properties": {
    "image": {
      "type": "string",
      "description": "Source image name or ID"
    },
    "repo": {
      "type": "string",
      "description": "Repository name for the tag"
    },
    "tag": {
      "type": "string",
      "description": "Tag name (e.g., 'latest', 'v1.0')",
      "default": "latest"
    }
  },
  "required": [
    "image",
    "repo"
  ]
}
— · —
unpause_containerUnpause all processes within a container
Input schema
{
  "type": "object",
  "properties": {
    "containerId": {
      "type": "string",
      "description": "Container ID or name"
    }
  },
  "required": [
    "containerId"
  ]
}
— · —
validate_connectionValidate Docker connection and test basic operations. Returns connection status, configuration details, and basic Docker information. Useful for troubleshooting connection issues.
Input schema
{
  "type": "object",
  "properties": {}
}
— · —

Resources 0

Resource templates 0

Prompts 0

Let’s talk about MCP security.

Share your details and our security team will contact you.