using MCPForUnity.Editor.Models; namespace MCPForUnity.Editor.Services { /// /// Service for configuring MCP clients /// public interface IClientConfigurationService { /// /// Configures a specific MCP client /// /// The client to configure void ConfigureClient(McpClient client); /// /// Configures all detected/installed MCP clients (skips clients where CLI/tools not found) /// /// Summary of configuration results ClientConfigurationSummary ConfigureAllDetectedClients(); /// /// Checks the configuration status of a client /// /// The client to check /// If true, attempts to auto-fix mismatched paths /// True if status changed, false otherwise bool CheckClientStatus(McpClient client, bool attemptAutoRewrite = true); /// /// Registers Unity MCP with Claude Code CLI /// void RegisterClaudeCode(); /// /// Unregisters Unity MCP from Claude Code CLI /// void UnregisterClaudeCode(); /// /// Gets the configuration file path for a client /// /// The client /// Platform-specific config path string GetConfigPath(McpClient client); /// /// Generates the configuration JSON for a client /// /// The client /// JSON configuration string string GenerateConfigJson(McpClient client); /// /// Gets human-readable installation steps for a client /// /// The client /// Installation instructions string GetInstallationSteps(McpClient client); } /// /// Summary of configuration results for multiple clients /// public class ClientConfigurationSummary { /// /// Number of clients successfully configured /// public int SuccessCount { get; set; } /// /// Number of clients that failed to configure /// public int FailureCount { get; set; } /// /// Number of clients skipped (already configured or tool not found) /// public int SkippedCount { get; set; } /// /// Detailed messages for each client /// public System.Collections.Generic.List Messages { get; set; } = new(); /// /// Gets a human-readable summary message /// public string GetSummaryMessage() { return $"✓ {SuccessCount} configured, ⚠ {FailureCount} failed, ➜ {SkippedCount} skipped"; } } }