Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion MCPForUnity/Editor/Services/ClientConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,11 @@ public string GenerateConfigJson(McpClient client)
}
}

/// <summary>
/// Provide user-facing installation and configuration steps for the specified MCP client type.
/// </summary>
/// <param name="client">The MCP client whose type determines which installation steps are returned.</param>
/// <returns>A multiline string with step-by-step configuration instructions for the client's MCP type, or a default message if steps are not available.</returns>
public string GetInstallationSteps(McpClient client)
{
string baseSteps = client.mcpType switch
Expand Down Expand Up @@ -469,6 +474,13 @@ public string GetInstallationSteps(McpClient client)
"4. For local servers, Node.js (npx) or uvx must be installed\n" +
"5. Save and restart Trae",

McpTypes.Warp =>
"1. Open Warp\n" +
"2. Open 'Warp Drive' — click the Warp icon in the top-left corner, or press (Ctrl + Shift + | on Windows / ⌘ + | on macOS)\n" +
"3. Go to MCP Servers > Add\n" +
"4. Paste the configuration JSON\n" +
"5. Save",

_ => "Configuration steps not available for this client."
};

Expand Down Expand Up @@ -509,4 +521,4 @@ private void CheckClaudeCodeConfiguration(McpClient client)
}
}
}
}
}
16 changes: 15 additions & 1 deletion UnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public static void ShowWindow(string configPath, string configJson, McpClient mc
window.Show();
}

/// <summary>
/// Renders the Manual Configuration editor UI for an MCP client, including instructions, config path and content, and copy/open actions.
/// </summary>
/// <remarks>
/// The UI displays step-by-step guidance tailored to the client's MCP type, shows the configuration file path and configuration text (JSON or TOML), and provides buttons to copy the path or config to the system clipboard and to open the config file with the system default application. Invoking copy or open actions updates window state used for copy feedback and may launch the platform shell to open the file. This method is intended to be called by Unity's editor event loop and performs no return value.
/// </remarks>
protected virtual void OnGUI()
{
scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
Expand Down Expand Up @@ -115,6 +121,14 @@ protected virtual void OnGUI()
instructionStyle
);
}
else if (mcpClient?.mcpType == McpTypes.Warp)
Copy link
Contributor

@msanatan msanatan Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have Warp as a client as yet. why is this code being added to main? Maybe you want to merge to #351 instead, well the user's original fork

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai look at my comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get details about PR #353
echo "=== PR #353 Details ==="
gh pr view 353 --json title,body,baseRefName,headRefName

echo -e "\n=== PR #351 Details ==="
# Get details about PR #351
gh pr view 351 --json title,body,baseRefName,headRefName

echo -e "\n=== Search for Warp in McpTypes ==="
# Search for Warp in the codebase, especially in model/enum files
rg -n "Warp" --type=cs -C 3

Length of output: 3385


@msanatan You're absolutely correct! I apologize for the confusion.

PR #353 is targeting main, but it's adding docstrings for Warp support code that only exists in PR #351 (the warp_support branch). Based on the findings:

The issue is that PR #353 is targeting main instead of the warp_support branch. This would result in:

  • Documentation for code that doesn't exist in main yet
  • The docstrings being merged before the actual feature

Solution: PR #353 should be retargeted to merge into the warp_support branch (PR #351) instead of main. Once PR #351 is merged to main, the docstrings will come along with the feature.

The PR description even confirms this was requested in the context of PR #351, so the base branch should be warp_support rather than main.


🧬 Code Graph Analysis Results

UnityMcpBridge/Editor/Models/McpClient.cs

  • File: UnityMcpBridge/Editor/Models/McpClient.cs
  • Lines: 3-46
  • Snippet (complete):
public class McpClient
    {
        public string name;
        public string windowsConfigPath;
        public string macConfigPath;
        public string linuxConfigPath;
        public McpTypes mcpType;
        public string configStatus;
        public McpStatus status = McpStatus.NotConfigured;

        // Helper method to convert the enum to a display string
        public string GetStatusDisplayString()
        {
            return status switch
            {
                McpStatus.NotConfigured => "Not Configured",
                McpStatus.Configured => "Configured",
                McpStatus.Running => "Running",
                McpStatus.Connected => "Connected",
                McpStatus.IncorrectPath => "Incorrect Path",
                McpStatus.CommunicationError => "Communication Error",
                McpStatus.NoResponse => "No Response",
                McpStatus.UnsupportedOS => "Unsupported OS",
                McpStatus.MissingConfig => "Missing MCPForUnity Config",
                McpStatus.Error => configStatus.StartsWith("Error:") ? configStatus : "Error",
                _ => "Unknown",
            };
        }

        // Helper method to set both status enum and string for backward compatibility
        public void SetStatus(McpStatus newStatus, string errorDetails = null)
        {
            status = newStatus;

            if (newStatus == McpStatus.Error && !string.IsNullOrEmpty(errorDetails))
            {
                configStatus = $"Error: {errorDetails}";
            }
            else
            {
                configStatus = GetStatusDisplayString();
            }
        }
    }

UnityMcpBridge/Windows/VSCodeManualSetupWindow.cs

  • File: UnityMcpBridge/Windows/VSCodeManualSetupWindow.cs
  • Lines: 10-25
  • Snippet (complete):
public static void ShowWindow(string configPath, string configJson)
        {
            var window = GetWindow<VSCodeManualSetupWindow>("VSCode GitHub Copilot Setup");
            window.configPath = configPath;
            window.configJson = configJson;
            window.minSize = new Vector2(550, 500);

            // Create a McpClient for VSCode
            window.mcpClient = new McpClient
            {
                name = "VSCode GitHub Copilot",
                mcpType = McpTypes.VSCode
            };

            window.Show();
        }
  • File: UnityMcpBridge/Windows/VSCodeManualSetupWindow.cs
  • Lines: 27-283
  • Summary:
    • Description: OnGUI flow for the VSCode MCP setup window, including steps, path display and copy/open actions, and JSON insertion guidance. It uses a locally constructed McpClient (name "VSCode GitHub Copilot", type VSCode) and presents a structured layout with headings, instructions, a path display with copy/open controls, a readout area for configJson with copy actions, and a Close button. The window is designed to guide users through adding VSCode-related MCP configuration to mcp.json and ensures the window’s UI mirrors the manual configuration pattern used elsewhere in the editor.
    • Parameters: configPath (string), configJson (string) stored in the window; mcpClient with name and mcpType set to VSCode.
    • Return value: void (UI rendering method OnGUI)
    • Exceptions/Errors handling: Uses UI-level checks and messages; for file path operations it relies on system copy buffer and Process.Start for opening files; includes standard Unity editor UI guards.

{
EditorGUILayout.LabelField(
"a) Open 'Warp Drive' by click the Warp icon in the top-left corner or press (Ctrl + Shift + | on Windows / ⌘ + | on macOS) > MCP Servers > Add",
instructionStyle
);
}

EditorGUILayout.LabelField(" OR", instructionStyle);
EditorGUILayout.LabelField(
" b) Opening the configuration file at:",
Expand Down Expand Up @@ -300,4 +314,4 @@ protected virtual void Update()
}
}
}
}
}