From 0465a9309e25172d13420c7b44b57158a61eaf0a Mon Sep 17 00:00:00 2001 From: Lizardjazz1 Date: Thu, 26 Feb 2026 11:55:31 +0300 Subject: [PATCH 1/2] feat: Add Qwen Code client configurator --- .../Configurators/QwenCodeConfigurator.cs | 43 +++++++++++++++++++ .../QwenCodeConfigurator.cs.meta | 11 +++++ 2 files changed, 54 insertions(+) create mode 100644 MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs create mode 100644 MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs.meta diff --git a/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs b/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs new file mode 100644 index 000000000..58539ac97 --- /dev/null +++ b/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.IO; +using MCPForUnity.Editor.Models; + +namespace MCPForUnity.Editor.Clients.Configurators +{ + /// + /// Qwen Code MCP client configurator. + /// Qwen Code uses a JSON-based configuration file with mcpServers section. + /// Config path: ~/.qwen/settings.json + /// + /// Qwen Code supports both stdio (uvx) and HTTP transport modes. + /// Default: stdio mode (works without Unity Editor for basic operations) + /// HTTP mode: requires Unity Editor running with MCP HTTP server started + /// + public class QwenCodeConfigurator : JsonFileMcpConfigurator + { + public QwenCodeConfigurator() : base(new McpClient + { + name = "Qwen Code", + windowsConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".qwen", "settings.json"), + macConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".qwen", "settings.json"), + linuxConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".qwen", "settings.json"), + SupportsHttpTransport = true, + // Default to stdio transport for Qwen Code (like Cursor) + // User can switch to HTTP in Unity: Window > MCP for Unity > Settings + }) + { } + + public override IList GetInstallationSteps() => new List + { + "Ensure Qwen Code is installed (npm install -g @anthropic-ai/qwen-code or via official installer)", + "Open Qwen Code", + "Click 'Auto Configure' to automatically add UnityMCP to settings.json", + "OR click 'Manual Setup' to copy the configuration JSON", + "Open ~/.qwen/settings.json and paste the configuration", + "Save and restart Qwen Code", + "Use /mcp command in Qwen Code to verify Unity MCP is connected", + "Note: For full functionality, open Unity Editor and start HTTP server" + }; + } +} diff --git a/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs.meta b/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs.meta new file mode 100644 index 000000000..a8dbb3ba6 --- /dev/null +++ b/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From ea75c876f1192089b4118873aa67ddad1aef819b Mon Sep 17 00:00:00 2001 From: Lizardjazz1 Date: Thu, 26 Feb 2026 12:00:54 +0300 Subject: [PATCH 2/2] fix: Correct Qwen Code npm package name --- .../Editor/Clients/Configurators/QwenCodeConfigurator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs b/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs index 58539ac97..aad0f6350 100644 --- a/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs +++ b/MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs @@ -30,7 +30,7 @@ public QwenCodeConfigurator() : base(new McpClient public override IList GetInstallationSteps() => new List { - "Ensure Qwen Code is installed (npm install -g @anthropic-ai/qwen-code or via official installer)", + "Ensure Qwen Code is installed (npm install -g @qwen-code/qwen-code or download from https://github.com/QwenLM/qwen-code)", "Open Qwen Code", "Click 'Auto Configure' to automatically add UnityMCP to settings.json", "OR click 'Manual Setup' to copy the configuration JSON",