UNPKG

azureai-optimizer

Version:

AI-Powered Azure Infrastructure Optimization via Model Context Protocol

410 lines (400 loc) 12.4 kB
{ "description": "MCP Configuration Examples for AzureAI Optimizer", "examples": { "vs_code_github_copilot": { "description": "Configuration for VS Code with GitHub Copilot", "file_path": ".vscode/mcp.json", "config": { "servers": { "AzureAI Optimizer": { "command": "npx", "args": [ "-y", "@azureai/optimizer@latest", "server", "start" ], "env": { "AZURE_SUBSCRIPTION_ID": "your-subscription-id", "AZURE_TENANT_ID": "your-tenant-id", "AZUREAI_LOG_LEVEL": "info" } } } } }, "claude_desktop": { "description": "Configuration for Claude Desktop", "file_path": "~/Library/Application Support/Claude/claude_desktop_config.json", "config": { "mcpServers": { "azureai-optimizer": { "command": "npx", "args": [ "-y", "@azureai/optimizer@latest", "server", "start" ], "env": { "AZURE_SUBSCRIPTION_ID": "your-subscription-id", "AZURE_TENANT_ID": "your-tenant-id" } } } } }, "sse_transport": { "description": "Server-Sent Events transport for web clients", "config": { "servers": { "AzureAI Optimizer SSE": { "command": "npx", "args": [ "-y", "@azureai/optimizer@latest", "server", "start", "--transport", "sse", "--port", "8080" ], "env": { "AZURE_SUBSCRIPTION_ID": "your-subscription-id", "AZURE_TENANT_ID": "your-tenant-id" } } } }, "client_url": "http://localhost:8080/sse" }, "multi_subscription": { "description": "Configuration for multiple Azure subscriptions", "config": { "servers": { "AzureAI Production": { "command": "npx", "args": [ "-y", "@azureai/optimizer@latest", "server", "start" ], "env": { "AZURE_SUBSCRIPTION_ID": "prod-subscription-id", "AZURE_TENANT_ID": "your-tenant-id", "AZUREAI_LOG_LEVEL": "warn" } }, "AzureAI Development": { "command": "npx", "args": [ "-y", "@azureai/optimizer@latest", "server", "start" ], "env": { "AZURE_SUBSCRIPTION_ID": "dev-subscription-id", "AZURE_TENANT_ID": "your-tenant-id", "AZUREAI_LOG_LEVEL": "debug" } } } } }, "enterprise_config": { "description": "Enterprise configuration with service principal authentication", "config": { "servers": { "AzureAI Optimizer Enterprise": { "command": "npx", "args": [ "-y", "@azureai/optimizer@latest", "server", "start" ], "env": { "AZURE_SUBSCRIPTION_ID": "enterprise-subscription-id", "AZURE_TENANT_ID": "enterprise-tenant-id", "AZURE_CLIENT_ID": "service-principal-client-id", "AZURE_CLIENT_SECRET": "service-principal-secret", "AZUREAI_LOG_LEVEL": "info", "AZUREAI_CACHE_TTL": "600", "AZUREAI_MAX_CONCURRENT_REQUESTS": "20" } } } } }, "docker_deployment": { "description": "Docker container deployment configuration", "dockerfile": "FROM node:18-alpine\nWORKDIR /app\nRUN npm install -g @azureai/optimizer\nCMD [\"azureai-optimizer\", \"server\", \"start\"]", "docker_compose": { "version": "3.8", "services": { "azureai-optimizer": { "image": "node:18-alpine", "command": "npx -y @azureai/optimizer@latest server start --transport sse --port 8080", "ports": ["8080:8080"], "environment": { "AZURE_SUBSCRIPTION_ID": "${AZURE_SUBSCRIPTION_ID}", "AZURE_TENANT_ID": "${AZURE_TENANT_ID}", "AZURE_CLIENT_ID": "${AZURE_CLIENT_ID}", "AZURE_CLIENT_SECRET": "${AZURE_CLIENT_SECRET}" }, "restart": "unless-stopped" } } } }, "azure_container_instances": { "description": "Azure Container Instances deployment", "arm_template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "subscriptionId": { "type": "string", "metadata": { "description": "Azure subscription ID to optimize" } }, "tenantId": { "type": "string", "metadata": { "description": "Azure tenant ID" } } }, "resources": [ { "type": "Microsoft.ContainerInstance/containerGroups", "apiVersion": "2023-05-01", "name": "azureai-optimizer", "location": "[resourceGroup().location]", "properties": { "containers": [ { "name": "mcp-server", "properties": { "image": "node:18-alpine", "command": [ "npx", "-y", "@azureai/optimizer@latest", "server", "start", "--transport", "sse", "--port", "8080" ], "ports": [ { "port": 8080, "protocol": "TCP" } ], "resources": { "requests": { "cpu": 1, "memoryInGB": 2 } }, "environmentVariables": [ { "name": "AZURE_SUBSCRIPTION_ID", "value": "[parameters('subscriptionId')]" }, { "name": "AZURE_TENANT_ID", "value": "[parameters('tenantId')]" } ] } } ], "osType": "Linux", "restartPolicy": "Always", "ipAddress": { "type": "Public", "ports": [ { "port": 8080, "protocol": "TCP" } ] } } } ] } }, "kubernetes_deployment": { "description": "Kubernetes deployment configuration", "manifests": { "deployment": { "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "azureai-optimizer", "labels": { "app": "azureai-optimizer" } }, "spec": { "replicas": 3, "selector": { "matchLabels": { "app": "azureai-optimizer" } }, "template": { "metadata": { "labels": { "app": "azureai-optimizer" } }, "spec": { "containers": [ { "name": "mcp-server", "image": "node:18-alpine", "command": [ "npx", "-y", "@azureai/optimizer@latest", "server", "start", "--transport", "sse", "--port", "8080" ], "ports": [ { "containerPort": 8080 } ], "env": [ { "name": "AZURE_SUBSCRIPTION_ID", "valueFrom": { "secretKeyRef": { "name": "azure-credentials", "key": "subscription-id" } } }, { "name": "AZURE_TENANT_ID", "valueFrom": { "secretKeyRef": { "name": "azure-credentials", "key": "tenant-id" } } } ], "resources": { "requests": { "cpu": "500m", "memory": "1Gi" }, "limits": { "cpu": "1000m", "memory": "2Gi" } } } ] } } } }, "service": { "apiVersion": "v1", "kind": "Service", "metadata": { "name": "azureai-optimizer-service" }, "spec": { "selector": { "app": "azureai-optimizer" }, "ports": [ { "port": 80, "targetPort": 8080 } ], "type": "LoadBalancer" } } } } }, "environment_variables": { "required": { "AZURE_SUBSCRIPTION_ID": { "description": "Azure subscription ID to analyze and optimize", "example": "12345678-1234-1234-1234-123456789012" } }, "optional": { "AZURE_TENANT_ID": { "description": "Azure tenant ID (auto-detected if not provided)", "example": "87654321-4321-4321-4321-210987654321" }, "AZURE_CLIENT_ID": { "description": "Service principal client ID for authentication", "example": "abcdef12-3456-7890-abcd-ef1234567890" }, "AZURE_CLIENT_SECRET": { "description": "Service principal client secret", "example": "your-client-secret" }, "AZUREAI_LOG_LEVEL": { "description": "Logging level (debug, info, warn, error)", "default": "info" }, "AZUREAI_CACHE_TTL": { "description": "Cache time-to-live in seconds", "default": "300" }, "AZUREAI_MAX_CONCURRENT_REQUESTS": { "description": "Maximum concurrent Azure API requests", "default": "10" } } }, "usage_examples": { "cost_analysis": [ "Analyze my Azure costs for the last 30 days", "What are my top 5 most expensive resources?", "Show me cost optimization opportunities", "Compare this month's costs to last month" ], "security_assessment": [ "Check my Azure security compliance for SOC2", "Assess my security posture", "What security vulnerabilities do I have?", "Review my network security groups" ], "performance_optimization": [ "Analyze my VM performance and suggest optimizations", "What resources are underutilized?", "Recommend right-sizing for my databases", "Check my application performance bottlenecks" ], "resource_management": [ "List all my unused Azure resources", "Show me resources without proper tags", "What backup policies are missing?", "Analyze my reserved instance coverage" ] } }