VME Infrastructure Management CLI Tool - Chat interface with voice commands
Project description
VME/Morpheus FastMCP Server v2
Advanced MCP server for HPE VM Essentials (VME) and Morpheus infrastructure management with automatic platform detection and intelligent tool filtering.
NEW: Now includes a sophisticated VME Textual CLI Client with OpenAI Realtime API audio integration for voice-enabled infrastructure management.
Features
- 🔍 Automatic Platform Detection - Detects VME vs Morpheus Enterprise at startup
- ⚡ Dynamic Route Filtering - Only exposes available endpoints based on platform capabilities
- 🛠️ Comprehensive Tool Suite - 17+ VME management tools for VMs, storage, networking
- 🎙️ Voice-Enabled Chat Interface - OpenAI Realtime API integration with microphone support
- 🧪 Advanced Testing Framework - Multi-test suite with single test execution
- 🏗️ Real Infrastructure Integration - Works with live VME/Morpheus deployments
Quick Start
🚀 VME Textual CLI Client (NEW)
Manage VME infrastructure through natural language chat with voice support:
Audio Setup (For Microphone Support)
Fedora/RHEL:
# Install PortAudio for real microphone access
sudo dnf install -y portaudio-devel
# Install Python audio dependencies
uv add pyaudio
# Verify audio system
pactl info
Ubuntu/Debian:
sudo apt-get install portaudio19-dev
uv add pyaudio
Quick Start
-
Setup Environment
# Edit .env with your credentials echo "VME_API_BASE_URL=https://your-vme-server/api" >> .env echo "VME_API_TOKEN=your-api-token" >> .env echo "ANTHROPIC_API_KEY=your-anthropic-key" >> .env echo "OPENAI_API_KEY=your-openai-key" >> .env # For audio features
-
Install Dependencies
uv sync -
Launch Client
# Simple launch (loads API keys from .env) python launch_client.py # Or use module directly python -m src.clients.textual_cli.main
-
Configure Audio (Optional)
# Edit vme_client.yaml to enable voice features audio: enabled: true # Enable audio support voice: "alloy" # OpenAI voice (alloy, echo, fable, onyx, nova, shimmer) model: "gpt-4o-realtime-preview-2024-10-01"
-
Start Chatting
💬 Try these commands (type or speak): • "What tools are available?" • "Discover compute infrastructure" • "List all VMs" • "Get appliance settings" • "Create a VM called test-server"Audio Features:
- 🎤 Microphone Status: Visual indicator when listening/speaking
- 🔊 Voice Responses: AI responds with speech + text
- 📊 Audio Levels: Real-time visualization of microphone input
- 🎛️ System Integration: Linux system tray shows mic activity
🔧 MCP Server Only
-
Setup Environment
# Copy environment template cp .env.example .env # Edit with your VME/Morpheus credentials vim .env
-
Install Dependencies
uv sync -
Run Server
# Auto-detecting server (recommended) uv run python vme_server_filtered.py # With MCP Inspector for testing ./scripts/test-with-inspector.sh
Testing
# Run all tests
uv run python tests/test_fastmcp_client.py
# Run single test
uv run python tests/test_fastmcp_client.py check_license_info
# Available test cases
uv run python tests/test_fastmcp_client.py invalid_name
VME Textual CLI Client
Features
🎨 Rich Terminal Interface
- GitHub-inspired dark theme with professional styling
- Real-time thinking indicators with animations
- Markdown rendering for LLM responses
- Clean chat interface with syntax highlighting
🧠 AI-Powered Infrastructure Management
- Natural language VM creation and management
- Intelligent tool discovery and calling
- Context-aware infrastructure operations
- Support for both Anthropic Claude and OpenAI GPT
🔧 Progressive Discovery Workflow
- Start with 18 basic tools
- Unlock tool groups on demand:
discover_compute_infrastructure()→ 40+ VM tools - Logical grouping: compute, networking, storage, monitoring, management
- Guided workflows for complex operations
⚙️ Smart Configuration
- YAML-based configuration with environment variable resolution
- Auto-loading from
.envfiles - Configurable timeouts, themes, and LLM settings
- Validation for API keys and server connectivity
Client Architecture
src/clients/textual_cli/
├── main.py # CLI entry point with Click interface
├── config/
│ └── settings.py # YAML config system with .env support
├── ui/
│ └── app.py # Textual interface (GitHub theme, chat area)
├── mcp/
│ └── manager.py # FastMCP client integration
└── llm/
└── manager.py # LLM providers (Anthropic/OpenAI)
launch_client.py # Simple launcher script
vme_client.yaml # Default client configuration
test_client.py # Component testing utility
Usage Examples
# Basic infrastructure queries
"What tools are available?"
"Get appliance settings"
"Show current license information"
# VM Management
"List all virtual machines"
"Create a VM called 'web-server-01' with large size"
"Show me VM creation options"
# Progressive Discovery
"Discover compute infrastructure" # Unlocks 40+ VM tools
"Discover networking capabilities" # Unlocks network tools
"Discover storage capabilities" # Unlocks storage tools
"What infrastructure is available?" # Overview of all capabilities
# Advanced Operations
"Create a web server VM with 4 CPUs"
"Show me all running VMs in zone us-east-1"
"What instance types are available?"
Configuration
Default config (vme_client.yaml):
llm:
anthropic_key: ${ANTHROPIC_API_KEY}
default_provider: anthropic
default_model: claude-3-5-sonnet-20241022
server:
script_path: src/servers/progressive_discovery_server.py
auto_connect: true
timeout: 30
ui:
theme: github_dark
show_thinking_indicator: true
max_message_history: 1000
Architecture
api_utils.py # Shared API utilities and platform detection
vme_server_filtered.py # Main MCP server with filtering
src/servers/
progressive_discovery_server.py # Progressive discovery for clients
vme_server_adaptive.py # Client-adaptive server
src/clients/textual_cli/ # Textual CLI client
tests/
test_fastmcp_client.py # Comprehensive test suite
config/ # YAML route configurations (future)
scripts/ # Testing and development scripts
Platform Detection
The server automatically detects platform type using license endpoint:
from api_utils import detect_platform_type
platform = detect_platform_type(api_url, token)
# Returns: 'vme', 'morpheus', or 'unknown'
Available Tools
VME Core Tools
- VM Management: Create, list, manage instances
- Platform Info: License status, appliance settings
- Instance Types: Provisioning options and configurations
- Infrastructure: Basic storage, networking, zones
Enterprise Tools (Morpheus Only) 🏢
- Advanced reporting and analytics
- Workflow automation
- Multi-cloud management
- Enterprise billing and costing
Configuration
Environment Variables
VME_API_BASE_URL=https://your-vme-server/api
VME_API_TOKEN=your-api-token
ANTHROPIC_API_KEY=your-anthropic-key # For testing
MCP Client Configuration
{
"mcpServers": {
"vme-infrastructure": {
"command": "uv",
"args": ["run", "python", "vme_server_filtered.py"],
"env": {
"VME_API_BASE_URL": "https://vmemgr01.lab.loc/api",
"VME_API_TOKEN": "your-token-here"
}
}
}
}
Development
-
Platform Detection Testing
uv run python tests/test_fastmcp_client.py check_license_info
-
VM Operations Testing
uv run python tests/test_fastmcp_client.py list_running_vms
-
Full Test Suite
uv run python tests/test_fastmcp_client.py
Known Issues
- Claude Code MCP client has bugs with tool name limits (use MCP Inspector for testing)
- VME returns 403 for enterprise-only endpoints (expected behavior)
- FastMCP route filtering logs may interfere with stdio transport
License
Private repository - Internal use only.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vme_mcp_cli-0.1.3.tar.gz.
File metadata
- Download URL: vme_mcp_cli-0.1.3.tar.gz
- Upload date:
- Size: 85.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e2b209967c2a35d2fa2eba2623681ead8eaeea9f27bde33d362f46366cc9e41
|
|
| MD5 |
6f95dcd4a97488af803e9ab2fedf32e3
|
|
| BLAKE2b-256 |
c4de5afafbc861ed73672ebcaa833d13f22f8c9c52ffb97c07a24d0edfe7a3dd
|
File details
Details for the file vme_mcp_cli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: vme_mcp_cli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 106.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1c608e9f68f26ec563c598b918e66f20a93c2aa54c687d7999abdf11b8581da
|
|
| MD5 |
044cb15dd650d90c513633c60e16e8ed
|
|
| BLAKE2b-256 |
089657b25500eac25758f99221cbe2e6403312917942099cc55464b982e66a24
|