# Docker MCP server

> Lets an AI assistant manage Docker containers, images, volumes, and services by interacting with your local Docker socket.

- Repository: https://github.com/ofershap/mcp-server-docker
- Page: https://hostedmcp.org/servers/ofershap/mcp-server-docker
- Transport: stdio
- Stars: 4
- License: MIT
- Latest version: 1.0.1

## Install

### Claude Code

```sh
claude mcp add mcp-server-docker -- npx -y mcp-docker-server
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp-server-docker": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-docker-server"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp-server-docker": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-docker-server"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp-server-docker","type":"stdio","command":"npx","args":["-y","mcp-docker-server"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp-server-docker": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-docker-server"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add mcp-server-docker -- npx -y mcp-docker-server
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp-server-docker]
command = "npx"
args = ["-y", "mcp-docker-server"]
```

### Gemini CLI

```sh
gemini mcp add -s user mcp-server-docker npx -- -y mcp-docker-server
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp-server-docker": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-docker-server"
      ]
    }
  }
}
```

## Tools (10)

- `list_containers`
- `container_logs`
- `start_container`
- `stop_container`
- `restart_container`
- `remove_container`
- `exec_command`
- `container_stats`
- `list_images`
- `remove_image`

## FAQ

### Do I need API keys?

No, the server only requires local Docker access through your local socket.

### Do I need Docker Desktop running?

Yes, the Docker daemon must be running and the MCP process must be able to reach the Docker socket or Windows named pipe.

### Is this safe for production containers?

You should treat stop, remove, and restart actions as destructive and confirm with the user before modifying production workloads.

### Can I install it as an Agent Plugin in Cursor?

Yes, you can install it in the local plugins directory so the bundled docker-management skill loads with the configuration.
