-
Notifications
You must be signed in to change notification settings - Fork 672
Add Cherry Studio MCP client support #505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideAdds a new Cherry Studio MCP client configurator that follows the existing JsonFileMcpConfigurator pattern but is explicitly UI/manual-only (no auto-config), plus a uv.lock refresh, enabling Unity MCP to be configured for Cherry Studio via STDIO with clear manual instructions and future SSE notes. Sequence diagram for manual Cherry Studio MCP configuration flowsequenceDiagram
actor UnityDeveloper
participant UnityEditor
participant CherryStudioConfigurator
participant CherryStudioApp
participant UnityMcpServer
UnityDeveloper->>UnityEditor: Open MCP settings
UnityEditor->>CherryStudioConfigurator: GetInstallationSteps()
CherryStudioConfigurator-->>UnityEditor: Installation steps list
UnityEditor->>CherryStudioConfigurator: GetManualSnippet()
CherryStudioConfigurator-->>UnityEditor: Manual JSON snippet and UI instructions
UnityEditor-->>UnityDeveloper: Display Cherry Studio instructions
UnityDeveloper->>CherryStudioApp: Open Settings MCP Server Add Server
UnityDeveloper->>CherryStudioApp: Enter STDIO config (unity-mcp, uvx, args)
UnityDeveloper->>CherryStudioApp: Save and restart
UnityDeveloper->>UnityMcpServer: Start server using uvx mcp-for-unity --transport stdio
CherryStudioApp->>UnityMcpServer: Connect via STDIO
UnityMcpServer-->>CherryStudioApp: Respond to MCP requests
Class diagram for CherryStudioConfigurator integrationclassDiagram
direction LR
class JsonFileMcpConfigurator {
<<abstract>>
- McpClient client
+ JsonFileMcpConfigurator(McpClient client)
+ bool SupportsAutoConfigure
+ IList~string~ GetInstallationSteps()
+ McpStatus CheckStatus(bool attemptAutoRewrite)
+ void Configure()
+ string GetManualSnippet()
}
class CherryStudioConfigurator {
+ const string ClientName
+ CherryStudioConfigurator()
+ bool SupportsAutoConfigure
+ IList~string~ GetInstallationSteps()
+ McpStatus CheckStatus(bool attemptAutoRewrite)
+ void Configure()
+ string GetManualSnippet()
}
class McpClient {
+ string name
+ string windowsConfigPath
+ string macConfigPath
+ string linuxConfigPath
+ bool SupportsHttpTransport
+ McpStatus status
+ void SetStatus(McpStatus status,string message)
}
class McpStatus {
<<enumeration>>
NotConfigured
Configured
Error
}
class EditorPrefs {
+ static bool GetBool(string key,bool defaultValue)
}
class EditorPrefKeys {
+ static string UseHttpTransport
}
JsonFileMcpConfigurator <|-- CherryStudioConfigurator
CherryStudioConfigurator o-- McpClient
JsonFileMcpConfigurator o-- McpClient
McpClient --> McpStatus
CherryStudioConfigurator ..> EditorPrefs
CherryStudioConfigurator ..> EditorPrefKeys
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds a new CherryStudioConfigurator class that registers Cherry Studio as an MCP client, sets platform-specific JSON config paths, disables HTTP transport, and enforces manual UI-based configuration with installation steps and a manual configuration snippet. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 1 issue, and left some high level feedback:
- On macOS and Linux, the config paths are built from
Environment.SpecialFolder.UserProfile; consider using the platform’s application data folder (Environment.SpecialFolder.ApplicationDataor equivalent) to avoid issues on systems where the config directory is not directly under the home directory. - When
UseHttpTransportis enabled,GetManualSnippetonly returns commentary about unsupported transports without a concrete configuration snippet; consider explicitly instructing the user to switch off HTTP/WS in settings and then appending the stdio snippet so they still see a usable example.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- On macOS and Linux, the config paths are built from `Environment.SpecialFolder.UserProfile`; consider using the platform’s application data folder (`Environment.SpecialFolder.ApplicationData` or equivalent) to avoid issues on systems where the config directory is not directly under the home directory.
- When `UseHttpTransport` is enabled, `GetManualSnippet` only returns commentary about unsupported transports without a concrete configuration snippet; consider explicitly instructing the user to switch off HTTP/WS in settings and then appending the stdio snippet so they still see a usable example.
## Individual Comments
### Comment 1
<location> `MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs:62-71` </location>
<code_context>
+
+ if (useHttp)
+ {
+ return "# Cherry Studio does not support WebSocket transport.\n" +
+ "# Cherry Studio supports STDIO and SSE transports.\n" +
+ "# \n" +
+ "# OPTION 1: Use STDIO mode (recommended)\n" +
+ "# Switch transport to 'Stdio' in Advanced Settings, then:\n" +
+ "# - Open Cherry Studio → Settings → MCP Server → Add Server\n" +
+ "# - Name: unity-mcp\n" +
+ "# - Type: STDIO\n" +
+ "# - Command: uvx\n" +
+ "# - Arguments: (see stdio snippet below)\n" +
+ "# \n" +
+ "# OPTION 2: SSE mode (future support)\n" +
</code_context>
<issue_to_address>
**issue (bug_risk):** The HTTP branch mentions a STDIO snippet "below" but never actually returns one.
In the `useHttp` branch, this string returns immediately after `"# - Arguments: (see stdio snippet below)"`, but there is no actual STDIO snippet or concrete command/args included for HTTP users.
This will show HTTP users guidance that references a non-existent snippet. Please either:
- Include the actual STDIO snippet here (e.g., via a shared helper), or
- Remove the “snippet below” reference and explicitly describe how to switch to STDIO and which arguments to use.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs (1)
42-46: Consider suppressing the unused parameter warning.The
attemptAutoRewriteparameter is unused, which is expected since auto-configuration isn't supported. Consider adding a discard or pragma to explicitly acknowledge this:🔎 Suggested approach
public override McpStatus CheckStatus(bool attemptAutoRewrite = true) { + _ = attemptAutoRewrite; // Not used - manual configuration only client.SetStatus(McpStatus.NotConfigured, "Cherry Studio requires manual UI configuration"); return client.status; }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Server/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-29T15:23:11.613Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 491
File: MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.cs:78-115
Timestamp: 2025-12-29T15:23:11.613Z
Learning: In MCPForUnity, prefer relying on the established testing process to catch UI initialization issues instead of adding defensive null checks for UI elements in editor windows. This means during reviews, verify that tests cover UI initialization paths and that code avoids repetitive null-check boilerplate in Editor Windows. If a UI element can be null, ensure there is a well-tested fallback or that its initialization is guaranteed by design, rather than sprinkling null checks throughout editor code.
Applied to files:
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs
🧬 Code graph analysis (1)
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs (2)
MCPForUnity/Editor/Models/McpClient.cs (2)
McpClient(5-55)SetStatus(42-54)MCPForUnity/Editor/Constants/EditorPrefKeys.cs (1)
EditorPrefKeys(7-56)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Sourcery review
🔇 Additional comments (7)
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs (7)
1-9: LGTM!Imports are appropriate and all appear to be used. Namespace follows the project's established structure.
10-12: LGTM!Class declaration follows the established pattern of other configurators in the codebase.
24-24: LGTM!Correctly disables auto-configuration, which is appropriate for Cherry Studio's UI-based configuration model.
26-40: LGTM!Clear installation steps that effectively guide users through Cherry Studio's UI-based configuration. The reference to the manual snippet for argument values is helpful.
48-54: LGTM!Throwing
InvalidOperationExceptionis appropriate here to prevent accidental auto-configuration attempts. The error message clearly directs users to the manual configuration approach.
56-94: LGTM with a clarity note.The conditional logic is sound: when the user has HTTP transport enabled but Cherry Studio doesn't support WebSocket, it helpfully explains the alternatives. When in STDIO mode, it provides the base snippet with Cherry Studio-specific UI instructions.
One observation: the comment on line 74 mentions "SSE mode (future support)" which may set user expectations for a feature that doesn't exist yet. Consider whether this should be omitted until SSE is actually implemented, or clarify it's a client capability not currently usable with Unity MCP.
14-22: The config paths are unused and do not require changes.CherryStudioConfigurator completely overrides
CheckStatus()to returnNotConfiguredwithout consulting any config paths. The paths exist in the McpClient but are never accessed—theConfigure()method throwsInvalidOperationExceptionand manual UI configuration is enforced. The extensionless "config" filename is inconsistent with other configurators but has no practical impact since auto-configuration is disabled.Note: Using
Environment.SpecialFolder.LocalApplicationDataon macOS for application support files is incorrect; the current pattern (UserProfile+Library/Application Support) follows standard macOS conventions and matches all other configurators in the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs (1)
87-87: Consider clarifying args array handling.The instruction "(copy 'args' array values, space-separated or as individual entries)" covers multiple possibilities but might be clearer if it specified Cherry Studio's expected format. However, since the PR description confirms this has been tested and working, the current wording is likely sufficient for users familiar with Cherry Studio's UI.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-29T15:23:11.613Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 491
File: MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.cs:78-115
Timestamp: 2025-12-29T15:23:11.613Z
Learning: In MCPForUnity, prefer relying on the established testing process to catch UI initialization issues instead of adding defensive null checks for UI elements in editor windows. This means during reviews, verify that tests cover UI initialization paths and that code avoids repetitive null-check boilerplate in Editor Windows. If a UI element can be null, ensure there is a well-tested fallback or that its initialization is guaranteed by design, rather than sprinkling null checks throughout editor code.
Applied to files:
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs
🧬 Code graph analysis (1)
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs (2)
MCPForUnity/Editor/Models/McpClient.cs (2)
McpClient(5-55)SetStatus(42-54)MCPForUnity/Editor/Constants/EditorPrefKeys.cs (1)
EditorPrefKeys(7-56)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Sourcery review
🔇 Additional comments (6)
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs (6)
1-9: LGTM!Imports and namespace declaration are appropriate and follow project conventions.
10-22: LGTM!The constructor correctly configures Cherry Studio with platform-specific paths following Electron app conventions and appropriately disables HTTP transport. The use of
JsonFileMcpConfiguratoras the base class makes sense for leveraging its JSON generation capabilities even though Cherry Studio uses UI-based configuration.
24-40: Clear installation guidance for UI-based configuration.The installation steps are well-structured and guide users through Cherry Studio's manual UI configuration process. The note at the end appropriately sets expectations about the UI-based nature of the configuration.
42-46: Appropriate status handling for manual-only configuration.The
CheckStatusmethod correctly returnsNotConfiguredwith a clear message, which is consistent with the manual-configuration-only design of Cherry Studio integration.
48-54: LGTM!The
Configuremethod appropriately throws an exception with a clear message directing users to the manual configuration process, which is the correct behavior for a client that doesn't support auto-configuration.
56-91: Well-structured manual configuration guidance.The
GetManualSnippetmethod effectively handles both HTTP and STDIO transport modes, providing clear guidance for users to switch to the supported STDIO transport when needed, and generating helpful manual configuration instructions that map the JSON structure to Cherry Studio's UI fields.The HTTP branch correctly addresses the past review feedback by clearly stating that the STDIO snippet "will appear" after switching modes, avoiding the previous reference to a non-existent snippet.
|
Thanks for the PR! The attached screenshot and the formatted script are definitely helpful. |
|
If it hasn't been done already, someone should add the |
|
@msanatan |
|
I already fixed it in the main repo a few days ago, so just be sure to include them in future PRs - my negligence! |
|
@Nonanti no stress! It's just for the future, I know you're keen to contribute more 🙂 |


Add Cherry Studio MCP Client Support
Summary
Adds support for Cherry Studio (Cherry AI) as an MCP client configurator.
Cherry Studio is an open-source, cross-platform desktop AI client that supports the Model Context Protocol for tool integrations.
Changes
New File
MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.csUpdated File
Server/uv.lock(dependency lock file update)Implementation Details
Cherry Studio uses UI-based configuration stored in Electron storage, not a directly editable JSON config file. Therefore:
SupportsAutoConfigureis set tofalseThe configurator extends
JsonFileMcpConfiguratorand follows the same pattern as existing clients like Cursor and Windsurf.Configuration
Users configure Cherry Studio through its UI:
Example MCP Configuration for Cherry Studio
{ "mcpServers": { "unityMCP": { "name": "unity-mcp", "type": "stdio", "command": "uvx", "args": [ "--from", "git+https://github.com/CoplayDev/unity-mcp.git#subdirectory=Server", "mcp-for-unity", "--transport", "stdio" ], "isActive": true, "description": "Unity Editor MCP integration" } } }Testing
Tested on:
Verified:
Compatibility
No breaking changes. The new configurator is automatically discovered via Unity's TypeCache system. All existing functionality remains unchanged.
Related Issues
Summary by Sourcery
Add a new MCP client configurator for Cherry Studio and update server dependencies.
New Features:
Enhancements:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.