🐳docker-mcp
👁 Python 3.12
👁 许可证:MIT
👁 代码样式:黑色
👁 铁匠徽章
用于 Docker 操作的强大的模型上下文协议 (MCP) 服务器,通过 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 桌面应用中尝试此功能,请将其添加到您的 claude 配置文件中:
{
"mcpServers": {
"docker-mcp": {
"command": "uvx",
"args": [
"docker-mcp"
]
}
}
}通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Docker MCP:
npx @smithery/cli install docker-mcp --client claude先决条件
UV(包管理器)
Python 3.12+
Docker 桌面或 Docker 引擎
克劳德桌面
安装
Claude桌面配置
将服务器配置添加到您的 Claude Desktop 配置文件:
MacOS : ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows : %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"
]
}
}
}🛠️ 开发
本地设置
克隆存储库:
git clone https://github.com/QuantGeekDev/docker-mcp.git
cd docker-mcp创建并激活虚拟环境:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate安装依赖项:
uv sync🔍 调试
启动 MCP Inspector 进行调试:
npx @modelcontextprotocol/inspector uv --directory <path-to-docker-mcp> run docker-mcpInspector 将提供一个 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'"
}获取日志
从特定容器中检索日志
{
"container_name": "my-container"
}列表容器
列出所有 Docker 容器
{}🚧 当前限制
容器不支持内置环境变量
无音量管理
无网络管理
没有容器健康检查
没有容器重启策略
无容器资源限制
🤝 贡献
从docker-mcp fork 仓库
创建你的功能分支
提交你的更改
推送到分支
打开拉取请求
📜 许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
✨ 作者
Alex Andru -初始工作 | 核心贡献者- @QuantGeekDev
Ali Sadykov -初始工作 | 核心贡献者- @md-archive
用❤️制作
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
- Managing Docker Containers and Applications
- Information about Docker software and containerization
- A server for managing Minecraft Fabric modpacks using Claude
- A server that can run Docker Compose commands to manage containers
- How to retrieve information about a device using Microsoft Defender, Intune, and Jamf
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/QuantGeekDev/docker-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
