azureai-optimizer
Version:
AI-Powered Azure Infrastructure Optimization via Model Context Protocol
212 lines (202 loc) • 8.16 kB
JSON
{
"description": "MCP Settings Examples for AzureAI Optimizer with Latest Flagship Models",
"recommended_configuration": {
"description": "OpenRouter with GPT-4.1 and Claude Sonnet 4 (Latest Flagship Models)",
"cline_vscode_format": {
"azure-mcp": {
"command": "npx",
"args": ["-y", "@azureai/optimizer@latest", "server", "start"],
"env": {
"AZURE_SUBSCRIPTION_ID": "your-subscription-id",
"AZURE_TENANT_ID": "your-tenant-id",
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key",
"OPENROUTER_COST_MODEL": "openai/gpt-4.1-preview",
"OPENROUTER_SECURITY_MODEL": "anthropic/claude-3.5-sonnet:beta",
"OPENROUTER_PERFORMANCE_MODEL": "openai/gpt-4.1-preview",
"AZUREAI_LOG_LEVEL": "info"
}
}
}
},
"model_configurations": {
"flagship_models_2025": {
"description": "Latest flagship models as of 2025",
"cost_analysis": {
"primary": "openai/gpt-4.1-preview",
"description": "GPT-4.1 with enhanced financial reasoning and 1M token context",
"strengths": ["Financial analysis", "Cost optimization", "ROI calculations", "Large context"]
},
"security_analysis": {
"primary": "anthropic/claude-3.5-sonnet:beta",
"description": "Claude 3.5 Sonnet with enhanced security expertise",
"strengths": ["Security compliance", "Risk assessment", "Regulatory frameworks", "Code analysis"]
},
"performance_analysis": {
"primary": "openai/gpt-4.1-preview",
"description": "GPT-4.1 for performance bottleneck analysis",
"strengths": ["Performance optimization", "System analysis", "Bottleneck detection"]
}
},
"alternative_models": {
"description": "Alternative high-performance models",
"options": {
"cost_analysis_alternatives": [
"openai/gpt-4-turbo",
"anthropic/claude-3-opus",
"google/gemini-pro-1.5"
],
"security_analysis_alternatives": [
"anthropic/claude-3-opus",
"openai/gpt-4.1-preview",
"anthropic/claude-3.5-sonnet"
]
}
}
},
"configuration_examples": {
"cline_vscode": {
"description": "Configuration for Cline VS Code extension",
"file_location": "VS Code Settings → Extensions → Cline → MCP Settings",
"format": {
"azure-mcp": {
"command": "npx",
"args": ["-y", "@azureai/optimizer@latest", "server", "start"],
"env": {
"AZURE_SUBSCRIPTION_ID": "12345678-1234-1234-1234-123456789012",
"AZURE_TENANT_ID": "87654321-4321-4321-4321-210987654321",
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key",
"OPENROUTER_COST_MODEL": "openai/gpt-4.1-preview",
"OPENROUTER_SECURITY_MODEL": "anthropic/claude-sonnet-4"
}
}
}
},
"claude_desktop": {
"description": "Configuration for Claude Desktop",
"file_location": "~/Library/Application Support/Claude/claude_desktop_config.json",
"format": {
"mcpServers": {
"azureai-optimizer": {
"command": "npx",
"args": ["-y", "@azureai/optimizer@latest", "server", "start"],
"env": {
"AZURE_SUBSCRIPTION_ID": "12345678-1234-1234-1234-123456789012",
"AZURE_TENANT_ID": "87654321-4321-4321-4321-210987654321",
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key",
"OPENROUTER_COST_MODEL": "openai/gpt-4.1-preview",
"OPENROUTER_SECURITY_MODEL": "anthropic/claude-sonnet-4"
}
}
}
}
},
"enterprise_multi_subscription": {
"description": "Enterprise configuration with multiple Azure subscriptions",
"format": {
"azure-mcp-production": {
"command": "npx",
"args": ["-y", "@azureai/optimizer@latest", "server", "start"],
"env": {
"AZURE_SUBSCRIPTION_ID": "prod-subscription-id",
"AZURE_CLIENT_ID": "prod-service-principal-id",
"AZURE_CLIENT_SECRET": "prod-service-principal-secret",
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key",
"OPENROUTER_COST_MODEL": "openai/gpt-4.1-preview",
"OPENROUTER_SECURITY_MODEL": "anthropic/claude-sonnet-4",
"AZUREAI_LOG_LEVEL": "warn"
}
},
"azure-mcp-development": {
"command": "npx",
"args": ["-y", "@azureai/optimizer@latest", "server", "start"],
"env": {
"AZURE_SUBSCRIPTION_ID": "dev-subscription-id",
"AZURE_CLIENT_ID": "dev-service-principal-id",
"AZURE_CLIENT_SECRET": "dev-service-principal-secret",
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key",
"OPENROUTER_COST_MODEL": "openai/gpt-4.1-preview",
"OPENROUTER_SECURITY_MODEL": "anthropic/claude-sonnet-4",
"AZUREAI_LOG_LEVEL": "debug"
}
}
}
}
},
"openrouter_benefits": {
"description": "Why OpenRouter is recommended over direct API access",
"advantages": [
"Access to latest flagship models (GPT-4.1, Claude Sonnet 4)",
"Unified API for multiple providers",
"Better rate limiting and reliability",
"Cost optimization across providers",
"Automatic fallback between models",
"Enhanced model routing capabilities"
],
"cost_comparison": {
"openrouter": "Competitive pricing with unified billing",
"direct_apis": "Multiple billing relationships and potential rate limits"
}
},
"environment_variables": {
"required": {
"AZURE_SUBSCRIPTION_ID": {
"description": "Azure subscription ID to analyze and optimize",
"format": "GUID (12345678-1234-1234-1234-123456789012)",
"example": "12345678-1234-1234-1234-123456789012"
}
},
"recommended": {
"OPENROUTER_API_KEY": {
"description": "OpenRouter API key for access to latest models",
"format": "sk-or-v1-your-key",
"get_key": "https://openrouter.ai/keys"
},
"AZURE_TENANT_ID": {
"description": "Azure tenant ID (auto-detected if not provided)",
"format": "GUID",
"example": "87654321-4321-4321-4321-210987654321"
}
},
"optional_model_overrides": {
"OPENROUTER_COST_MODEL": {
"description": "Model for cost analysis",
"default": "openai/gpt-4.1-preview",
"alternatives": ["openai/gpt-4-turbo", "anthropic/claude-3-opus"]
},
"OPENROUTER_SECURITY_MODEL": {
"description": "Model for security analysis",
"default": "anthropic/claude-3.5-sonnet:beta",
"alternatives": ["anthropic/claude-3-opus", "openai/gpt-4.1-preview"]
},
"OPENROUTER_PERFORMANCE_MODEL": {
"description": "Model for performance analysis",
"default": "openai/gpt-4.1-preview",
"alternatives": ["openai/gpt-4-turbo", "anthropic/claude-3.5-sonnet:beta"]
}
}
},
"quick_setup_steps": {
"step_1": "Get OpenRouter API key from https://openrouter.ai/keys",
"step_2": "Get your Azure subscription ID from Azure portal",
"step_3": "Copy the configuration format for your MCP client",
"step_4": "Replace placeholder values with your actual credentials",
"step_5": "Restart your MCP client (VS Code, Claude Desktop, etc.)",
"step_6": "Test with: 'Analyze my Azure costs for the last 30 days'"
},
"troubleshooting": {
"common_issues": {
"invalid_openrouter_key": {
"error": "OpenRouter authentication failed",
"solution": "Verify your OPENROUTER_API_KEY starts with 'sk-or-v1-' and is valid"
},
"model_not_found": {
"error": "Model not available",
"solution": "Check OpenRouter model availability at https://openrouter.ai/models"
},
"azure_auth_failed": {
"error": "Azure authentication failed",
"solution": "Run 'az login' or verify service principal credentials"
}
}
}
}