unity-mcp-cli
v2.0.1
Published
Cross-platform CLI tool for AI Game Developer (Skills & MCP). Full AI develop and test loop. Efficient token usage, advanced tools. Creates Unity project, installs plugins, configures tools, and manages HTTP connection with Unity Editor and a game made wi
Maintainers
Readme
中文 | 日本語 | Español | فارسی | हिन्दी | العربية
unity-mcp-cli is the command-line tool of AI Game Developer (Unity-MCP). It installs Unity Editors, creates projects, adds the plugin, connects AI agents, runs MCP tools, and compiles and tests Unity projects, from your terminal or CI.
Features
✅ Install — Unity Editors, new projects and the plugin, with the OpenUPM registry set up
✅ Connect — sign in once; write MCP configs or Skills for Claude Code, Codex, Cursor…
✅ Run tools — RQL queries, any MCP tool and C# code in the Unity Editor
✅ Compile and test — compiler errors with file and line; EditMode and PlayMode tests
✅ Scriptable — --format json, stable exit codes, CI-friendly output
✅ Library — the same commands as a typed Node.js API
✅ Cross-platform — Windows, macOS and Linux
Quick start
npm install -g unity-mcp-cli
unity-mcp-cli install-unity # optional: install a Unity Editor
unity-mcp-cli create-project ./MyGame # optional: create a project
unity-mcp-cli install-plugin ./MyGame # add the plugin
unity-mcp-cli login # sign in to ai-game.dev in the browser
unity-mcp-cli open ./MyGame # open Unity; it connects and generates skills
unity-mcp-cli wait-for-ready ./MyGame # until tools can be calledNo global install: npx unity-mcp-cli <command>. Requires Node.js 22.14 or newer; Unity Hub is installed automatically when missing.
Usage
unity-mcp-cli setup-skills claude-code ./MyGame # Skills for your agent
unity-mcp-cli rql 'objects | where name starts-with "Tree" | count'
unity-mcp-cli compile ./MyGame --strict --format github
unity-mcp-cli test ./MyGame --mode PlayMode --junit-output junit.xml
unity-mcp-cli install-extension Tilemap ./MyGamerql and compile start a headless editor when none is running; test runs a batch-mode editor, like CI.
Commands
| Area | Commands |
| --- | --- |
| Setup | install-unity · create-project · install-plugin |
| Packages | install-extension · update · remove-plugin |
| Account | login · unity-account |
| AI agents | setup-mcp · setup-skills · configure |
| Editor | open · close · wait-for-ready · status · dialog |
| Tools | tools · rql · run-tool · run-system-tool · exec |
| Build, test | compile · test |
| Discovery | commands |
Every option, exit codes and JSON output: command reference, or unity-mcp-cli <command> --help.
Library
The commands are also a typed, side-effect-free library; results are kind: 'success' | 'failure'.
import { installPlugin } from 'unity-mcp-cli';
const result = await installPlugin({ unityProjectPath: './MyGame' });
if (result.kind === 'success') console.log(`Installed v${result.installedVersion}`);Links
Unity-MCP · Installation guide · Wiki · Changelog · Discord
