Skip to content

feat: Add Qwen Code client configurator#835

Merged
Scriptwonder merged 2 commits into
CoplayDev:betafrom
WeLizard:beta
Feb 26, 2026
Merged

feat: Add Qwen Code client configurator#835
Scriptwonder merged 2 commits into
CoplayDev:betafrom
WeLizard:beta

Conversation

@WeLizard

@WeLizard WeLizard commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds support for Qwen Code (https://github.com/QwenLM/qwen-code) as a configurable MCP client in the Unity MCP window.

Qwen Code is an AI-powered CLI coding assistant by Alibaba that supports MCP servers for tool integration.

Changes

  • Added QwenCodeConfigurator.cs - Client configurator for Qwen Code
  • Added QwenCodeConfigurator.cs.meta - Unity meta file
  • Config path: ~/.qwen/settings.json
  • Supports both stdio (uvx) and HTTP transport modes
  • Compatible with existing JsonFileMcpConfigurator base class

Installation

Users can install Qwen Code via:

npm install -g @qwen-code/qwen-code

Testing

  • Tested with Qwen Code 0.10.6
  • Verified auto-configure functionality
  • Tested both stdio and HTTP transport modes
  • Works with unity-mcp server v9.4.7

Related Issues

None

Checklist

  • Code follows project conventions
  • Code is tested and working
  • No breaking changes
  • Documentation updated

Summary by Sourcery

Add a configurable MCP client integration for Qwen Code in the Unity MCP window.

New Features:

  • Introduce a Qwen Code MCP client configurator backed by a JSON settings file shared across Windows, macOS, and Linux.

Documentation:

  • Embed step-by-step installation and configuration guidance for integrating Qwen Code with Unity MCP directly in the configurator.

Summary by CodeRabbit

  • New Features
    • Adds Qwen Code support with integrated configuration and guided setup.
    • Available on Windows, macOS, and Linux.
    • Setup walkthrough covers installation, auto/manual configuration, editing settings, restarting, verifying connectivity, and starting the HTTP server for full functionality.
@coderabbitai

coderabbitai Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds a new QwenCodeConfigurator class extending JsonFileMcpConfigurator to register a "Qwen Code" MCP client with user-home JSON config paths (~/.qwen/settings.json) for Windows/macOS/Linux, enables HTTP transport support (defaults to stdio), and provides installation/setup steps.

Changes

Cohort / File(s) Summary
Qwen Code Configurator
MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs, MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs.meta
Adds QwenCodeConfigurator class with constructor that wires an McpClient (name "Qwen Code"), per-OS user-home JSON config paths, HTTP transport enabled (default stdio), and an overridden GetInstallationSteps() listing installation and setup steps. Meta file added for Unity asset metadata.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

codex

Suggested reviewers

  • msanatan

Poem

🐰 A tiny configurator hops to the fore,
Mapping JSON paths to homes and more.
Qwen Code wired, HTTP ready to play,
Restart, verify, then happily convey. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a Qwen Code client configurator, which matches the new QwenCodeConfigurator class introduced in this PR.
Description check ✅ Passed The pull request description follows the required template with all essential sections completed: Description, Type of Change, Changes Made, Testing details, Related Issues, and a comprehensive Checklist.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs`:
- Line 33: Update the incorrect npm package string in the QwenCode installation
hint: replace the reference to "@anthropic-ai/qwen-code" with the correct
Alibaba package "@qwen-code/qwen-code" inside the QwenCodeConfigurator (the
installer/help message string shown in the configurator code) so the displayed
installation instruction matches the PR description.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 647fb6a and 0465a93.

📒 Files selected for processing (2)
  • MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs
  • MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs.meta
Comment thread MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs Outdated
@sourcery-ai

sourcery-ai Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a new JsonFileMcpConfigurator-based client configurator to integrate Qwen Code as a configurable MCP client in the Unity MCP window, including installation/setup guidance and cross-platform settings.json path resolution.

Class diagram for QwenCodeConfigurator and related types

classDiagram
    title Class diagram for QwenCodeConfigurator and related types

    class JsonFileMcpConfigurator {
        +McpClient client
        +JsonFileMcpConfigurator(McpClient client)
        +IList~string~ GetInstallationSteps()
    }

    class QwenCodeConfigurator {
        +QwenCodeConfigurator()
        +IList~string~ GetInstallationSteps()
    }

    class McpClient {
        string name
        string windowsConfigPath
        string macConfigPath
        string linuxConfigPath
        bool SupportsHttpTransport
    }

    QwenCodeConfigurator --|> JsonFileMcpConfigurator
    JsonFileMcpConfigurator --> McpClient : uses
Loading

File-Level Changes

Change Details Files
Introduce Qwen Code MCP client configurator based on JSON settings file.
  • Create QwenCodeConfigurator class deriving from JsonFileMcpConfigurator
  • Configure McpClient metadata including name, per-OS settings.json paths under the user home .qwen directory, and enabling HTTP transport support
  • Document stdio as the default transport with optional HTTP mode integration with the Unity MCP HTTP server
MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs
Provide guided installation and configuration steps for Qwen Code integration.
  • Override GetInstallationSteps to return step-by-step instructions for installing Qwen Code, configuring Unity MCP via auto/manual setup, editing ~/.qwen/settings.json, and verifying connectivity via /mcp
  • Highlight requirement to start the Unity Editor HTTP server for full functionality
MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs
Register Unity metadata for the new configurator script.
  • Add Unity .meta file for QwenCodeConfigurator script so it is recognized correctly by the Unity project
MCPForUnity/Editor/Clients/Configurators/QwenCodeConfigurator.cs.meta

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The config file path is repeated three times for different platforms; consider extracting a shared helper or constant to avoid duplication and make future path changes less error-prone.
  • In GetInstallationSteps, the hardcoded ~/.qwen/settings.json path may be confusing on Windows; you could derive this path using the same Environment.GetFolderPath logic used in the configurator to keep instructions platform-accurate.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The config file path is repeated three times for different platforms; consider extracting a shared helper or constant to avoid duplication and make future path changes less error-prone.
- In `GetInstallationSteps`, the hardcoded `~/.qwen/settings.json` path may be confusing on Windows; you could derive this path using the same `Environment.GetFolderPath` logic used in the configurator to keep instructions platform-accurate.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@Scriptwonder Scriptwonder merged commit d4a0081 into CoplayDev:beta Feb 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants