using MCPForUnity.Editor.Models; namespace MCPForUnity.Editor.Clients { /// /// Contract for MCP client configurators. Each client is responsible for /// status detection, auto-configure, and manual snippet/steps. /// public interface IMcpClientConfigurator { /// Stable identifier (e.g., "cursor"). string Id { get; } /// Display name shown in the UI. string DisplayName { get; } /// Current status cached by the configurator. McpStatus Status { get; } /// /// The transport type the client is currently configured for. /// Returns Unknown if the client is not configured or the transport cannot be determined. /// ConfiguredTransport ConfiguredTransport { get; } /// True if this client supports auto-configure. bool SupportsAutoConfigure { get; } /// /// True if this client appears installed on the user's machine. Used to filter /// "configure all detected" so we don't write configs for apps the user doesn't have. /// Implementations should be cheap (filesystem stat or cached path lookup). /// bool IsInstalled { get; } /// /// Transports this client can be configured with. Order is "preference if user has no opinion"; /// the configure path picks the user's global preference if present in this list, else falls back to the first entry. /// System.Collections.Generic.IReadOnlyList SupportedTransports { get; } /// Label to show on the configure button for the current state. string GetConfigureActionLabel(); /// Returns the platform-specific config path (or message for CLI-managed clients). string GetConfigPath(); /// Checks and updates status; returns current status. McpStatus CheckStatus(bool attemptAutoRewrite = true); /// Runs auto-configuration (register/write file/CLI etc.). Always idempotent /// — calling twice with the same settings is safe and is what the bulk "Configure All" /// path relies on to refresh transport / server-version drift across every detected /// client. void Configure(); /// /// Removes UnityMCP from this client's config (JSON entry, CLI registration, etc.). /// Default is a no-op for client types that don't yet implement removal (Codex TOML); /// callers should treat this as best-effort. The UI's per-client button routes here /// when is . /// void Unregister(); /// Returns the manual configuration snippet (JSON/TOML/commands). string GetManualSnippet(); /// Returns ordered human-readable installation steps. System.Collections.Generic.IList GetInstallationSteps(); /// True if this client supports skill installation/sync. bool SupportsSkills { get; } /// Returns the absolute path where skills should be installed, or null if unsupported. string GetSkillInstallPath(); } }