From 3fdda7cd4b2a1b4238130387cdab4b091238f5be Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Mon, 11 May 2026 22:33:29 +0700 Subject: [PATCH] feat: add Kimi Code CLI client configurator --- .../Configurators/KimiCodeConfigurator.cs | 40 +++++++++++++++++++ .../KimiCodeConfigurator.cs.meta | 11 +++++ README.md | 7 ++-- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 MCPForUnity/Editor/Clients/Configurators/KimiCodeConfigurator.cs create mode 100644 MCPForUnity/Editor/Clients/Configurators/KimiCodeConfigurator.cs.meta diff --git a/MCPForUnity/Editor/Clients/Configurators/KimiCodeConfigurator.cs b/MCPForUnity/Editor/Clients/Configurators/KimiCodeConfigurator.cs new file mode 100644 index 000000000..940a8cac8 --- /dev/null +++ b/MCPForUnity/Editor/Clients/Configurators/KimiCodeConfigurator.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using MCPForUnity.Editor.Models; + +namespace MCPForUnity.Editor.Clients.Configurators +{ + /// + /// Kimi Code CLI MCP client configurator. + /// Kimi Code uses a JSON-based configuration file with mcpServers section. + /// Config path: ~/.kimi/mcp.json + /// + /// Kimi 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 KimiCodeConfigurator : JsonFileMcpConfigurator + { + public KimiCodeConfigurator() : base(new McpClient + { + name = "Kimi Code", + windowsConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".kimi", "mcp.json"), + macConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".kimi", "mcp.json"), + linuxConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".kimi", "mcp.json"), + SupportsHttpTransport = true, + }) + { } + + public override IList GetInstallationSteps() => new List + { + "Ensure Kimi Code CLI is installed (pip install kimi-cli or see https://github.com/MoonshotAI/kimi-cli)", + "Click 'Auto Configure' to automatically add UnityMCP to ~/.kimi/mcp.json", + "OR click 'Manual Setup' to copy the configuration JSON", + "Open ~/.kimi/mcp.json and paste the configuration", + "Save and restart Kimi Code CLI", + "Use 'kimi mcp list' to verify Unity MCP is connected", + "Note: For full functionality, open Unity Editor and start HTTP server" + }; + } +} diff --git a/MCPForUnity/Editor/Clients/Configurators/KimiCodeConfigurator.cs.meta b/MCPForUnity/Editor/Clients/Configurators/KimiCodeConfigurator.cs.meta new file mode 100644 index 000000000..d5f19d458 --- /dev/null +++ b/MCPForUnity/Editor/Clients/Configurators/KimiCodeConfigurator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 562758226f6844438b5b1ae03a2cc7b7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md b/README.md index 5a47a6f87..5c8cc0797 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ [![](https://badge.mcpx.dev?status=on 'MCP Enabled')](https://modelcontextprotocol.io/introduction) [![](https://img.shields.io/badge/License-MIT-red.svg 'MIT License')](https://opensource.org/licenses/MIT) -**Create your Unity apps with LLMs!** MCP for Unity bridges AI assistants (Claude, Claude Code, Cursor, VS Code, etc.) with your Unity Editor via the [Model Context Protocol](https://modelcontextprotocol.io/introduction). Give your LLM the tools to manage assets, control scenes, edit scripts, and automate tasks. +**Create your Unity apps with LLMs!** MCP for Unity bridges AI assistants (Claude, Claude Code, Cursor, VS Code, Kimi Code, etc.) with your Unity Editor via the [Model Context Protocol](https://modelcontextprotocol.io/introduction). Give your LLM the tools to manage assets, control scenes, edit scripts, and automate tasks. MCP for Unity building a scene @@ -31,6 +31,7 @@
Older releases +* **v9.6.9** — Added Kimi Code CLI client configurator. * **v9.4.8** — New editor UI, real-time tool toggling via `manage_tools`, skill sync window, multi-view screenshot, one-click Roslyn installer, Qwen Code & Gemini CLI clients, ProBuilder mesh editing via `manage_probuilder`. * **v9.4.7** — Per-call Unity instance routing, macOS pyenv PATH fix, domain reload resilience for script tools. * **v9.4.6** — New `manage_animation` tool, Cline client support, stale connection detection, tool state persistence across reloads. @@ -47,7 +48,7 @@ * **Unity 2021.3 LTS+** — [Download Unity](https://unity.com/download) * **Python 3.10+** and **uv** — [Install uv](https://docs.astral.sh/uv/getting-started/installation/) -* **An MCP Client** — [Claude Desktop](https://claude.ai/download) | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | [Cursor](https://www.cursor.com/en/downloads) | [VS Code Copilot](https://code.visualstudio.com/docs/copilot/overview) | [GitHub Copilot CLI](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli) | [OpenClaw](https://openclaw.ai) +* **An MCP Client** — [Claude Desktop](https://claude.ai/download) | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | [Cursor](https://www.cursor.com/en/downloads) | [VS Code Copilot](https://code.visualstudio.com/docs/copilot/overview) | [Kimi Code](https://github.com/MoonshotAI/kimi-cli) | [GitHub Copilot CLI](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli) | [OpenClaw](https://openclaw.ai) ### 1. Install the Unity Package @@ -82,7 +83,7 @@ openupm add com.coplaydev.unity-mcp 2. Click **Start Server** (launches HTTP server on `localhost:8080`) 3. Select your MCP Client from the dropdown and click **Configure** 4. Look for 🟢 "Connected ✓" -5. **Connect your client:** Some clients (Cursor, Antigravity, OpenClaw) require enabling an MCP toggle or plugin in settings. OpenClaw also needs the `openclaw-mcp-bridge` plugin enabled and follows the currently selected MCP for Unity transport (`HTTP` or `stdio`). Others (Claude Desktop, Claude Code) auto-connect after configuration. +5. **Connect your client:** Some clients (Cursor, Antigravity, OpenClaw) require enabling an MCP toggle or plugin in settings. OpenClaw also needs the `openclaw-mcp-bridge` plugin enabled and follows the currently selected MCP for Unity transport (`HTTP` or `stdio`). Others (Claude Desktop, Claude Code, Kimi Code) auto-connect after configuration. **That's it!** Try a prompt like: *"Create a red, blue and yellow cube"* or *"Build a simple player controller"*