Content
# nutanix-mcp-server
> FastAPI implementation of MCP (Model Context Protocol) server to retrieve cluster and virtual machine information in conjunction with Nutanix Prism Central
## Overview
This project implements a Minimum Viable Product (MVP) of a Model Context Protocol (MCP) server for Nutanix environments. The primary objective is to retrieve cluster information from Nutanix Prism Central using FastAPI, and this MVP serves as a foundation for future functional enhancements (additional information retrieval, model operations, security enhancements, etc.). Please do not use this prototype in production environments.
## Operating Environment
- OS: macOS, Linux, Windows (including WSL2)
- Python: 3.12 or higher recommended
- pip: 23.x or higher recommended
- Nutanix Prism Central API version: v4.0.2 (Cluster Management API)
- Nutanix Prism Central API version: v4.0 (Virtual Machine Management API)
## Usage
### Setup Procedure
```bash
# Clone the repository
git clone https://github.com/takanorisuzuki/nutanix-mcp-server-jp.git
cd nutanix-mcp-server-jp
# Create and activate a virtual environment (optional)
python3 -m venv venv
source venv/bin/activate # For Windows, use venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create a .env file
cp .env.example .env
```
## .env File Configuration
Create a `.env` file with the following content to define authentication and connection information:
```dotenv
PRISM_CENTRAL_IP=192.168.10.11
PRISM_CENTRAL_PORT=9440
PRISM_CENTRAL_USERNAME=admin
PRISM_CENTRAL_PASSWORD=your_password_here
# VERIFY_SSL="false"
```
> Place the `.env` file in the project root. It is excluded from commits by `.gitignore`.
- **SSL Verification**:
Currently, to support self-signed certificates, certificate verification is disabled (`verify=False`). In production environments, implement proper SSL verification.
Values in `.env` are treated as strings. When using `VERIFY_SSL`, enclose it in quotes like `"false"` or convert the string to a boolean in the code.
### Start the Server
Use uvicorn to start the MCP server:
```bash
uvicorn app:app --reload
```
The MCP server starts at `http://127.0.0.1:8000`.
### API Endpoint Confirmation
- **Swagger UI**: Access `http://127.0.0.1:8000/docs` in a browser to view and test API documentation.
- **Using curl**:
- `/clusters`: Returns basic Nutanix cluster information (UUID, cluster name, node configuration, etc.).
- `/vms`: Returns virtual machine information (name, vCPU, memory configuration, etc.) on Prism Central.
```bash
curl -v http://127.0.0.1:8000/clusters
curl -v http://127.0.0.1:8000/vms
```
### Dify Integration
This repository includes an OpenAPI schema file `dify-openapi-schema.json` for registering the MCP server as a custom tool in Dify.
By using this schema to register a custom tool on Dify and assigning it to an agent, you can retrieve and confirm Nutanix cluster information and virtual machine information using natural language.
1. In the Dify management screen, create a new tool under "Tools" > "Custom Tools" named `Nutanix MCP Server`.
2. Paste the schema defined in `dify-openapi-schema.json`.
3. Verify that `getClusters` and `getVms` are available tools and that tests work correctly.
4. Create a new agent and specify the custom tool with the MCP server registered.
5. On the agent screen, ask a question in natural language, such as "Tell me the cluster information," and the MCP server will query and return the result.
> **Connection Address**:
> If Dify is running on Podman, you can use `http://host.containers.internal:8000` as the MCP server address without modifying `dify-openapi-schema.json`.
> In other environments like Docker, replace it with an appropriate hostname or IP address, such as `http://host.docker.internal:8000`.
## Update History
- **2025-04-18**: Initial release of version `v0.1.0`.
- Implemented `/clusters` and `/vms` endpoints.
- Integrated with Nutanix Prism Central.
- REST API server using FastAPI.
- Externalized authentication and connection settings using `.env`.
- OpenAPI schema compatible with Dify integration.
## Contribution
Contributions are welcome. Please submit Pull Requests for feature improvements or bug fixes. Before making significant changes, create an Issue to discuss.
## License
This project is licensed under the conditions specified in the LICENSE file.
## Future Extensions
- Adding detailed virtual machine information (NIC/disk configuration)
- Implementing a detailed display endpoint for a single cluster
- Introducing operational APIs (e.g., starting/stopping virtual machines) by integrating Nutanix API vmm
- Supporting interactive operations from Dify
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
firecrawl
Firecrawl MCP Server enables web scraping, crawling, and content extraction.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers