Labsco
bivex logo

VixMCP.Ai.Bridge

β˜… 3

from bivex

An MCP server that exposes VMware VIX operations for AI assistants and automation workflows.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

πŸ–₯️ .NET Bindings for VMware VIX API and MCP Integration

.NET VMware MCP License Platform Automated by πŸ€–

πŸš€ Powerful VMware virtual machine automation through AI-driven Model Context Protocol integration

Keywords: VMware VIX β€’ Model Context Protocol β€’ .NET 9.0 β€’ AI Automation β€’ Virtual Machine Management β€’ Cursor IDE β€’ C# Bindings

This repository contains .NET bindings for the VMware VIX (Virtual Infrastructure eXtension) API and a Model Context Protocol (MCP) server implementation for VM management operations.

πŸ“¦ Projects

πŸ”§ VixBindings

VMware VIX API .NET Library
A comprehensive .NET 9.0 library providing C# bindings for the VMware VIX API, enabling programmatic control of VMware virtual machines.

πŸ€– McpProcessToolSample

Model Context Protocol Server
A .NET 9.0 console application implementing an MCP server that exposes VMware VIX operations as tools for AI assistants and automation workflows.

✨ Features

πŸ”§ VixBindings Library

  • Complete VIX API Coverage: Full P/Invoke declarations for VMware VIX API
  • VM Lifecycle Management: Power on/off, suspend, reset operations
  • Guest OS Operations: File transfer, command execution, process management
  • Snapshot Management: Create, revert, and manage VM snapshots
  • Shared Folders: Configure and manage host-guest shared directories
  • Error Handling: Comprehensive error checking and reporting
  • Helper Utilities: Simplified command execution and file operations

πŸ€– MCP Server Implementation

  • Session Management: Persistent VM connections for multiple operations
  • Guest Command Execution: Run commands in guest OS and retrieve output
  • Process Monitoring: List and manage processes in guest VMs
  • Connection Testing: Validate VM connectivity and guest access
  • MCP Protocol: Standard Model Context Protocol for AI integration

MCP Tools Available

ConnectAndLogin

Establishes a persistent session with a VM and guest OS.

Parameters:

  • hostName: VMware host address
  • hostPort: Connection port
  • hostUserName: Host authentication username
  • hostPassword: Host authentication password
  • vmxFilePath: Path to VM configuration file
  • guestUserName: Guest OS username
  • guestPassword: Guest OS password

ExecCommandInGuestSession

Executes commands in the guest OS using an active session.

Parameters:

  • command: Command to execute
  • guestTempPath: Temporary directory in guest (default: /tmp)
  • hostTempPath: Temporary directory on host (default: C:\\temp)

ListAllProcessesInGuest

Lists all running processes in the guest VM.

Parameters:

  • guestTempPath: Temporary directory in guest
  • hostTempPath: Temporary directory on host

CheckGuestConnection

Tests connectivity and authentication without maintaining a session.

Cursor IDE Integration

Once configured in Cursor IDE, you can use natural language to interact with VMware VMs:

Example prompts:

  • "Connect to my Ubuntu VM and list all running processes"
  • "Execute 'df -h' command in the guest OS to check disk usage"
  • "Check if I can connect to the VM with these credentials"
  • "Run a system update command in the guest VM"

The AI assistant will automatically use the appropriate MCP tools based on your requests, handling VM connections, command execution, and result parsing.

Error Handling

The library provides comprehensive error handling through:

  • VIX error code translation to human-readable messages
  • Structured error responses in MCP tools
  • Timeout handling for long-running operations
  • Resource cleanup and handle management

Security Considerations

  • Store VM credentials securely (avoid hardcoding)
  • Use least-privilege accounts for guest operations
  • Validate and sanitize command inputs
  • Monitor temporary file cleanup
  • Consider network security for remote VM connections

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

Project Code

The .NET bindings and MCP server implementation in this repository are provided as-is for educational and development purposes.

VMware VIX API License

IMPORTANT: This project uses the VMware VIX API, which is subject to the VMware Software Developer Kit (SDK) Agreement. Key points:

  • The VIX API SDK is provided "AS IS" without warranties
  • You may use it to create software that communicates with VMware products
  • Redistributable Code must be distributed in object code form only
  • You cannot reverse engineer or create derivative works of the Redistributable Code
  • VMware retains all intellectual property rights to the SDK
  • No VMware support is provided for SDK usage
  • You cannot represent your software as certified by VMware
  • VMware trademarks cannot be used without permission

Compliance Requirements

Before using this code:

  1. Download the official VIX API SDK from VMware's website
  2. Review and accept the complete VMware SDK Agreement
  3. Ensure you have the proper Vix64AllProductsDyn.dll from the official SDK
  4. Comply with all redistribution and usage restrictions
  5. Do not redistribute the VMware SDK components separately

Disclaimer

This repository does not include VMware's proprietary VIX API components. Users must obtain these directly from VMware and comply with VMware's licensing terms. The authors of this repository are not responsible for any licensing violations or improper use of VMware's intellectual property.

Usage Through AI Assistants (Cursor IDE, etc.)

Using this MCP server through AI assistants like Cursor IDE is compliant with VMware's SDK Agreement as long as:

  • The underlying purpose remains "creating software that communicates with VMware Software"
  • Users have properly licensed VMware products (Workstation Pro/Player, vSphere, etc.)
  • The VIX SDK components are obtained through official VMware channels
  • No reverse engineering or unauthorized modifications are performed
  • The AI assistant is simply automating legitimate VM management tasks

This integration does not change the licensing requirements - users must still comply with all VMware SDK Agreement terms.


🏷️ Tags

#VMware #VIX #DotNet #CSharp #ModelContextProtocol #MCP #AI #Automation #VirtualMachine #VMAutomation #AIAssistant #CursorIDE #DevTools #Virtualization #WindowsDevelopment #SDK #API #CloudComputing #Infrastructure #DevOps

Related Documentation

Support

For issues and questions:

  1. Check the troubleshooting section above
  2. Review VMware VIX API documentation
  3. Create an issue in this repository