MCP Server Docker logo

MCP Server Docker

by ofershap

Manage a local Docker daemon through MCP by inspecting containers, reading logs, running commands, and controlling images.

Install MCP Server Docker

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "ofershap-mcp-server-docker": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-docker-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The ofershap/mcp-server-docker MCP server exposes local Docker operations to MCP-compatible coding assistants. It connects through Docker's local socket on Linux and macOS, or the Windows named pipe, without API keys. Use it to inspect containers and images, retrieve logs, execute commands, monitor resources, and start, stop, restart, or remove containers. It fits development workflows where Docker checks and routine container actions need to be performed from an AI assistant.

Use cases

  • Inspect running containers and their exposed ports
  • Read recent logs from a failing container
  • Restart a stuck development container
  • Execute diagnostic commands inside a running container
  • Check live CPU, memory, and network usage

Key features

  • List running or all Docker containers
  • Read recent container logs
  • Start, stop, restart, or remove containers
  • Execute commands inside running containers
  • View live container resource statistics
  • List and remove Docker images

Tools10

What MCP Server Docker lets your agent do. Expand a tool for its parameters.

Self-reported~122 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

21/22 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · mcp-docker-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
npm downloads571Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Tools exposed10Callable tools this server registers over MCP.
Directory activity1 installsConfig copies, upvotes, and views on AllMCPs.

How MCP Server Docker works

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:

Terminal
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.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Server Docker

ofershap/mcp-server-docker is an MCP server that connects an AI coding assistant to the local Docker daemon through its socket or Windows named pipe. Its main tools list containers and images, read logs, start, stop, restart, or remove containers, execute commands, and view live CPU, memory, and network statistics.

Run `npx mcp-docker-server` and add that command to your MCP client configuration. Use `npx` with the arguments `-y mcp-docker-server` in Cursor, Claude Desktop, VS Code, or another client that supports local stdio MCP servers.

It requires a running Docker daemon and access to the local Docker socket or Windows named pipe, but it does not require API keys or tokens. On Linux and macOS, the documented socket is `/var/run/docker.sock`.

Yes, its tools can restart or remove containers, including optional force removal. Those operations are destructive and should be confirmed before use on production workloads.

Yes, it works with Cursor through a stdio entry in `.cursor/mcp.json`. The repository also documents an optional Cursor Agent Plugin installation that loads its MCP configuration and bundled `docker-management` skill.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Server Docker AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ofershap-mcp-server-docker?style=directory)](https://allmcps.com/mcp/ofershap-mcp-server-docker)
HTML Embed
<a href="https://allmcps.com/mcp/ofershap-mcp-server-docker"><img src="https://allmcps.com/api/badge/ofershap-mcp-server-docker?style=directory" alt="MCP Server Docker on AllMCPs" /></a>