cnv-lab-mcp
cnv-lab-mcp
用于在 GLPI 中预留实验室硬件、在 Jenkins 中触发 CNV 集群部署以及导入 ACM spoke 集群的 MCP 服务器。没有硬编码任何实例 URL、硬件名称或令牌——所有内容都来自工具参数或环境变量。
添加到 Cursor
Related MCP server: DCI MCP Server
先决条件
Node.js >= 20
一个 GLPI 个人 API 令牌(
My Settings→API tokens)。如果实例需要,可选的GLPI_APP_TOKEN。一个 Jenkins API 令牌(
User→Configure→API Token)以及短用户名,而不是电子邮件。user@example.com返回 401;user有效。GLPI 配置文件必须在目标实体上具有非零的
reservation权限。Jenkins 账户需要对要触发的作业具有 Job/Build 和 Job/Read 权限。
内部 TLS / NODE_EXTRA_CA_CERTS
Node 的 fetch(undici)不像 curl 那样使用操作系统/钥匙串 CA 存储。如果 curl 有效但 MCP 服务器报告 fetch failed,请将 NODE_EXTRA_CA_CERTS 设置为你的内部 CA 捆绑包并重新启动 Cursor:
export NODE_EXTRA_CA_CERTS=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pemTLS 错误与一般网络故障分开报告,因此这并不神秘。
配置
复制 .env.example 并设置:
变量 | 必需 | 备注 |
| 是 | 带或不带 |
| 是 | 个人 API 令牌 |
| 否 | 仅当实例需要时 |
| 是 | Jenkins 根 URL |
| 是 | 短用户名(不是电子邮件) |
| 是 | API 令牌 |
示例 mcp.json 条目(通过环境变量插值传递机密):
{
"mcpServers": {
"cnv-lab-mcp": {
"command": "npx",
"args": ["-y", "cnv-lab-mcp"],
"env": {
"GLPI_BASE_URL": "https://glpi.example.internal",
"GLPI_USER_TOKEN": "${env:GLPI_USER_TOKEN}",
"JENKINS_BASE_URL": "https://jenkins.example.internal",
"JENKINS_USER": "${env:JENKINS_USER}",
"JENKINS_API_TOKEN": "${env:JENKINS_API_TOKEN}",
"NODE_EXTRA_CA_CERTS": "${env:NODE_EXTRA_CA_CERTS}"
}
}
}
}在包发布到 npm 之前,请将 args 指向此仓库:
"args": ["-y", "github:galkremer1/cnv-lab-mcp"]工具
预留:
list_reservable_items— 浏览 GLPI 可预留资产find_available_cluster— 匹配需求(结构化 + 自由文本注释)并按最早空闲时段排序。不进行预订。check_availability— 单个项目的预留 + 空档reserve_cluster— 预订一个时段;始终从会话中设置users_idcancel_reservation— 释放预订
Jenkins:
trigger_jenkins_job— 通用触发器;start_at变为delay=NNNsecget_build_status— 队列/构建 + 控制台尾部abort_build— 停止构建
集群访问:
get_cluster_info— 来自*-data.zip的非敏感元数据和控制台/API URLget_cluster_kubeconfig— 仅内存中的auth/kubeconfig+auth/kubeadmin-password。集群管理员凭据;不要在聊天中回显它们。
ACM:
import_spoke_cluster— ManagedCluster + KlusterletAddonConfig,将导入清单应用到 spoke,轮询加入get_managed_cluster_status— hub 端加入/可用条件
场景(预订前确认):
list_scenariosplan_scenario— 提出集群/时段/参数,不预订任何内容execute_scenario— 根据计划进行预留 + 触发
内置场景位于 src/scenarios/catalog.json,可通过 PR 扩展:basic-bm-cnv、acm-hub-and-spoke、sriov-cnv-cluster。
开发
npm install
npm test
npm run lint
npm run typecheck
npm run build针对真实实例的手动冒烟测试(不在 CI 中运行):
npx tsx scripts/smoke.ts
SMOKE_JOB=deploy-ocp-bare-metal-cluster-with-abi-cnv-5.0 SMOKE_CLUSTER=example-cluster npx tsx scripts/smoke.ts安全
.env被 gitignore。示例使用明显虚假的占位符。CI 在每次推送/PR 上运行 gitleaks。
客户端错误会编辑令牌,并且从不记录
Authorization/user_token值。get_cluster_kubeconfig将 zip 下载到 Buffer 中,并使用 JSZip 在内存中提取。它从不将存档或auth/*写入磁盘。get_cluster_info仅读取deploydata.json、metadata.json和install-config.backup.yaml。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server for automating VLP lab VM operations, exposing VM management tools to AI agents like Cursor and Claude Code.
- AlicenseAqualityBmaintenanceMCP server for DCI API enabling AI models to extract and analyze DCI jobs, components, and topics, with integrations for Google Drive, Jira, GitHub, and Red Hat support cases.71Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for interacting with QUADS infrastructure systems via API, enabling resource management and automation through LLM applications.MIT
- FlicenseAqualityDmaintenanceAn MCP server for OpenShift Baremetal IPI cluster provisioning, allowing users to generate and validate install-config.yaml files, test BMC connectivity, validate networks, and manage cluster installation lifecycle.24
Related MCP Connectors
MCP server for Appcircle mobile CI/CD platform.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/galkremer1/cnv-lab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server