这是一个使用RMCP(Rust Model Context Protocol)库实现的操作Containerd的MCP服务器。
cargo build --release
mcp-containerd -t http #使用streamhttp
mcp-containerd --help #列出帮助信息
默认情况下,服务会连接到unix:///run/containerd/containerd.sock端点。
simple-chat-client允许您与MCP Containerd服务进行交互: simple-chat-client已移动至simple-chat-client
交互示例:
> 请给我一个容器列表
AI: 列出容器中...
Tool: list_containers
结果: {"containers":[...]}
> 请给我一个镜像列表
AI: 这是您的containerd中的镜像:
Tool: list_images
结果: {"images":[...]}
MCP服务器包括以下主要组件:
version服务:提供CRI版本信息runtime服务:提供容器和Pod运行时操作image服务:提供容器镜像操作Apache-2.0