Skip to main content
Glama
jkmills

Nutanix MCP Server

by jkmills

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)

工具

描述

list_vms

使用 OData 过滤列出虚拟机

get_vm

通过 UUID 获取完整的虚拟机配置

power_on_vm

开启虚拟机

power_off_vm

关闭虚拟机 (ACPI 或强制关闭)

create_vm

创建新虚拟机

集群管理 (Prism Central v4)

工具

描述

list_clusters

列出已注册的集群

get_cluster

获取集群详情

list_hosts

列出管理程序主机

get_host

获取主机详情

list_storage_containers

列出存储容器

网络与镜像 (Prism Central v4)

工具

描述

list_subnets

列出包含 CIDR、VLAN ID 和集群信息的子网/VLAN

get_subnet

获取子网详情,包括 IP 池和 DHCP 配置

list_images

列出镜像库中的磁盘镜像 (ISO, QCOW2)

get_image

获取镜像详情 — 大小、类型、来源

list_categories

列出用于资源标记的类别键和值

get_category

获取特定类别键的所有值

Prism Element (v2 — 直接集群访问)

工具

描述

pe_get_cluster_info

集群健康状况、版本和容量

pe_list_vms

特定 PE 集群上的虚拟机

pe_list_hosts

包含硬件详情的主机

pe_list_containers

包含复制信息的存储容器

pe_list_storage_pools

存储池和磁盘组成

pe_list_disks

物理磁盘清单和状态

pe_list_alerts

活动/已解决的告警

pe_list_protection_domains

数据保护策略

pe_list_snapshots

每个保护域的快照

竣工报告

工具

描述

generate_environment_report

完整环境报告 — 所有集群、主机、存储、网络、虚拟机及拓扑图

generate_cluster_report

一个或多个集群的详细报告 — 配置、主机、容器、子网、虚拟机及架构图

generate_vm_report

特定虚拟机的详细报告 — 计算、磁盘、网卡、类别、引导配置及布局图

报告输出 Markdown 文档和用于视觉拓扑表示的 Excalidraw JSON 图表。

MCP 资源 (基于 URI 的浏览)

服务器通过 nutanix:// URI 暴露资源,允许 LLM 在无需显式调用工具的情况下浏览实体:

URI 模式

描述

nutanix://vms

浏览所有虚拟机

nutanix://vms/{uuid}

获取特定虚拟机

nutanix://clusters

浏览所有集群

nutanix://clusters/{uuid}

获取特定集群

nutanix://hosts/{uuid}

获取特定主机

nutanix://subnets/{uuid}

获取特定子网

nutanix://images/{uuid}

获取特定镜像

MCP 提示词

提示词

描述

set_credentials

交互式凭据配置 (针对不支持环境变量的客户端)

nutanix_overview

指导性环境概览 — 集群、主机、存储、告警

设置

先决条件

  • 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 .env
NUTANIX_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_mcp

MCP 客户端配置

此服务器使用 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.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.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 (首选)

/api/{namespace}/v4.0/{path}

虚拟机、集群、主机、网络

v3 (回退)

/api/nutanix/v3/{resource}/list

尚未在 v4 中提供的资源

v2 (PE 直接)

https://{pe_ip}:9440/api/nutanix/v2.0/{resource}

集群级存储、磁盘、告警

发现 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

参考资料

Install Server
A
license - permissive license
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    C
    maintenance
    MCP 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.
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to manage Proxmox VE infrastructure, including VMs, containers, storage, and cluster operations via natural language.
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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