mcp凝聚力
A. 模型上下文协议(MCP) 服务器 内聚数据保护,通过Cohesity REST API为人工智能助手提供对备份管理、恢复操作和数据保护监控的完全访问。
特性
14工具 分为六类:
簇
| 工具 | 说明 |
|---|---|
get_cluster_info | 获取集群名称、ID、软件版本和节点数 |
get_cluster_stats | 获取存储容量(已用/总)和吞吐量统计数据 |
保护策略和组
| 工具 | 说明 |
|---|---|
list_protection_policies | 列出所有数据保护策略,包括计划和保留设置 |
list_protection_groups | 列出保护组(备份作业)及其状态、计划和上次运行信息 |
get_protection_group | 获取特定保护组的详细配置 |
run_protection_group | 为保护组触发按需备份运行 |
备份运行
| 工具 | 说明 |
|---|---|
list_protection_runs | 列出最近的备份运行,包括状态、持续时间和数据大小 |
get_protection_run | 获取特定备份运行的详细信息 |
保护源
| 工具 | 说明 |
|---|---|
list_sources | 列出所有已注册的源(vSphere、物理、NAS、SQL等) |
get_source | 获取特定源的完整对象层次结构详细信息 |
恢复
| 工具 | 说明 |
|---|---|
list_recovery_tasks | 列出恢复任务的状态和类型 |
get_recovery_task | 获取特定恢复任务的详细信息 |
警报
| 工具 | 说明 |
|---|---|
list_alerts | 列出按严重性、类别和状态筛选的群集警报 |
resolve_alert | 使用解决说明将警报标记为已解决 |
安装
git clone git@github.com:fredriksknese/mcp-cohesity.git
cd mcp-cohesity
npm install
npm run build配置
服务器是通过环境变量配置的:
| 变量 | 必填 | 默认 | 描述 |
|---|---|---|---|
COHESITY_CLUSTER | 是 | -- | 内聚集群主机名或IP地址 |
COHESITY_USERNAME | 是 | -- | 身份验证用户名 |
COHESITY_PASSWORD | 是 | -- | 身份验证密码 |
COHESITY_DOMAIN | 没有 | LOCAL | 身份验证域 |
COHESITY_ALLOW_SELF_SIGNED | 没有 | true | 接受自签名SSL证书 |
使用Claude Desktop
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"cohesity": {
"command": "node",
"args": ["/absolute/path/to/mcp-cohesity/dist/index.js"],
"env": {
"COHESITY_CLUSTER": "your-cohesity-cluster.example.com",
"COHESITY_USERNAME": "admin",
"COHESITY_PASSWORD": "your-password",
"COHESITY_DOMAIN": "LOCAL"
}
}
}
}使用Claude代码
添加到您的Claude Code MCP设置中:
claude mcp add cohesity -- node /absolute/path/to/mcp-cohesity/dist/index.js在运行之前设置所需的环境变量,或在MCP设置中配置它们。
示例提示
连接后,您可以向您的AI助手询问以下问题:
- *“显示当前群集存储利用率”*
- *“列出上次备份失败的所有保护组”*
- *“为VM生产组触发按需备份”*
- *“目前集群上的关键警报是什么?”*
- *“显示过去24小时内的所有备份运行”*
- *“列出群集上注册的所有VMware保护源”*
- *“获取保护组ID 12345的上次备份运行的详细信息”*
- *“解决警报ID abc123--磁盘已更换”*
- *“当前正在运行哪些恢复任务?”*
- *“列出所有保护策略及其保留设置”*
发展
npm run dev # Run with tsx (auto-reloads)
npm run build # Compile TypeScript to dist/
npm start # Run compiled output建筑
src/
├── index.ts # Entry point — creates MCP server + STDIO transport
├── cohesity-client.ts # HTTP client with token-based auth and V1/V2 API support
└── tools/
├── cluster.ts # Cluster info and stats (2 tools)
├── protection.ts # Protection policies and groups (4 tools)
├── runs.ts # Backup run management (2 tools)
├── sources.ts # Protection source management (2 tools)
├── recovery.ts # Recovery task management (2 tools)
└── alerts.ts # Alert management (2 tools)API详细信息
此服务器使用两个Cohesity API版本:
- V2 API (
/v2/)--用于保护组、运行、源和恢复 - V1 API (
/irisservices/api/v1/public/)--用于警报和源层次结构
身份验证使用V2会话端点(POST /v2/users/sessions)使用Bearer令牌身份验证。令牌在到期时会自动刷新。
需求
- Node.js 18+
- 使用REST API访问的Cohesity DataProtect集群(使用Cohesity 6.x+进行测试)
许可证
请参阅许可证中的许可证
