Docker

io.github.rog0x由 GitHub 帳號 rog0x 發布v1.0.1更新於 Oct 24, 2026

Docker container management and Dockerfile analysis

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理檢視 Docker 容器、映像與日誌,並審查 Dockerfile 與 Compose 檔的最佳實務。

可以做什麼
  • 列出執行中或全部容器,含狀態、連接埠、映像、建立時間及 CPU、記憶體、網路與區塊 I/O 用量
  • 列出 Docker 映像,含大小、標籤、建立日期與層數
  • 讀取容器日誌,支援 tail、關鍵字篩選、時間範圍與時間戳記
  • 分析 Dockerfile 的多階段建置、非 root 使用者、層快取、映像大小與安全性
  • 分析 docker-compose.yml 的服務、連接埠、磁碟區、網路、健康檢查、相依關係並提出改善建議
適用情境
適合在本機使用 Docker 時,讓助理查看目前執行了什麼、排查容器日誌,或在提交與部署前審查 Dockerfile 與 Compose 檔。它只做唯讀檢視與靜態分析,無法啟動、停止或修改容器。
執行需求
以本機 stdio 程序在桌面端執行。需要 Node.js 18 或更新版本,Docker CLI 須在 PATH 中,容器與映像相關工具還要求 Docker 守護程序正在執行。未宣告帳號、API 金鑰或環境變數。
安裝前請注意
容器日誌與容器/映像清單會傳送給模型,內容可能包含密鑰、權杖或內部主機名稱。README 的設定範例指向本機建置路徑,需自行建置該套件後才能使用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Docker,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-docker-tools

Docker management tools for AI agents, built on the Model Context Protocol.

Provides five tools for inspecting containers, images, Dockerfiles, and Compose configurations — all accessible to LLMs through MCP.

Tools

ToolDescription
docker_container_listList running or all containers with status, ports, image, created time, and resource usage (CPU, memory, network/block I/O)
docker_image_listList Docker images with size, tags, created date, and layer count
docker_dockerfile_analyzeAnalyze a Dockerfile for best practices: multi-stage builds, non-root user, layer caching, image size, security
docker_compose_analyzeAnalyze docker-compose.yml: services, ports, volumes, networks, health checks, dependencies, and improvement suggestions
docker_container_logsGet container logs with tail, keyword filter, time range, and timestamp support

Prerequisites

  • Node.js >= 18
  • Docker CLI installed and accessible in PATH
  • Docker daemon running (for container/image tools)

Installation

bash
git clone <repo-url>cd mcp-docker-toolsnpm installnpm run build

Usage with Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

json
{  "mcpServers": {    "docker-tools": {      "command": "node",      "args": ["D:/products/mcp-servers/mcp-docker-tools/dist/index.js"]    }  }}

Usage with Claude Code

bash
claude mcp add docker-tools node D:/products/mcp-servers/mcp-docker-tools/dist/index.js

Or add to .claude/settings.json:

json
{  "mcpServers": {    "docker-tools": {      "command": "node",      "args": ["D:/products/mcp-servers/mcp-docker-tools/dist/index.js"]    }  }}

Tool Examples

List running containers

json
{ "tool": "docker_container_list" }

List all containers including stopped

json
{ "tool": "docker_container_list", "args": { "all": true, "format": "table" } }

List images filtered by name

json
{ "tool": "docker_image_list", "args": { "filter": "node" } }

Analyze a Dockerfile

json
{  "tool": "docker_dockerfile_analyze",  "args": {    "content": "FROM node:20\nCOPY . .\nRUN npm install\nCMD [\"node\", \"index.js\"]"  }}

Analyze docker-compose.yml

json
{  "tool": "docker_compose_analyze",  "args": {    "content": "services:\n  web:\n    image: nginx\n    ports:\n      - 80:80"  }}

Get container logs

json
{  "tool": "docker_container_logs",  "args": { "container": "my-app", "tail": 50, "filter": "error" }}

License

MIT

來源:README.md,提交 8a0b02a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分