mcpField
@
@rog0x/mcp-docker-tools

@rog0x/mcp-docker-tools

Local
github.com/rog0xCloud & Infra1Updated 32w ago

About @rog0x/mcp-docker-tools

@rog0x/mcp-docker-tools is an MCP server for AI agents to inspect Docker containers and images, analyze Dockerfiles and Compose configurations, and retrieve container logs.

Key features

  1. 01List container status and resource use
  2. 02View image sizes and layer counts
  3. 03Analyze Dockerfile practices and security
  4. 04Inspect Compose service configuration
  5. 05Filter and retrieve container logs

Use cases

  1. 01Check running or stopped containers
  2. 02Review image details and size
  3. 03Assess Dockerfiles and Compose files
  4. 04Find matching entries in container logs

MCP support

The server exposes five Docker inspection and analysis tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"docker-tools": {
"command": "npx",
"args": [
"-y",
"@rog0x/mcp-docker-tools"
]
}
}
}
Run commandnpx -y @rog0x/mcp-docker-tools

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@rog0x/mcp-docker-tools1.0.1

Tools

5

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
allbooleanNoIf true, show all containers including stopped ones. Defaults to false (running only).
formatenumNoOutput format: 'table' for readable text, 'json' for structured data. Defaults to 'json'.table | json

Details

From the project README

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

ToolDescription
docker_container_listList running or all containers with status, ports, image, created time, and resource usage (CPU, memory, network/block I/O)
docker_image_listList Docker images with size, tags, created date, and layer count
docker_dockerfile_analyzeAnalyze a Dockerfile for best practices: multi-stage builds, non-root user, layer caching, image size, security
docker_compose_analyzeAnalyze docker-compose.yml: services, ports, volumes, networks, health checks, dependencies, and improvement suggestions
docker_container_logsGet 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.