Skip to main content
Glama

🐳 도커-mcp

파이썬 3.12 라이센스: MIT 코드 스타일: 검정색 대장간 배지

Docker 작업을 위한 강력한 MCP(Model Context Protocol) 서버로, Claude AI를 통해 원활한 컨테이너 및 구성 스택 관리를 지원합니다.

✨ 특징

  • 🚀 컨테이너 생성 및 인스턴스화

  • 📦 Docker Compose 스택 배포

  • 🔍 컨테이너 로그 검색

  • 📊 컨테이너 목록 및 상태 모니터링

🎬 데모

Docker Compose 스택 배포

https://github.com/user-attachments/assets/b5f6e40a-542b-4a39-ba12-7fdf803ee278

컨테이너 로그 분석

https://github.com/user-attachments/assets/da386eea-2fab-4835-82ae-896de955d934

Related MCP server: MCP Development Server

🚀 빠른 시작

Claude Desktop 앱에서 이 기능을 시도하려면 Claude 설정 파일에 다음을 추가하세요.

지엑스피1

Smithery를 통해 설치

Smithery 를 통해 Claude Desktop용 Docker MCP를 자동으로 설치하려면:

npx @smithery/cli install docker-mcp --client claude

필수 조건

  • UV(패키지 관리자)

  • 파이썬 3.12+

  • Docker 데스크톱 또는 Docker 엔진

  • 클로드 데스크탑

설치

클로드 데스크톱 구성

Claude Desktop 구성 파일에 서버 구성을 추가합니다.

MacOS : ~/Library/Application\ Support/Claude/claude_desktop_config.json
윈도우 : %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "docker-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "<path-to-docker-mcp>",
        "run",
        "docker-mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "docker-mcp": {
      "command": "uvx",
      "args": [
        "docker-mcp"
      ]
    }
  }
}

🛠️ 개발

로컬 설정

  1. 저장소를 복제합니다.

git clone https://github.com/QuantGeekDev/docker-mcp.git
cd docker-mcp
  1. 가상 환경을 만들고 활성화하세요.

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. 종속성 설치:

uv sync

🔍 디버깅

디버깅을 위해 MCP Inspector를 실행합니다.

npx @modelcontextprotocol/inspector uv --directory <path-to-docker-mcp> run docker-mcp

검사기는 디버깅 인터페이스에 액세스할 수 있는 URL을 제공합니다.

📝 사용 가능한 도구

서버는 다음과 같은 도구를 제공합니다.

컨테이너 생성

독립 실행형 Docker 컨테이너를 생성합니다.

{
    "image": "image-name",
    "name": "container-name",
    "ports": {"80": "80"},
    "environment": {"ENV_VAR": "value"}
}

배포-작성

Docker Compose 스택을 배포합니다.

{
    "project_name": "example-stack",
    "compose_yaml": "version: '3.8'\nservices:\n  service1:\n    image: image1:latest\n    ports:\n      - '8080:80'"
}

get-logs

특정 컨테이너에서 로그를 검색합니다.

{
    "container_name": "my-container"
}

목록 컨테이너

모든 Docker 컨테이너를 나열합니다

{}

🚧 현재 제한 사항

  • 컨테이너에 대한 내장 환경 변수 지원이 없습니다.

  • 볼륨 관리 없음

  • 네트워크 관리 없음

  • 컨테이너 상태 점검 없음

  • 컨테이너 재시작 정책 없음

  • 컨테이너 리소스 제한 없음

🤝 기여하기

  1. docker-mcp 에서 저장소를 포크합니다.

  2. 기능 브랜치를 생성하세요

  3. 변경 사항을 커밋하세요

  4. 지점으로 밀어 넣기

  5. 풀 리퀘스트 열기

📜 라이센스

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

✨ 저자

  • Alex Andru - 초기 작업 | 핵심 기여자 - @QuantGeekDev

  • Ali Sadykov - 초기 작업 | 핵심 기여자 - @md-archive


❤️로 만들었습니다

Available Tools

4 tools
create-containerC

Create a new standalone Docker container

ParametersJSON Schema
NameRequiredDescriptionDefault
imageYes
nameNo
portsNo
environmentNo

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Create' implying a mutation operation but doesn't cover permissions, side effects, error handling, or response format. For a tool that likely requires Docker daemon access and creates persistent resources, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a basic tool definition and front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (4 parameters with nested objects, no annotations, no output schema), the description is incomplete. It doesn't address parameter meanings, behavioral traits, or output expectations, leaving the agent with insufficient context to use the tool effectively beyond the basic purpose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but adds no parameter information. It doesn't explain what 'image', 'name', 'ports', or 'environment' mean in the Docker context, their formats, or examples. With 4 parameters and nested objects, this leaves critical usage details undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new standalone Docker container'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'deploy-compose' which might also create containers, missing the 'standalone' distinction that could be more explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'deploy-compose' for multi-container setups or 'list-containers' for viewing existing ones. The description lacks context about prerequisites or typical scenarios for standalone container creation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

deploy-composeC

Deploy a Docker Compose stack

ParametersJSON Schema
NameRequiredDescriptionDefault
compose_yamlYes
project_nameYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states 'Deploy' implies a write/mutation operation, but doesn't disclose critical traits like whether it's idempotent, requires specific permissions, destroys existing resources, handles errors, or has rate limits. The description adds no context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single, front-loaded sentence that directly states the tool's purpose. There is zero wasted text, and it efficiently communicates the core function without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of deployment operations (mutating system state), no annotations, no output schema, and 0% schema coverage for 2 parameters, the description is incomplete. It lacks essential details like what 'deploy' entails behaviorally, parameter meanings, expected outcomes, or error handling, leaving significant gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but provides no parameter information. It doesn't explain what 'compose_yaml' should contain (e.g., YAML string format), what 'project_name' is used for (e.g., naming containers/networks), or any constraints (e.g., length, characters). With 2 undocumented parameters, this is inadequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Deploy') and resource ('a Docker Compose stack'), making the purpose immediately understandable. It distinguishes from siblings like 'create-container' (single container vs. stack) and 'get-logs'/'list-containers' (read operations vs. deployment). However, it doesn't specify what 'deploy' entails (e.g., creating containers, networks, volumes) beyond the high-level concept.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., Docker Compose installed), when to choose this over 'create-container' for single-container deployments, or any constraints (e.g., environment compatibility). Usage is implied from the name but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-logsC

Retrieve the latest logs for a specified Docker container

ParametersJSON Schema
NameRequiredDescriptionDefault
container_nameYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose what 'latest logs' means (e.g., time range, log count, format), whether it's read-only or has side effects, or any constraints like rate limits or authentication needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, front-loading the core action and resource. It's appropriately sized for a simple tool with one parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on return values (e.g., log format, structure), error handling, and behavioral context needed for a logging tool in a Docker environment with siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds meaning by specifying that 'container_name' is for a Docker container. However, it doesn't clarify parameter details like format, examples, or how it relates to other tools (e.g., if it must match names from 'list-containers'), leaving gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'retrieve' and resource 'latest logs for a specified Docker container', making the purpose evident. It distinguishes from siblings like 'list-containers' by focusing on logs rather than container metadata, though it doesn't explicitly contrast with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., container must be running), exclusions, or comparisons with sibling tools like 'list-containers' for container discovery.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-containersB

List all Docker containers

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('List all') but lacks details on permissions, rate limits, output format, or any constraints (e.g., whether it includes stopped containers). This is a significant gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It is front-loaded and directly states the tool's purpose, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It fails to provide necessary behavioral context (e.g., what 'all' entails, response format) or usage guidelines, making it inadequate for a tool that might have hidden complexities despite having no parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, but this is acceptable given the schema's completeness, aligning with the baseline of 4 for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List all Docker containers' clearly states the verb ('List') and resource ('Docker containers'), making the purpose immediately understandable. However, it doesn't differentiate from potential sibling tools like 'get-logs' which might also list containers but with logs, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'create-container' or 'deploy-compose'. There is no mention of context, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updatesv1.0.0
    • Addedcreate-container
    • Addeddeploy-compose
    • Addedget-logs
    • Addedlist-containers

TDQS

B3.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: create-container for creating containers, deploy-compose for deploying stacks, get-logs for retrieving logs, and list-containers for listing containers. The descriptions make it easy to tell them apart.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (e.g., create-container, deploy-compose, get-logs, list-containers). There are no deviations in naming style or conventions.

Tool Count4/5

With 4 tools, the count is reasonable for a Docker MCP server, covering key operations like creating, listing, and managing containers and stacks. It's slightly lean but well-scoped for basic Docker management tasks.

Completeness3/5

The toolset covers core operations (create, list, logs, deploy) but has notable gaps, such as missing update, delete, or stop/start container tools, which could limit agent workflows for full container lifecycle management.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers