Class: Aidp::CLI::McpDashboard
- Inherits:
-
Object
- Object
- Aidp::CLI::McpDashboard
- Includes:
- MessageDisplay
- Defined in:
- lib/aidp/cli/mcp_dashboard.rb
Overview
Dashboard for viewing MCP servers across all providers
Constant Summary
Constants included from MessageDisplay
Instance Method Summary collapse
-
#check_task_eligibility(required_servers) ⇒ Object
Get MCP server availability for a specific task requirement.
-
#display_dashboard(options = {}) ⇒ Object
Display MCP dashboard showing all servers across all providers.
-
#display_task_eligibility(required_servers) ⇒ Object
Display eligibility check for specific servers.
-
#initialize(root_dir = nil, configuration: nil, provider_info_class: Aidp::Harness::ProviderInfo) ⇒ McpDashboard
constructor
A new instance of McpDashboard.
Methods included from MessageDisplay
#display_message, included, #message_display_prompt
Constructor Details
#initialize(root_dir = nil, configuration: nil, provider_info_class: Aidp::Harness::ProviderInfo) ⇒ McpDashboard
Returns a new instance of McpDashboard.
13 14 15 16 17 |
# File 'lib/aidp/cli/mcp_dashboard.rb', line 13 def initialize(root_dir = nil, configuration: nil, provider_info_class: Aidp::Harness::ProviderInfo) @root_dir = root_dir || Dir.pwd @configuration = configuration || Aidp::Harness::Configuration.new(@root_dir) @provider_info_class = provider_info_class end |
Instance Method Details
#check_task_eligibility(required_servers) ⇒ Object
Get MCP server availability for a specific task requirement
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/aidp/cli/mcp_dashboard.rb', line 57 def check_task_eligibility(required_servers) server_matrix = build_server_matrix eligible_providers = [] @configuration.provider_names.each do |provider| provider_servers = server_matrix[:provider_servers][provider] || [] enabled_servers = provider_servers.select { |s| s[:enabled] }.map { |s| s[:name] } # Check if provider has all required servers if required_servers.all? { |req| enabled_servers.include?(req) } eligible_providers << provider end end { required_servers: required_servers, eligible_providers: eligible_providers, total_providers: @configuration.provider_names.size } end |
#display_dashboard(options = {}) ⇒ Object
Display MCP dashboard showing all servers across all providers
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/aidp/cli/mcp_dashboard.rb', line 20 def display_dashboard( = {}) no_color = [:no_color] || false # Gather MCP server information from all providers server_matrix = build_server_matrix # Display summary ("MCP Server Dashboard", type: :highlight) ("=" * 80, type: :muted) ("", type: :info) # Check if there are any MCP-capable providers if server_matrix[:providers].empty? ("No providers with MCP support configured.", type: :info) ("MCP is supported by providers like: claude", type: :muted) ("\n" + "=" * 80, type: :muted) return end # Check if there are any MCP servers configured if server_matrix[:servers].empty? ("No MCP servers configured across any providers.", type: :info) ("Add MCP servers with: claude mcp add <name> -- <command>", type: :muted) ("\n" + "=" * 80, type: :muted) return end # Display the main table display_server_table(server_matrix, no_color) # Display eligibility warnings display_eligibility_warnings(server_matrix) ("\n" + "=" * 80, type: :muted) end |
#display_task_eligibility(required_servers) ⇒ Object
Display eligibility check for specific servers
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/aidp/cli/mcp_dashboard.rb', line 79 def display_task_eligibility(required_servers) result = check_task_eligibility(required_servers) ("\nTask Eligibility Check", type: :highlight) ("Required MCP Servers: #{required_servers.join(", ")}", type: :info) ("", type: :info) if result[:eligible_providers].any? ("✓ Eligible Providers (#{result[:eligible_providers].size}/#{result[:total_providers]}):", type: :success) result[:eligible_providers].each do |provider| (" • #{provider}", type: :success) end else ("✗ No providers have all required MCP servers", type: :error) (" Consider configuring MCP servers for at least one provider", type: :warning) end end |