claude-devops-mcp-zyt
An experimental MCP server that enables Claude Code to execute DevOps tasks such as Docker, Git, and testing commands.
README
claude-devops-mcp-zyt
⚠️ 实验性项目:这只是初步探索,代码可能不稳定,欢迎指点
让 Claude Code 真正接管你的开发工作流 —— 一个实验性的 MCP Server,赋予 AI 执行 DevOps 任务的能力。
🤔 为什么做这个?
说实话,用了几天 Claude Code 之后,我发现一个奇怪的现象:
AI 能帮我写代码、改 bug、重构项目,但部署、测试、CI/CD 这些事儿还得我自己手动来。
这就像请了一个很厉害的厨师,但端菜上桌还得我自己来。不对劲。
所以今天(2026-02-18)看到 Claude 官方推出 MCP Apps 的新闻时,我突然想到:
如果 Claude Code 能通过 MCP 协议直接操作 Docker、运行测试、甚至部署到生产环境呢?
这就是这个项目的起源。
📁 项目结构
claude-devops-mcp-zyt/
├── src/
│ ├── index.ts # MCP Server 入口
│ ├── tools/ # 各类 DevOps 工具
│ │ ├── docker.ts # Docker 操作
│ │ ├── git.ts # Git 工作流
│ │ ├── test.ts # 测试执行
│ │ └── deploy.ts # 部署相关(TODO)
│ └── utils/
│ └── logger.ts # 日志工具
├── experiments/ # 试错记录(踩坑史)
│ ├── v1-basic-mcp/ # 第一个版本:基础 MCP 连接
│ └── v2-docker-auth/ # 第二个版本:Docker 权限问题
├── package.json
├── tsconfig.json
└── README.md # 你在看的这个
🚀 快速开始
安装
# 克隆仓库
git clone https://github.com/YaBoom/claude-devops-mcp-zyt.git
cd claude-devops-mcp-zyt
# 安装依赖
npm install
# 构建
npm run build
配置 Claude Code
在 ~/.claude-code/settings.json 中添加:
{
"mcpServers": {
"devops": {
"command": "node",
"args": ["/path/to/claude-devops-mcp-zyt/dist/index.js"]
}
}
}
使用示例
启动 Claude Code 后,你可以直接说:
"帮我构建这个项目的 Docker 镜像"
"运行所有测试,并把失败的测试输出保存到文件"
"检查最近的 git 提交记录,生成一个发布说明"
🛠️ 已实现的工具
| 工具 | 功能 | 状态 |
|---|---|---|
docker_build |
构建 Docker 镜像 | ✅ 可用 |
docker_run |
运行容器 | ✅ 可用 |
docker_ps |
查看运行中的容器 | ✅ 可用 |
git_status |
查看 git 状态 | ✅ 可用 |
git_log |
查看提交历史 | ✅ 可用 |
npm_test |
运行 npm 测试 | ✅ 可用 |
deploy_preview |
部署到预览环境 | 🚧 TODO |
🐛 已知问题 & TODO
- [ ] Docker 在 macOS 上需要特殊权限处理
- [ ] 部署功能还没做完,只做了框架
- [ ] 没有错误重试机制
- [ ] 日志输出格式有点乱
- [ ] 需要添加更多测试覆盖
🧪 实验记录
实验1:基础 MCP 连接
时间:2026-02-18 下午 目标:让 Claude Code 能识别自定义 MCP Server 结果:成功 ✅ 踩坑:一开始用 stdio 传输,结果 Claude Code 没识别到,后来发现是 JSON 格式问题
实验2:Docker 权限问题
时间:2026-02-18 晚上 目标:让 MCP Server 能执行 docker 命令 结果:部分成功 ⚠️ 踩坑:Docker socket 权限很烦,在 Linux 上需要把用户加入 docker 组,macOS 更麻烦
更多实验记录在 experiments/ 目录。
🤝 贡献
这只是初步探索,肯定有很多不足之处。如果你也有想法:
- 提 Issue 告诉我你的使用场景
- 提交 PR 完善功能
- 或者就在评论区聊聊你对 AI + DevOps 的看法
📜 许可证
MIT —— 随便用,出了问题别找我 😄
💬 最后
说实话,这个项目能不能真的让 AI 接管 DevOps,我心里也没底。
但至少是个开始。
你有没有想过让 AI 帮你做哪些现在还得手动做的事?
相关链接:
- Claude Code 官方文档
- MCP 协议规范
- Claude MCP Apps 公告 (2026-02-18)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.