Unity MCP CLI
MCP server by IvanMurzak Verified · npm:unity-mcp-cli
Connects AI agents such as Claude Code, Cursor and Codex to the Unity Editor through MCP. Game developers use it to read and change scenes, assets and C# code, run tests and take screenshots. The unity-mcp-cli tool adds terminal and CI control.
Install Unity MCP CLI
Built from the published package, never by AI.
claude mcp add unity-mcp-cli -- npx -y unity-mcp-cliRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"unity-mcp-cli": {
"args": [
"-y",
"unity-mcp-cli"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"unity-mcp-cli": {
"args": [
"-y",
"unity-mcp-cli"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"unity-mcp-cli": {
"args": [
"-y",
"unity-mcp-cli"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add unity-mcp-cli -- npx -y unity-mcp-cli{
"mcpServers": {
"unity-mcp-cli": {
"args": [
"-y",
"unity-mcp-cli"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add unity-mcp-cli npx -y unity-mcp-cliGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the unity-mcp-cli block.
About
Unity MCP CLI is the command-line part of AI Game Developer (Unity-MCP). It connects an AI agent to the Unity Editor, so clients such as Claude Code, Codex, Cursor, GitHub Copilot and Gemini can read and change scenes, prefabs, assets and C# code, run tests and take screenshots. The project ships as a free Unity package, a command-line tool and optional extensions.
The plugin registers its tools with an MCP server. The server runs either locally on 127.0.0.1 or in the Cloud at ai-game.dev, and the agent can also use generated Skills instead of MCP tools. The CLI can install the plugin, open projects, query, compile and test from the terminal or CI. It suits Unity developers who want an AI agent to work directly inside their projects.
Written from the project's README and checked against it.
Tools it gives your assistant
rql-queryReads scenes, objects, assets, console and Editor state with the RQL query language.rql-mutateChanges scenes, GameObjects, prefabs, assets and settings through RQL.csharp-execCompiles and runs C# inside the Unity Editor using Roslyn.tests-runRuns EditMode and PlayMode tests in the Unity Editor.screenshot-isolatedTakes screenshots of objects in the Unity Editor.package-*Manages Unity packages from the agent.assetstore-*Works with the Unity Asset Store from the agent.unity-tool-listLists the tools the agent can use in the current setup.
What you need
- Unity 2022.3 or newer
- Node.js 22.14 or newer for unity-mcp-cli
- Windows, macOS or Linux
- An ai-game.dev account for Cloud mode (not needed for Local)
Try asking
- Explain my scene hierarchy
- Run the EditMode tests and fix what fails
- Find every enemy prefab without a Rigidbody and add one
Good to know
- Runtime tools inside a built game are opt-in through UNITY_MCP_RUNTIME.
- The local server starts with auth none, so any program on the machine can reach it until token auth is set.
- The Cloud relay records MCP event metadata within a rolling 90-day window.
- Player builds leave Unity-MCP out by default.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Unity MCP CLI
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
Unity MCP CLI: common questions
Does Unity MCP CLI work offline?
The source says the Local option is an equal choice for offline or air-gapped work, with the server running on 127.0.0.1 and project data staying on the machine.
Can the agent run code in a built game?
Yes, the same tools can run inside a built game when the opt-in UNITY_MCP_RUNTIME setting is enabled, for example for NPC logic and live debugging.
Is it free to use?
The source lists the cost as free for both the Local and Cloud setups.
How do I install Unity MCP CLI?
In Claude Code run claude mcp add unity-mcp-cli -- npx -y unity-mcp-cli. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Unity MCP CLI the official server?
Unity MCP CLI is published by npm:unity-mcp-cli from its verified domain in the official MCP Registry.
Is Unity MCP CLI free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is Unity MCP CLI safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Unity MCP CLI?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does Unity MCP CLI work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
