azureai-optimizer
Version:
AI-Powered Azure Infrastructure Optimization via Model Context Protocol
32 lines (29 loc) • 1.01 kB
JavaScript
/**
* AzureAI Optimizer CLI
* Command-line interface for the AzureAI Optimizer MCP server
*/
// Parse command line arguments
const args = process.argv.slice(2);
// Check if running as MCP server
if (args[0] === 'server' && args[1] === 'start') {
// Always use the full server - no mock data
import('../dist/index.js').then(module => {
return module.main();
}).catch((error) => {
// Don't output to stdout/stderr in MCP mode
process.exit(1);
});
} else {
// Show usage
console.log('AzureAI Optimizer - AI-Powered Azure Infrastructure Optimization');
console.log('');
console.log('Usage:');
console.log(' azureai-optimizer server start Start the MCP server');
console.log('');
console.log('Environment variables:');
console.log(' AZURE_SUBSCRIPTION_ID Azure subscription ID');
console.log(' AZURE_TENANT_ID Azure tenant ID');
console.log(' OPENROUTER_API_KEY OpenRouter API key for AI analysis');
process.exit(0);
}