容器与虚拟机管理服务器

Incus MCP Server是一个用于通过`incus` CLI管理Incus容器和虚拟机的服务器,提供远程、实例、镜像、网络、存储、配置文件、项目和快照等工具。

  • by nikkomiu
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 nikkomiu/incus-mcp

使用说明

Incus MCP服务器

MCP服务器,用于通过 incus CLI。服务器读取您现有的 incus remote 配置和公开远程、实例、映像、网络、存储、配置文件、项目和快照的工具。

设置

  1. 安装依赖项:
bun install
  1. 启动服务器:
bun run src/index.ts

脚本

  • bun run start -启动MCP服务器
  • bun run build -在中创建独立二进制文件 dist/
  • bun run type-check -运行TypeScript类型检查
  • bun run lint -使用Biome对代码库进行精简
  • bun run format -使用Biome格式化源文件

工具

工具名称用下划线注册(一些MCP客户端可能会用连字符显示它们)。

  • 遥控器: remote_list, remote_get_default, remote_set_default, remote_add
  • 实例: instance_list, instance_info, instance_logs, instance_console_log, instance_launch, instance_start, instance_stop, instance_delete, instance_exec, instance_rebuild
  • 图像: image_list, image_info, image_delete
  • 网络: network_list, network_info, network_create, network_delete
  • 储存: storage_pool_list, storage_pool_info, storage_volume_list, storage_volume_info, storage_volume_create, storage_volume_delete
  • 配置文件: profile_list, profile_info, profile_create, profile_edit, profile_delete
  • 项目: project_list, project_info, project_create, project_delete
  • 快照: snapshot_list, snapshot_create, snapshot_restore, snapshot_delete

克劳德桌面/克劳德代码

示例配置(根据需要更新路径):

{
  "mcpServers": {
    "incus": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/incus-mcp/src/index.ts"],
      "env": {}
    }
  }
}