Nutanix MCP Server
Nutanix MCP 服务器
一个 MCP (Model Context Protocol) 服务器,将 Nutanix Prism Central 和 Prism Element API 作为工具暴露给 GitHub Copilot、Claude 等 AI 助手使用。
功能特性
Prism Central (v4 API) — 虚拟机管理、集群清单、主机管理
Prism Element (v2 API) — 直接访问集群以获取存储、磁盘、告警、保护域信息
竣工报告 (As-Built Reports) — 生成包含 Excalidraw 图表的全面 Markdown 文档,支持环境、集群或虚拟机范围
API 版本路由 — 优先使用 v4,必要时回退至 v3/v2
异步 — 使用 httpx 的非阻塞 HTTP 客户端
Related MCP server: nutanix-mcp
可用工具
虚拟机管理 (Prism Central v4)
工具 | 描述 |
| 使用 OData 过滤列出虚拟机 |
| 通过 UUID 获取完整的虚拟机配置 |
| 开启虚拟机 |
| 关闭虚拟机 (ACPI 或强制关闭) |
| 创建新虚拟机 |
集群管理 (Prism Central v4)
工具 | 描述 |
| 列出已注册的集群 |
| 获取集群详情 |
| 列出管理程序主机 |
| 获取主机详情 |
| 列出存储容器 |
网络与镜像 (Prism Central v4)
工具 | 描述 |
| 列出包含 CIDR、VLAN ID 和集群信息的子网/VLAN |
| 获取子网详情,包括 IP 池和 DHCP 配置 |
| 列出镜像库中的磁盘镜像 (ISO, QCOW2) |
| 获取镜像详情 — 大小、类型、来源 |
| 列出用于资源标记的类别键和值 |
| 获取特定类别键的所有值 |
Prism Element (v2 — 直接集群访问)
工具 | 描述 |
| 集群健康状况、版本和容量 |
| 特定 PE 集群上的虚拟机 |
| 包含硬件详情的主机 |
| 包含复制信息的存储容器 |
| 存储池和磁盘组成 |
| 物理磁盘清单和状态 |
| 活动/已解决的告警 |
| 数据保护策略 |
| 每个保护域的快照 |
竣工报告
工具 | 描述 |
| 完整环境报告 — 所有集群、主机、存储、网络、虚拟机及拓扑图 |
| 一个或多个集群的详细报告 — 配置、主机、容器、子网、虚拟机及架构图 |
| 特定虚拟机的详细报告 — 计算、磁盘、网卡、类别、引导配置及布局图 |
报告输出 Markdown 文档和用于视觉拓扑表示的 Excalidraw JSON 图表。
MCP 资源 (基于 URI 的浏览)
服务器通过 nutanix:// URI 暴露资源,允许 LLM 在无需显式调用工具的情况下浏览实体:
URI 模式 | 描述 |
| 浏览所有虚拟机 |
| 获取特定虚拟机 |
| 浏览所有集群 |
| 获取特定集群 |
| 获取特定主机 |
| 获取特定子网 |
| 获取特定镜像 |
MCP 提示词
提示词 | 描述 |
| 交互式凭据配置 (针对不支持环境变量的客户端) |
| 指导性环境概览 — 集群、主机、存储、告警 |
设置
先决条件
Python 3.10+
可访问 Prism Central 实例的网络 (端口 9440)
具有 API 访问权限的 Nutanix 凭据
安装
cd mcp/nutanix-mcp-server
pip install -e .或者安装开发依赖:
pip install -e ".[dev]"配置
将 .env.example 复制为 .env 并填入您的凭据:
cp .env.example .envNUTANIX_HOST=your-prism-central.example.com
NUTANIX_PORT=9440
NUTANIX_USERNAME=your-username
NUTANIX_PASSWORD=your-password
NUTANIX_VERIFY_SSL=true
NUTANIX_TIMEOUT=30运行
nutanix-mcp或者直接运行:
python -m nutanix_mcpMCP 客户端配置
此服务器使用 stdio 传输 — 它通过 stdin/stdout 进行通信。每个客户端配置一个命令来启动服务器进程。
提示: 将凭据存储在环境变量或
.env文件中,切勿存储在提交到源代码控制的配置文件中。
Claude Code (CLI)
使用 claude mcp add 命令将服务器添加到您的项目中:
claude mcp add nutanix -- python -m nutanix_mcp或者手动在项目根目录创建/编辑 .mcp.json:
{
"mcpServers": {
"nutanix": {
"type": "stdio",
"command": "python",
"args": ["-m", "nutanix_mcp"],
"cwd": "/path/to/mcp/nutanix-mcp-server",
"env": {
"NUTANIX_HOST": "your-prism-central.example.com",
"NUTANIX_USERNAME": "your-username",
"NUTANIX_PASSWORD": "your-password",
"NUTANIX_VERIFY_SSL": "true"
}
}
}
}若要实现用户级可用性(所有项目),请改为添加到 ~/.claude.json。
Claude Desktop
编辑以下路径的配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"nutanix": {
"type": "stdio",
"command": "python",
"args": ["-m", "nutanix_mcp"],
"cwd": "/path/to/mcp/nutanix-mcp-server",
"env": {
"NUTANIX_HOST": "your-prism-central.example.com",
"NUTANIX_USERNAME": "your-username",
"NUTANIX_PASSWORD": "your-password",
"NUTANIX_VERIFY_SSL": "true"
}
}
}
}编辑后请完全重启 Claude Desktop。
GitHub Copilot (VS Code)
添加到工作区中的 .vscode/mcp.json:
{
"servers": {
"nutanix": {
"type": "stdio",
"command": "python",
"args": ["-m", "nutanix_mcp"],
"cwd": "${workspaceFolder}/mcp/nutanix-mcp-server",
"env": {
"NUTANIX_HOST": "your-prism-central.example.com",
"NUTANIX_USERNAME": "your-username",
"NUTANIX_PASSWORD": "your-password",
"NUTANIX_VERIFY_SSL": "true"
}
}
}
}OpenCode (sst/opencode)
添加到项目根目录的 opencode.json (或 opencode.jsonc):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"nutanix": {
"type": "local",
"command": ["python", "-m", "nutanix_mcp"],
"environment": {
"NUTANIX_HOST": "your-prism-central.example.com",
"NUTANIX_USERNAME": "your-username",
"NUTANIX_PASSWORD": "your-password",
"NUTANIX_VERIFY_SSL": "true"
},
"enabled": true
}
}
}注意:OpenCode 使用数组形式的 "command" 以及 "environment" 而非 "env"。
Docker MCP 网关
Docker MCP 网关 可以在容器内代理此服务器。有两种方法:
选项 A:通过 Docker 直接运行
构建容器镜像并在您的 MCP 客户端配置中引用它:
FROM python:3.12-slim
WORKDIR /app
COPY mcp/nutanix-mcp-server/ .
RUN pip install --no-cache-dir -e .
CMD ["python", "-m", "nutanix_mcp"]然后在任何 MCP 客户端配置中:
{
"mcpServers": {
"nutanix": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "NUTANIX_HOST=your-prism-central.example.com",
"-e", "NUTANIX_USERNAME=your-username",
"-e", "NUTANIX_PASSWORD=your-password",
"-e", "NUTANIX_VERIFY_SSL=true",
"nutanix-mcp-server"
]
}
}
}选项 B:向 Docker MCP 网关注册
如果您拥有带有 MCP 工具包的 Docker Desktop:
docker mcp gateway run配置网关配置文件以包含 nutanix 服务器。网关随后会将所有已注册的 MCP 服务器暴露为单个统一端点。
在您的 AI 客户端中,指向网关:
{
"mcpServers": {
"MCP_DOCKER": {
"command": "docker",
"args": ["mcp", "gateway", "run"]
}
}
}网关负责处理路由、生命周期管理和凭据隔离。
API 版本策略
版本 | 端点模式 | 使用场景 |
v4 (首选) |
| 虚拟机、集群、主机、网络 |
v3 (回退) |
| 尚未在 v4 中提供的资源 |
v2 (PE 直接) |
| 集群级存储、磁盘、告警 |
发现 Prism Element 主机
使用 list_clusters 查找集群 UUID,然后使用 list_hosts 查找 CVM IP。这些 CVM IP 可在 Prism Element 工具中用作 pe_host。
开发
# Lint
ruff check src/
# Type check
mypy src/
# Test
pytest参考资料
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
- AlicenseAqualityCmaintenanceMCP server for Nutanix Prism Central v4 REST API, enabling AI agents to list and inspect VMs, control VM power state, list clusters, read alerts, and list subnets.8MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying Nutanix infrastructure (VMs, hosts, storage, alerts, etc.) using natural language through GitHub Copilot. Supports Prism Element, Prism Central, and Nutanix Move with secure credential storage.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Proxmox VE infrastructure, including VMs, containers, storage, and cluster operations via natural language.MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to manage Proxmox VE infrastructure, including VMs, containers, storage, network, high availability, replication, SDN, and node administration.10033MIT
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Connect AI assistants to ITM Platform projects, tasks, budgets, risks, and team workload.
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/jkmills/nutanix-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server