docker-mcp-server

docker-mcp-server

Enables AI agents to manage Docker containers, images, Compose stacks, health checks, and logs through a unified MCP interface, ensuring containers stay running with self-healing capabilities.

Category
Visit Server

README

@supernova123/docker-mcp-server

npm version npm downloads License: MIT MCP Claude Desktop

The Docker MCP server designed for agents that need their containers to stay running.

Without this: Your agent deploys a container, it crashes at 3am, and nobody notices until the user complains. Compose stacks drift. Health checks are manual. Logs are scattered across terminals.

With this: Your agent checks health, watches for readiness, restarts crashed containers, and follows logs, all through a single MCP interface. Containers stay running because your agent knows how to keep them running.

Why This Server?

There are 11+ Docker MCP servers on npm. Most are stale, GPL-licensed, or only cover basic CRUD. This one is different:

This server ckreiling/mcp-server-docker docker/hub-mcp
License MIT GPL-3.0 Apache-2.0
Last updated Active Jun 2025 (stale) Active
Health checks ✅ HTTP/TCP/exec probes
Auto-restart ✅ set_restart_policy
Compose lifecycle ✅ up/down/ps/logs/restart
Log streaming ✅ tail + timestamp filter Basic Basic
Agent positioning ✅ Built for agents Generic Docker Registry API

Quick Start

One command to run:

npx @supernova123/docker-mcp-server

Claude Desktop / Cursor / VS Code Config

Add to your MCP settings:

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["-y", "@supernova123/docker-mcp-server"]
    }
  }
}

Claude Code

claude mcp add docker -- npx -y @supernova123/docker-mcp-server

Tools

Container Lifecycle

Tool Description
list_containers List containers with filters (state, label, name)
inspect_container Get detailed container config and state
start_container Start a stopped container
stop_container Stop a running container
restart_container Restart a container
remove_container Remove a container (with force option)
recreate_container Stop, remove, and re-create a container with same config
run_container Create + start a container in one call

Image Management

Tool Description
list_images List images with optional filters
pull_image Pull an image from a registry
build_image Build an image from a Dockerfile
remove_image Remove an image

Docker Compose

Tool Description
compose_up Bring up a Compose stack
compose_down Tear down a Compose stack
compose_ps List service states
compose_logs Tail Compose service logs
compose_restart Restart Compose services

Health & Self-Healing

Tool Description
check_health Run a health probe (HTTP, TCP, exec)
watch_health Poll health until healthy or timeout
set_restart_policy Change restart policy on a running container

Logs & Observability

Tool Description
stream_logs Get container logs with tail/timestamp filtering
container_stats CPU, memory, network, block I/O snapshot

Exec

Tool Description
exec_in_container Run a command inside a running container

Networks & Volumes

Tool Description
list_networks List Docker networks
list_volumes List Docker volumes

Requirements

  • Node.js 18+
  • Docker daemon running locally (or remote via DOCKER_HOST)
  • Docker socket accessible at /var/run/docker.sock

Security

  • Read-only by default: all container and image tools read state; write operations (start/stop/remove) require explicit tool calls
  • No API keys needed: connects to local Docker daemon via socket
  • No network access: all operations are local Docker API calls
  • MIT License: fully auditable

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured