Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 94
  • 4.8k stars
  • 3.5k a week
  • Apache-2.0
  • Updated

Install Unity MCP CLI

Built from the published package, never by AI.

claude mcp add unity-mcp-cli -- npx -y unity-mcp-cli

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Unity MCP CLI in Claude Code

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

A

No 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 →

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.

Unity MCP CLI Install

Add to stack

Loading.