Skip to main content
Glama

mcp-server-docker

npm version npm downloads CI TypeScript License: MIT Agent Plugins

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.

MCP server for Docker containers, logs, and resource monitoring

Demo built with remotion-readme-kit

왜

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.

Related MCP server: Docker Manager MCP

도구

도구

설명

list_containers

실행 중(또는 전체) 컨테이너를 상태, 포트, 이미지 정보와 함께 나열합니다.

container_logs

컨테이너의 최근 로그를 가져옵니다.

start_container

중지된 컨테이너를 시작합니다.

stop_container

실행 중인 컨테이너를 중지합니다.

restart_container

컨테이너를 다시 시작합니다.

remove_container

컨테이너를 제거합니다(선택적으로 강제 제거 가능).

exec_command

실행 중인 컨테이너 내부에서 명령을 실행합니다.

container_stats

실시간 CPU, 메모리, 네트워크 통계를 가져옵니다.

list_images

호스트의 모든 Docker 이미지를 나열합니다.

remove_image

Docker 이미지를 제거합니다.

빠른 시작

Cursor

.cursor/mcp.json에 추가하세요:

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

Claude Desktop

claude_desktop_config.json에 추가하세요:

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

VS Code

사용자 설정 또는 .vscode/mcp.json에 추가하세요:

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

예시

  • "실행 중인 모든 Docker 컨테이너 나열"

  • "nginx 컨테이너의 로그를 보여 줘"

  • "api-server 컨테이너 다시 시작"

  • "내 postgres 컨테이너의 CPU 및 메모리 사용량은?"

  • "web 컨테이너 내부에서 ls -la /app 실행"

  • "모든 Docker 이미지와 크기 나열"

  • "이전 이미지를 사용하는 모든 컨테이너 중지"

사전 요구 사항

  • Docker가 머신에서 실행 중이어야 합니다.

  • 서버는 /var/run/docker.sock(Linux/macOS) 또는 Windows의 named pipe를 통해 Docker 소켓에 연결합니다.

  • API 키나 토큰이 필요 없습니다.

Agent Plugins

이 저장소는 Agent Plugins 1.0.0 패키지입니다. plugin.json, 이식 가능한 mcp.json, skills/가 MCP 서버와 함께 제공됩니다.

Cursor의 경우 저장소를 클론한 다음 ~/.cursor/plugins/local/mcp-server-docker로 복사하거나 심볼릭 링크를 만든 후 창을 다시 로드하세요. Skills와 MCP는 Customize > Plugins 아래에 표시됩니다.

위의 Cursor 및 VS Code 설치 버튼도 여전히 작동합니다. 수동 JSON과 동일한 npx -y mcp-docker-server stdio 서버를 추가합니다.

FAQ

mcp-docker-server란 무엇인가요?

이 MCP 서버의 npm 패키지입니다(저장소 이름 mcp-server-docker). 로컬 Docker 소켓과 통신하여 컨테이너 나열, 로그 추적, 명령 실행, 이미지 관리를 수행합니다.

Docker Desktop을 실행해야 하나요?

네. 데몬이 실행 중이어야 하며 MCP 프로세스가 docker.sock(또는 Windows named pipe)에 도달할 수 있어야 합니다.

프로덕션 컨테이너에 안전한가요?

stop/remove/restart를 파괴적인 작업으로 취급하세요. 프로덕션 워크로드를 변경하기 전에 사용자와 확인하세요.

Cursor에서 Agent Plugin으로 설치할 수 있나요?

네. 번들된 docker-management 스킬이 MCP 구성과 함께 로드되도록 ~/.cursor/plugins/local/mcp-server-docker를 사용하세요.

API 키가 필요한가요?

아니요. 로컬 Docker 액세스만 필요합니다.

개발

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

참고 항목

제 포트폴리오에서 더 많은 MCP 서버와 개발자 도구를 확인하세요.

저자

Made by ofershap

LinkedIn GitHub


README Builder로 작성된 README

라이선스

MIT © 2026 Ofer Shapira

Available Tools

10 tools
container_logsC

Get logs from a Docker container.

Inputs: id (required), tail.

container_statsA

Get CPU, memory, and network stats for a running Docker container.

Inputs: id (required).

exec_commandC

Execute a command inside a running Docker container.

Inputs: id (required), command (required).

list_containersB

List Docker containers. Set all=true to include stopped containers.

Inputs: all.

list_imagesB

List Docker images on the host.

Inputs: no named parameters.

remove_containerA

Remove a Docker container. Use force=true to remove running containers.

Inputs: id (required), force.

remove_imageB

Remove a Docker image. Use force=true to force removal.

Inputs: id (required), force.

restart_containerC

Restart a Docker container.

Inputs: id (required).

start_containerA

Start a stopped Docker container.

Inputs: id (required).

stop_containerC

Stop a running Docker container.

Inputs: id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific Docker operations: logs, stats, exec, listing containers/images, removal, restart, start, and stop. There is no overlap or ambiguity between tools, as each handles a unique action on a well-defined resource.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case (e.g., list_containers, remove_image, start_container). The naming is predictable and uniform across all tools, making them easily readable and systematic.

    Tool Count5/5

    With 10 tools, the server is well-scoped for Docker management, covering essential operations like lifecycle control (start, stop, restart), inspection (logs, stats, list), and cleanup (remove). Each tool earns its place without redundancy or bloat.

    Completeness4/5

    The toolset provides strong coverage for core Docker workflows, including CRUD-like operations for containers and images. A minor gap exists in creating or building images (e.g., build_image or pull_image), but agents can still perform most common tasks effectively with the available tools.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage Docker containers, deploy stacks, and monitor services across multiple Docker hosts from one centralized location. Supports container lifecycle management, Docker Compose operations, and infrastructure orchestration through natural language commands.
      6
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage Docker containers, images, networks, volumes, and Compose services through the Model Context Protocol. It supports system operations, command execution within containers, and integration with Docker Hub and GitHub Container Registry.
      94 npm
      2
      MIT