Skip to main content
Glama
thargy
by thargy

Docker MCP Server (docker-mcp)

Node.js Version License: MIT Architecture: Deep Module TypeScript

Model Context Protocol (MCP) server로, Docker Engine 및 Docker Compose 환경을 검사하고, 오케스트레이션하며, 문제를 해결하는 데 유용한 고효율 도구를 제공합니다.

@thargy/mcp-server-core를 기반으로 하며, John Ousterhout의 Deep Module 철학(A Philosophy of Software Design)을 따릅니다.


1. 아키텍처 비전: Deep Module vs. 도구 비대화

전통적인 MCP 서버는 Docker CLI 동사를 1:1로 매핑하여 LLM 컨텍스트 윈도우를 비대하게 만들고(턴당 4,000개 이상의 프롬프트 토큰 소모) 환각을 증가시키는 25개 이상의 얕은 도구를 만들어냅니다.

docker-mcp는 다형적 타입의 액션 판별자(action discriminator)를 통해 정확히 6개의 통합된 고효율 도구를 제공하며, <1,000 토큰만을 소모합니다.

graph LR
    subgraph Clients ["MCP Clients"]
        Claude["Claude Desktop (Stdio)"]
        Agent["Antigravity / Coding Agents"]
        Gateway["mcp-gateway (SSE / Streamable HTTP)"]
    end

    subgraph DeepModule ["docker-mcp (Deep Module)"]
        T1["docker_containers"]
        T2["docker_compose"]
        T3["docker_images"]
        T4["docker_volumes"]
        T5["docker_networks"]
        T6["docker_system"]
        
        Seam["IDockerClient Seam"]
        Engine["DockerodeClient / InMemoryDockerClient"]
    end

    subgraph Host ["Docker Infrastructure"]
        Socket["/var/run/docker.sock"]
        RemoteTCP["tcp://remote-host:2376"]
        RemoteSSH["ssh://user@remote-host"]
    end

    Clients --> DeepModule
    DeepModule --> Seam
    Seam --> Engine
    Engine --> Host

2. 통합 MCP 도구 카탈로그

도구

Actions

기능 및 주요 특징

docker_containers

list, inspect, start, stop, restart, logs, stats, exec, remove

이름/상태 정규식 필터링, 실시간 CPU/RAM 계산, stdout/stderr 멀티플렉스 로그 추출, 명령 실행, 안전한 타임아웃.

docker_compose

ps, up, down, restart, logs

라벨/디렉터리 기반 멀티 컨테이너 스택 탐지, 수명 주기 오케스트레이션, 헬스체크 준비 상태 확인.

docker_images

list, inspect, pull, prune, remove

이미지 인벤토리, 가상 크기 포맷, 태그 변환, 댕글링(dangling) 이미지 정리.

docker_volumes

list, inspect, create, prune, remove

영구 볼륨 카탈로그, 드라이버 검사, 고아 볼륨 정리.

docker_networks

list, inspect, create, prune, remove

브리지, 오버레이, macvlan 네트워크 토폴로지 검사 및 서브넷 확인.

docker_system

info, df, prune, version, ping

데몬 헬스체크, 엔진 버전, 디스크 사용량 분석, 시스템 전체 공간 회수.


3. 빠른 시작 및 설정

환경 변수

변수

기본값

설명

PORT

3008

HTTP/SSE 리스닝 포트

HOST

0.0.0.0

바인드 주소

MCP_TOKEN

선택 사항

HTTP/SSE에서 Bearer 인증을 위한 비밀 토큰

DOCKER_SOCKET

/var/run/docker.sock

로컬 Unix Docker 소켓 경로

DOCKER_HOST

선택 사항

원격 Docker TCP URL (예: tcp://192.168.86.50:2376)

DOCKER_TLS_VERIFY

선택 사항

TLS 인증서 검증 활성화(1 또는 0)

DOCKER_CERT_PATH

선택 사항

클라이언트 TLS 인증서 경로 (ca.pem, cert.pem, key.pem)

Stdio로 실행 (Claude Desktop / 로컬 CLI)

`GXP2

Docker Compose 및 mcp-gateway로 실행

docker compose up -d --build

.HTTP SSE는 http://localhost:3008/docker/mcp` 또는 http://localhost:3008/docker/sse에서 접속할 수 있습니다.


4. 테스팅 및 코드 품질

유닛 테스트의 100%가 InMemoryDockerClient를 대상으로 실행되며 라이브 Docker 소켓 접근이 필요하지 않습니다.

# Run unit tests
npm test

# Run test coverage (>85% required)
npm run test:coverage

# TypeScript compile check
npm run types:check

라이선스

MIT © 2026 Craig Dean

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.

  • Official Sevalla MCP — full PaaS API access through just 2 tools.

  • 34 production API tools over one hosted MCP endpoint.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thargy/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server