docker-mcp-operations

Rules for managing Docker through an MCP server, including containers and Docker Compose stacks. Docker packages applications and their dependencies into runnable containers; Docker Compose manages groups of containers.

In plain words
What is it for?
Use it when creating or listing containers, retrieving container logs, or deploying Docker Compose services.
Why use it?
It provides a defined workflow for creating containers, checking logs, and deploying multi-service applications through the configured tool.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/rm2thaddeus/pixel_detective/docker-mcp-operations
Clone the repo
git clone --depth 1 https://github.com/rm2thaddeus/Pixel_Detective

Made for: Cursor.

Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,090 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00007 $0.01090
Opus 5 $0.00003 $0.00545
Sonnet 5 $0.00001 $0.00218
Haiku 4.5 $0.00001 $0.00109

Measured 3d ago against content hash 44f3014846cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docker-mcp-operations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/docker-mcp-operations.mdc · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker MCP Operations

Reference: Follow @use-mcp-servers for general MCP workflows and @powershell-syntax for terminal commands

Docker MCP Server Configuration

Claude Desktop Setup

Add to your Claude Desktop config file:

  • Windows: %APPDATA%/Claude/claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "docker-mcp": {
      "command": "uvx",
      "args": ["docker-mcp"]
    }
  }
}

Available Docker MCP Tools

1. Container Management

  • create-container: Create standalone Docker containers
  • list-containers: List all Docker containers with status
  • get-logs: Retrieve logs from specific containers

2. Docker Compose Operations

  • deploy-compose: Deploy Docker Compose stacks
  • Stack Management: Manage multi-service applications

Docker MCP Workflows

Container Creation Workflow

{
  "image": "nginx:latest",
  "name": "web-server",
  "ports": {"80": "8080"},
  "environment": {"ENV_VAR": "production"}
}

Compose Stack Deployment

{
  "project_name": "pixel-detective-stack",
  "compose_yaml": "version: '3.8'\nservices:\n  app:\n    image: node:18\n    ports:\n      - '3000:3000'"
}

Log Analysis Pattern

{
  "container_name": "web-server"
}

Best Practices for Docker MCP

Development Workflow

  1. Plan Architecture: Define services, networks, and volumes needed
  2. Start Small: Begin with single containers before compose stacks
  3. Monitor Logs: Use get-logs for debugging and monitoring
  4. Version Control: Store compose files in repository with proper documentation

Container Naming Conventions

  • Project Prefix: pixel-detective-web, pixel-detective-api
  • Environment Suffix: -dev, -staging, -prod
  • Service Description: Clear, descriptive names

Port Management

  • Development: Use high ports (8000+) to avoid conflicts
  • Documentation: Always document port mappings in project docs
  • Consistency: Use same ports across environments when possible

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 148 lines · 7 tokens per session scan A 44f3014846cb

Subscribe to this mod's changes

docker-mcp-operations is a cursor rule published in the GitHub repository rm2thaddeus/Pixel_Detective (21 stars, last pushed 7mo ago), licensed MIT. It adds 7 tokens to every session and 1,090 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.