mcp-nutanix

by thunderboltsid
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Integrates with Make for building the MCP server and running utility commands like code generation.

  • Enables interaction with Nutanix Prism Central APIs, providing tools for listing and retrieving detailed information about various resources such as VMs, clusters, hosts, images, and subnets within a Nutanix environment.

MCP Nutanix

用于通过大型语言模型 (LLM) 与 Nutanix Prism Central API 交互的模型上下文协议 (MCP) 服务器。

⚠️ 免责声明

这是一个实验项目

该项目是作为个人项目创建的,旨在探索 Go 中模型上下文协议框架的功能。它具有以下特点:

  • 并非Nutanix 官方产品或工具
  • Nutanix支持、认可或维护
  • 适合生产环境
  • **按原样提供,**不提供任何担保或保证

使用风险自负:作者对使用此代码可能造成的任何问题、损害或中断不承担任何责任。

概述

该 MCP 服务器允许 LLM 通过以下方式与 Nutanix Prism Central 进行交互:

  1. 使用用户凭证连接到 Prism Central 实例
  2. 列出各种资源(虚拟机、集群、主机等)
  3. 通过基于 URI 的访问检索特定资源详细信息

该实现使用Prism Go Client与 Prism Central 进行通信,并使用MCP Go 库实现模型上下文协议。

入门

先决条件

  • Go 1.23 或更高版本
  • 访问 Nutanix Prism Central 实例
  • 用于构建的工具,例如makego fmt

建筑

# Clone the repository git clone https://github.com/thunderboltsid/mcp-nutanix.git cd mcp-nutanix # Build the MCP server make build

跑步

./bin/mcp-nutanix

服务器将启动并提示输入 Prism Central 凭证。

用法

一旦 MCP 服务器运行并连接到您的 Prism Central 实例,LLM 就可以通过 MCP 协议与其交互。

资源列表

要列出资源,请使用适当的工具:

vms clusters hosts images subnets

LLM 将收到一个它可以解析和分析的资源 JSON 列表。

资源访问

要访问特定资源,请使用资源 URI:

vm://{uuid} cluster://{uuid} host://{uuid}

LLM 将收到有关特定资源的详细 JSON 信息。

发展

项目结构

mcp-nutanix/ ├── bin/ # Compiled binaries ├── internal/ # Internal packages │ ├── client/ # Prism Central client handling │ ├── codegen/ # Code generation utilities │ └── json/ # JSON helpers ├── pkg/ # components │ ├── prompts/ # MCP prompt implementations │ ├── resources/ # Resource handlers │ └── tools/ # Tool handlers └── Makefile # Build and utility commands

代码生成

该项目使用代码生成来创建资源和工具处理程序。要更新这些内容,请执行以下操作:

make generate

限制

  • 响应大小受 MCP 协议限制
  • 一些响应规模较大的资源可能会导致错误
  • 当前实现不支持分页
  • 仅支持读取操作,不支持创建/更新/删除

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

致谢

贡献

这是一个实验性项目,目前尚无正式的贡献流程。欢迎随时创建问题或提交拉取请求。

ID: vdwxnpsndp