
Docker 的 MCP 服务器
概览
一个用自然语言管理 Docker 的 MCP 服务器! - 🚀 用自然语言组合容器 - 🔍 内省和调试运行中的容器 - 📀 管理使用Docker卷的持久数据 - 服务器管理员:连接远程Docker引擎,例如管理面向公众的网站。- Tinkerers:本地运行容器,尝试支持Docker的开源应用。- AI爱好者:突破LLM的极限! 这是一个用自然语言演示WordPress部署的演示: https://github.com/user-attachments/assets/65e35e67-bce0-4449-af7e-9f4dd773b4b3 在 MacOS 上:~/Library/Application\ 支持/Claude/claude_desktop_config.json 在Windows上:%APPDATA%/Claude/claude_desktop_config.json 如果你还没安装UV,请按照系统安装说明操作:链接
概述(AI 翻译)
一个用自然语言管理 Docker 的 MCP 服务器!
🪩 它能做什么?
- 🚀 用自然语言组合容器
- 🔍 内省与调试运行容器
- 📀 通过 Docker 卷管理持久数据
❓ 这是给谁的?
- 服务器管理员:连接远程 Docker 引擎,例如管理 面向公众的网站。
- Tinkerers:本地运行容器并尝试开源应用 支持Docker。
- 人工智能爱好者:突破大型语言模型的极限!
演示
这是一个用自然语言演示WordPress部署的演示:
https://github.com/user-attachments/assets/65e35e67-bce0-4449-af7e-9f4dd773b4b3
🏎️ 快速开始
安装
克劳德桌面
在 MacOS 上:~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows版:%APPDATA%/Claude/claude_desktop_config.json
用 UV 从 PyPi 安装
如果你还没有安装uv],请按照安装说明操作你的
系统:
链接
然后将以下内容添加到你的MCP服务器文件中:
使用 Docker 安装
为了方便,服务器可以运行在 Docker 容器中。
克隆该仓库后,构建 Docker 镜像:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
🐋 Docker MCP server
An MCP server for managing Docker with natural language!
🪩 What can it do?
- 🚀 Compose containers with natural language
- 🔍 Introspect & debug running containers
- 📀 Manage persistent data with Docker volumes
❓ Who is this for?
- Server administrators: connect to remote Docker engines for e.g. managing a public-facing website.
- Tinkerers: run containers locally and experiment with open-source apps supporting Docker.
- AI enthusiasts: push the limits of that an LLM is capable of!
Demo
A quick demo showing a WordPress deployment using natural language:
https://github.com/user-attachments/assets/65e35e67-bce0-4449-af7e-9f4dd773b4b3
🏎️ Quickstart
Install
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
📝 Prompts
🎻 docker_compose
Use natural language to compose containers. See above for a demo.
Provide a Project Name, and a description of desired containers, and let the LLM do the rest.
This prompt instructs the LLM to enter a plan+apply loop. Your interaction
with the LLM will involve the following steps:
- You give the LLM instructions for which containers to bring up
- The LLM calculates a concise natural language plan and presents it to you
- You either:
- Apply the plan
- Provide the LLM feedback, and the LLM recalculates the plan
Examples
- name:
nginx, containers: “deploy an nginx container exposing it on port 9000” - name:
wordpress, containers: “deploy a WordPress container and a supporting MySQL container, exposing Wordpress on port 9000”
Resuming a Project
When starting a new chat with this prompt, the LLM will receive the status of
any containers, volumes, and networks created with the given project name.
安装
uvx mcp-server-docker