io.github.ofershap/docker

السجل الرسمي أدوات المطورين

MCP server for Docker — manage containers, images, volumes, and compose services from your IDE

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package mcp-docker-server
Claude Code
claude mcp add docker -- npx -y mcp-docker-server@1.0.1
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "docker": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-docker-server@1.0.1"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. mcp-server-docker
  2. Why
  3. Tools
  4. Quick Start
  5. Examples
  6. Prerequisites
  7. Agent Plugins
  8. FAQ
  9. Development
  10. See also
  11. Author
  12. License

mcp-server-docker

Control Docker containers, images, and services from your AI coding assistant. List, start, stop, read logs, run commands inside containers, and check resource usage.

npx mcp-docker-server

Compatible with Claude Desktop, Cursor, VS Code Copilot, and any MCP-compatible client. No API keys needed. Connects to your local Docker socket automatically.

Demo built with remotion-readme-kit

Why

If you work with Docker daily, you know the routine: switch to a terminal, type docker ps, scroll through logs, copy container IDs, restart services. It adds up. This MCP server lets your AI assistant handle those tasks for you while you stay focused on code. Ask it to check which containers are running, pull up logs from a failing service, or restart something that got stuck. It talks to Docker's API through the local socket, so there's nothing to configure and no credentials to manage.

Tools

ToolWhat it does
list_containersList running (or all) containers with status, ports, and image info
container_logsGet recent logs from a container
start_containerStart a stopped container
stop_containerStop a running container
restart_containerRestart a container
remove_containerRemove a container (with optional force)
exec_commandExecute a command inside a running container
container_statsGet live CPU, memory, and network stats
list_imagesList all Docker images on the host
remove_imageRemove a Docker image

Quick Start

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["-y", "mcp-docker-server"]
    }
  }
}
Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["-y", "mcp-docker-server"]
    }
  }
}
VS Code

Add to user settings or .vscode/mcp.json:

{
  "mcp": {
    "servers": {
      "docker": {
        "command": "npx",
        "args": ["-y", "mcp-docker-server"]
      }
    }
  }
}

Examples

  • "List all running Docker containers"
  • "Show me the logs from the nginx container"
  • "Restart the api-server container"
  • "What's the CPU and memory usage of my postgres container?"
  • "Execute ls -la /app inside the web container"
  • "List all Docker images and their sizes"
  • "Stop all containers that are using the old image"

Prerequisites

  • Docker must be running on your machine
  • The server connects to the Docker socket at /var/run/docker.sock (Linux/macOS) or the named pipe on Windows
  • No API keys or tokens required

Agent Plugins

This repo is an Agent Plugins 1.0.0 package: plugin.json, portable mcp.json, and skills/ ship together with the MCP server.

For Cursor, clone the repo and copy or symlink it to ~/.cursor/plugins/local/mcp-server-docker, then reload the window. Skills and MCP show up under Customize > Plugins.

The Cursor and VS Code install buttons above still work: they add the same npx -y mcp-docker-server stdio server as manual JSON.

FAQ

What is mcp-docker-server?

The npm package for this MCP server (repo name mcp-server-docker). It talks to your local Docker socket to list containers, tail logs, exec commands, and manage images.

Do I need Docker Desktop running?

Yes. The daemon must be up and the MCP process must reach docker.sock (or the Windows named pipe).

Is this safe for production containers?

Treat stop/remove/restart as destructive. Confirm with the user before changing production workloads.

Can I install it as an Agent Plugin in Cursor?

Yes. Use ~/.cursor/plugins/local/mcp-server-docker so the bundled docker-management skill loads with the MCP config.

Do I need API keys?

No. Only local Docker access.

Development

git clone https://github.com/ofershap/mcp-server-docker.git
cd mcp-server-docker
npm install
npm test
npm run build

See also

More MCP servers and developer tools on my portfolio.

Author


README built with README Builder

License

MIT © 2026 Ofer Shapira

الأسئلة الشائعة

ما هو io.github.ofershap/docker؟

MCP server for Docker — manage containers, images, volumes, and compose services from your IDE

كيف أثبّت io.github.ofershap/docker؟

يعمل على جهازك. في Claude Code: claude mcp add docker -- npx -y mcp-docker-server@1.0.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.ofershap/docker إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.ofershap/docker مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.ofershap/docker؟

ينشره ofershap. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.