# ofershap/mcp-server-docker [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/ofershap/mcp-server-docker  
**GitHub Stars:** 4  
**npm Downloads (last month):** 571  
**Views:** 4  
**Installs:** 1  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ofershap-mcp-server-docker

## Description
Docker operations — manage containers, images, volumes, networks, and compose services.

## Tools
Capabilities this server exposes over MCP:

- **list_containers** — List running (or all) containers with status, ports, and image info
- **container_logs** — Get recent logs from a container
- **start_container** — Start a stopped container
- **stop_container** — Stop a running container
- **restart_container** — Restart a container
- **remove_container** — Remove a container (with optional force)
- **exec_command** — Execute a command inside a running container
- **container_stats** — Get live CPU, memory, and network stats
- **list_images** — List all Docker images on the host
- **remove_image** — Remove a Docker image

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

## What ofershap/mcp-server-docker MCP server does

The ofershap/mcp-server-docker MCP server gives an MCP-compatible client access to a local Docker daemon. It is intended for developers who want an AI coding assistant to inspect and operate Docker resources without switching to a terminal for each routine task.

The available operations cover container inspection and lifecycle management, command execution, resource monitoring, and image listing or removal. A client can request running containers or all containers, inspect status, ports, and image information, retrieve recent logs, and view live CPU, memory, and network statistics.

Container changes are also supported. The tools can start stopped containers, stop running containers, restart containers, remove containers with an optional force setting, and execute a command inside a running container. Image operations are narrower: the server can list images on the host and remove an image.

## How it works

The ofershap/mcp-server-docker MCP server runs as a local stdio process and communicates with the Docker daemon through the host's Docker socket. On Linux and macOS, the documented socket path is `/var/run/docker.sock`; on Windows, the server uses Docker's named pipe. The Docker daemon must be running, and the MCP process must have permission to reach that endpoint.

No API keys, tokens, or remote service credentials are required. The assistant sends MCP tool requests, and the server performs the corresponding operation against the local Docker installation. This means the target containers, images, logs, and statistics are those available to the machine running the server.

Because several tools change Docker state, treat them as operational controls rather than read-only inspection. Stopping, restarting, or removing a production container can interrupt workloads or delete resources, so these actions should be confirmed before execution.

## Setup and configuration

The simplest installation runs the published npm package with `npx`:

```bash
npx mcp-docker-server
```

A client configuration needs a server entry with `npx` as the command and `-y mcp-docker-server` as its arguments. The README provides configurations for Cursor, Claude Desktop, and VS Code. The same stdio configuration can be used by other MCP-compatible clients that support local command-based servers.

Before connecting a client, start Docker and verify that the MCP process can access the Docker socket or Windows named pipe. There are no environment variables or API credentials documented for setup.

The repository also describes an Agent Plugin layout for Cursor. Cloning the repository and placing or symlinking it at `~/.cursor/plugins/local/mcp-server-docker` loads the bundled MCP configuration and `docker-management` skill after reloading Cursor.

## Tools and capabilities

The ofershap/mcp-server-docker MCP server exposes these tools:

- `list_containers`: List running containers or all containers with status, ports, and image details.
- `container_logs`: Retrieve recent logs from a selected container.
- `start_container`, `stop_container`, and `restart_container`: Change a container's running state.
- `remove_container`: Remove a container, with optional force behavior.
- `exec_command`: Run a command inside a running container.
- `container_stats`: Read live CPU, memory, and network statistics.
- `list_images`: List Docker images on the host.
- `remove_image`: Remove a Docker image.

These capabilities support tasks such as diagnosing a failing service from its logs, checking resource use, restarting a stuck development container, or reviewing local image inventory.

## Limitations and notes

This server depends on a reachable local Docker daemon; it is not described as a remote Docker management service. Its access is bounded by the permissions available to the Docker socket or Windows named pipe. The documented tool set does not include image pulling, image building, container creation, volume management, network management, or Docker Compose commands.

The destructive tools require care. In particular, `stop_container`, `restart_container`, `remove_container`, and `remove_image` can affect active development or production resources. Review the target before allowing an assistant to perform these actions.

_Full upstream README: https://allmcps.com/mcp/ofershap-mcp-server-docker/readme_

