rog0x

mcp-docker-tools

Community rog0x
Updated

MCP server for Docker: list containers/images, analyze Dockerfiles and docker-compose, view container logs

mcp-docker-tools

Docker management tools for AI agents, built on the Model Context Protocol.

Provides five tools for inspecting containers, images, Dockerfiles, and Compose configurations โ€” all accessible to LLMs through MCP.

Tools

Tool Description
docker_container_list List running or all containers with status, ports, image, created time, and resource usage (CPU, memory, network/block I/O)
docker_image_list List Docker images with size, tags, created date, and layer count
docker_dockerfile_analyze Analyze a Dockerfile for best practices: multi-stage builds, non-root user, layer caching, image size, security
docker_compose_analyze Analyze docker-compose.yml: services, ports, volumes, networks, health checks, dependencies, and improvement suggestions
docker_container_logs Get container logs with tail, keyword filter, time range, and timestamp support

Prerequisites

  • Node.js >= 18
  • Docker CLI installed and accessible in PATH
  • Docker daemon running (for container/image tools)

Installation

git clone <repo-url>
cd mcp-docker-tools
npm install
npm run build

Usage with Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "docker-tools": {
      "command": "node",
      "args": ["D:/products/mcp-servers/mcp-docker-tools/dist/index.js"]
    }
  }
}

Usage with Claude Code

claude mcp add docker-tools node D:/products/mcp-servers/mcp-docker-tools/dist/index.js

Or add to .claude/settings.json:

{
  "mcpServers": {
    "docker-tools": {
      "command": "node",
      "args": ["D:/products/mcp-servers/mcp-docker-tools/dist/index.js"]
    }
  }
}

Tool Examples

List running containers

{ "tool": "docker_container_list" }

List all containers including stopped

{ "tool": "docker_container_list", "args": { "all": true, "format": "table" } }

List images filtered by name

{ "tool": "docker_image_list", "args": { "filter": "node" } }

Analyze a Dockerfile

{
  "tool": "docker_dockerfile_analyze",
  "args": {
    "content": "FROM node:20\nCOPY . .\nRUN npm install\nCMD [\"node\", \"index.js\"]"
  }
}

Analyze docker-compose.yml

{
  "tool": "docker_compose_analyze",
  "args": {
    "content": "services:\n  web:\n    image: nginx\n    ports:\n      - 80:80"
  }
}

Get container logs

{
  "tool": "docker_container_logs",
  "args": { "container": "my-app", "tail": 50, "filter": "error" }
}

License

MIT

MCP Server ยท Populars

MCP Server ยท New

    globau

    Firefox DevTools MCP

    Model Context Protocol server for Firefox DevTools - enables AI assistants to inspect and control Firefox browser through the Remote Debugging Protocol

    Community globau
    nukeop

    nuclear

    Streaming music player that finds free music for you

    Community nukeop
    qualixar

    SuperLocalMemory V3

    World's first local-only AI memory to break 74% retrieval and 60% zero-LLM on LoCoMo. No cloud, no APIs, no data leaves your machine. Additionally, mode C (LLM/Cloud) - 87.7% LoCoMo. Research-backed. arXiv: 2603.14588

    Community qualixar
    proxy-intell

    Facebook Ads Library MCP Server

    MCP Server for Facebook ADs Library - Get instant answers from FB's ad library

    Community proxy-intell
    genkit-ai

    Genkit MCP

    Open-source framework for building AI-powered apps in JavaScript, Go, and Python, built and used in production by Google

    Community genkit-ai