Provides comprehensive Docker container management and security monitoring capabilities, including remote Docker API connections, container lifecycle operations, security analysis, event monitoring, and container inspection tools.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ContainerGuard MCPconnect to Docker at 10.0.0.5 and list all running containers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
项目名称: ContainerGuard MCP
README.md
# ContainerGuard MCP
一个基于Model Context Protocol (MCP)的容器安全监控与管理工具,提供远程容器管理、安全日志分析和事件监控功能。
## 功能特性
- 🔐 **远程连接管理**: 支持Docker API和SSH两种方式连接远程容器环境
- 📊 **容器监控**: 实时查看容器状态、日志和运行信息
- 🛡️ **安全分析**: 自动分析容器安全性,检测可疑活动和配置问题
- 📋 **事件监控**: 实时监控Docker事件,及时发现异常行为
- 🔍 **深度检查**: 全面的容器安全扫描,包括进程、网络、文件权限等
## 安装依赖
```bash
pip install mcp-server-fastmcp docker paramiko快速开始
启动MCP服务:
python container_guard_mcp.py在支持MCP的客户端中使用 (如Claude AI):
连接到Docker守护进程: connect_docker host="192.168.1.100" port=2375
查看容器列表: list_containers all_containers=true
分析容器安全: security_analysis container_id="container_id"可用工具
连接管理
connect_docker()- 连接到远程Docker守护进程connect_ssh()- 通过SSH连接到远程主机
容器操作
list_containers()- 获取容器列表get_container_logs()- 查看容器日志execute_command()- 在容器中执行命令
安全分析
security_analysis()- 基础安全分析check_container_security()- 全面安全检查monitor_docker_events()- 监控Docker事件
安全配置
Docker远程访问
# 在目标主机上配置Docker远程API
sudo systemctl edit docker
# 添加: -H tcp://0.0.0.0:2375
sudo systemctl restart dockerSSH密钥认证
# 生成SSH密钥对
ssh-keygen -t rsa -b 4096
# 将公钥复制到目标主机
ssh-copy-id user@host使用示例
连接远程Docker:
connect_docker(host="10.0.0.5", port=2375)查看所有容器:
containers = list_containers(all_containers=true)分析特定容器:
analysis = security_analysis(container_id="abc123")监控实时事件:
events = monitor_docker_events(duration=30)安全建议
使用TLS加密Docker远程连接
限制Docker API的访问权限
定期更新SSH密钥
监控容器资源使用情况
设置容器资源限制
许可证
MIT License
支持
如有问题请提交Issue或联系开发团队。
## 使用说明
1. **安装依赖**:
```bash
pip install mcp-server-fastmcp docker paramiko运行服务:
python container_guard_mcp.py在MCP客户端中配置: 将上述Python脚本路径添加到你的MCP客户端配置中。
开始使用:
首先连接到远程Docker或SSH
然后使用各种工具进行容器管理和安全分析
这个MCP服务提供了完整的容器安全管理功能,可以帮助你远程监控和分析容器环境的安全状况。
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.