Docker Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Docker Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<div align="center"> <img src="https://raw.githubusercontent.com/alisaitteke/docker-mcp/develop/social_preview.png" alt="Docker MCP Server" width="600"/> </div>
<div align="center">
Powerful Docker management for AI assistants
</div>
A comprehensive Model Context Protocol (MCP) server that empowers AI assistants like Cursor, Claude Desktop, and other MCP-compatible clients to seamlessly manage Docker containers, images, networks, volumes, and registries through natural language interactions.
npx, no installation needednpx @alisaitteke/docker-mcpnpm install -g @alisaitteke/docker-mcpOr install locally in your project:
npm install @alisaitteke/docker-mcp.cursor/mcp.json or similar):{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["@alisaitteke/docker-mcp"]
}
}
}~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["@alisaitteke/docker-mcp"]
}
}
}git clone <repository-url>
cd docker-mcpnpm installnpm run build#### Method 1: Using npm start (after build)
# Build first
npm run build
# Run the server
npm start#### Method 2: Using npm run dev (development mode with tsx)
npm run devThis uses tsx to run TypeScript directly without building.
#### Method 3: Direct execution
# Build first
npm run build
# Run directly with node
node dist/index.js#### Method 4: Using the binary
# Build first
npm run build
# Make sure the binary is executable
chmod +x bin/docker-mcp-server.js
# Run the binary
./bin/docker-mcp-server.jssrc/npm run buildnpm start
# or
npm run devnpm run typechecknpm run lintDocker connection issues:
docker psls -la /var/run/docker.sockDOCKER_HOST, DOCKER_CERT_PATH, etc./var/run/docker.sock doesn't exist, try ~/.docker/run/docker.sock (Docker Desktop 4.0+)Build errors:
rm -rf node_modules && npm installnpm installRuntime errors:
docker versionls -la dist/The server automatically detects the operating system and uses the appropriate Docker socket path:
/var/run/docker.sock (Unix socket)/var/run/docker.sock or ~/.docker/run/docker.sock (Docker Desktop 4.0+)//./pipe/docker_engine (Named pipe)DOCKER_HOST - Docker daemon host (e.g., tcp://localhost:2376, npipe:////./pipe/docker_engine)DOCKER_PORT - Docker daemon portDOCKER_PROTOCOL - Protocol (http or https)DOCKER_SOCKET_PATH - Path to Docker socket (overrides platform default)DOCKER_CERT_PATH - Path to Docker certificates directoryDOCKER_TLS_VERIFY - Enable TLS verification (1 or 0)/var/run/docker.sock/var/run/docker.sock (or ~/.docker/run/docker.sock if available)//./pipe/docker_engineOn Windows, Docker Desktop uses named pipes. The server automatically detects Windows and uses the correct path. You can also explicitly set:
# Using environment variable
set DOCKER_SOCKET_PATH=//./pipe/docker_engine
# Or using DOCKER_HOST
set DOCKER_HOST=npipe:////./pipe/docker_engineTo connect to a remote Docker host:
# Linux/macOS
export DOCKER_HOST=tcp://192.168.1.100:2376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/path/to/certs
# Windows
set DOCKER_HOST=tcp://192.168.1.100:2376
set DOCKER_TLS_VERIFY=1
set DOCKER_CERT_PATH=C:\path\to\certsdocker_list_containers - List all containersdocker_create_container - Create a new containerdocker_start_container - Start a containerdocker_stop_container - Stop a containerdocker_restart_container - Restart a containerdocker_kill_container - Kill a containerdocker_remove_container - Remove a containerdocker_inspect_container - Get container detailsdocker_container_logs - Get container logsdocker_container_stats - Get container statisticsdocker_pause_container - Pause a containerdocker_unpause_container - Unpause a containerdocker_list_images - List all imagesdocker_pull_image - Pull an image from registrydocker_push_image - Push an image to registrydocker_tag_image - Tag an imagedocker_remove_image - Remove an imagedocker_inspect_image - Get image detailsdocker_image_history - Get image historydocker_list_networks - List all networksdocker_create_network - Create a networkdocker_remove_network - Remove a networkdocker_inspect_network - Get network detailsdocker_connect_container - Connect container to networkdocker_disconnect_container - Disconnect container from networkdocker_list_volumes - List all volumesdocker_create_volume - Create a volumedocker_remove_volume - Remove a volumedocker_inspect_volume - Get volume detailsdocker_system_info - Get Docker system informationdocker_version - Get Docker versiondocker_prune_system - Prune all unused resourcesdocker_prune_images - Prune unused imagesdocker_prune_containers - Prune stopped containersdocker_prune_volumes - Prune unused volumesdocker_prune_networks - Prune unused networksdocker_exec - Execute a command in a containerdocker_inspect_exec - Get exec instance detailsdocker_compose_up - Start Docker Compose servicesdocker_compose_down - Stop and remove Docker Compose servicesdocker_compose_ps - List Docker Compose servicesdocker_compose_logs - View output from Docker Compose servicesdocker_compose_config - Parse and validate docker-compose.yml filedocker_compose_build - Build Docker Compose servicesdocker_compose_restart - Restart Docker Compose servicesdocker_compose_stop - Stop Docker Compose servicesdocker_compose_start - Start Docker Compose servicesdockerhub_search - Search Docker Hubdockerhub_get_tags - Get repository tags from Docker Hubdockerhub_authenticate - Authenticate with Docker Hubdockerhub_pull - Pull from Docker Hubdockerhub_push - Push to Docker Hubghcr_authenticate - Authenticate with GitHub Container Registryghcr_pull - Pull from GHCRghcr_push - Push to GHCR{
"name": "docker_list_containers",
"arguments": {
"all": false
}
}{
"name": "docker_create_container",
"arguments": {
"image": "nginx:latest",
"name": "my-nginx",
"ports": {"80/tcp": {}}
}
}Then start it:
{
"name": "docker_start_container",
"arguments": {
"id": "my-nginx"
}
}{
"name": "docker_pull_image",
"arguments": {
"name": "ubuntu:20.04"
}
}{
"name": "dockerhub_search",
"arguments": {
"query": "node",
"limit": 10
}
}{
"name": "docker_exec",
"arguments": {
"containerId": "my-container",
"cmd": ["ls", "-la"],
"tty": false
}
}{
"name": "docker_compose_up",
"arguments": {
"projectDir": "/path/to/compose/project",
"detach": true,
"build": true
}
}{
"name": "docker_compose_logs",
"arguments": {
"projectDir": "/path/to/compose/project",
"follow": false,
"tail": 100
}
}All destructive operations (remove, kill, prune) support two confirmation methods:
#### Method 1: Confirm Parameter (Default - Works Everywhere)
Step 1: Preview (without confirm)
{
"name": "docker_remove_volume",
"arguments": {
"name": "my-volume"
}
}This returns volume details and a warning message.
Step 2: Confirm (with confirm=true)
{
"name": "docker_remove_volume",
"arguments": {
"name": "my-volume",
"confirm": true
}
}This actually removes the volume.
#### Method 2: MCP Elicitation API (Advanced - Better UX)
If your MCP client (Cursor, Claude Desktop) supports Elicitation API, you can use interactive confirmation:
{
"name": "docker_remove_volume",
"arguments": {
"name": "my-volume",
"useElicitation": true
}
}This will show an interactive confirmation dialog in the client (if supported). The client will display a form asking for confirmation, and the operation proceeds only if the user accepts.
Note: Elicitation API support depends on the MCP client. If the client doesn't support it, the server automatically falls back to the confirm parameter method.
Operations requiring confirmation:
docker_remove_volume - Remove volumesdocker_remove_container - Remove containersdocker_kill_container - Kill containersdocker_remove_image - Remove imagesdocker_remove_network - Remove networksdocker_prune_system - Prune all unused resourcesdocker_prune_images - Prune unused imagesdocker_prune_containers - Prune stopped containersdocker_prune_volumes - Prune unused volumesdocker_prune_networks - Prune unused networksnpm run build./test-server.shOr test manually:
# The server will exit with error if Docker is not accessible
node dist/index.jsIf Docker is running, you should see:
Docker MCP Server running on stdioecho '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js | jqNote: The server communicates via stdio, so it will wait for JSON-RPC requests. Press Ctrl+C to exit.
npm run build
npm startdocker_list_containers tooldocker_system_info toolFor full integration testing, you'll need an MCP client. The server communicates via stdio (standard input/output), so it's designed to work with MCP-compatible clients like:
Enable verbose logging by checking stderr output. The server writes errors and status messages to stderr:
# Run and capture stderr
node dist/index.js 2> debug.log/var/run/docker.sock//./pipe/docker_engine# Clone and setup
git clone <repository-url>
cd docker-mcp
npm install
# Build
npm run build
# Test
./test-server.sh
# Run
npm start
# or for development
npm run devMIT
If you're developing locally and want to test with Cursor:
npm run build.cursor/mcp.json or similar):{
"mcpServers": {
"docker": {
"command": "node",
"args": ["/absolute/path/to/docker-mcp/dist/index.js"]
}
}
}Or if using the binary:
{
"mcpServers": {
"docker": {
"command": "/absolute/path/to/docker-mcp/bin/docker-mcp-server.js"
}
}
}If you're developing locally and want to test with Claude Desktop:
npm run build~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"docker": {
"command": "node",
"args": ["/absolute/path/to/docker-mcp/dist/index.js"]
}
}
}You can test the server using MCP Inspector or any MCP client:
# Build first
npm run build
# The server communicates via stdio, so you can pipe commands to it
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.jsContributions are welcome! Please feel free to submit a Pull Request.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.