Repolode
CoderGamester

CoderGamester/mcp-unity

A Model Context Protocol (MCP) plugin that lets AI coding assistants like Cursor, Claude Code and Codex control and query the Unity Editor.

Stars
1,943
Forks
247
Open issues
7
Last commit
9 days ago

What is it?

MCP Unity is a bridge between the Unity Editor and a Node.js server that implements the Model Context Protocol. A WebSocket server runs inside the Editor, and the Node.js side forwards requests from AI clients such as Cursor, Windsurf, Claude Code, Codex CLI, GitHub Copilot and OpenCode into Unity.

Once connected, an AI assistant can run menu items, create and update GameObjects and components, move or rotate objects, manage scenes and prefabs, edit materials, install packages, run Unity Test Runner tests, and read console logs. It also exposes resources for the scene hierarchy, assets, packages and test lists, plus a batch tool for running several operations in one request.

The package is installed through the Unity Package Manager from a git URL. Configuration can be generated from a Server Window in the Editor, with project-local or global options. Package installation and batch-mode startup are disabled by default for safety, and the connection is protected by a per-project authentication token.

Key features

  • 01Exposes GameObject, component, transform and material operations to AI assistants.
  • 02Runs Unity menu items and EditMode/PlayMode tests through the Test Runner.
  • 03Reads console logs, scene hierarchy, assets and installed packages as MCP resources.
  • 04Controls scene loading, saving, unloading and play mode state.
  • 05Supports batch execution of multiple operations in one request.
  • 06Generates client configs for Cursor, Claude Code, Codex CLI, Copilot and OpenCode.

Use cases

  • Letting an AI coding assistant set up scene objects, prefabs and materials while you describe them in natural language.
  • Running Unity tests from an AI chat and reading failures from the console.
  • Batch-creating or renaming many GameObjects without manual clicks in the Editor.
  • Onboarding teammates to an unfamiliar Unity project by querying its scene hierarchy and assets.

Quick start

  1. 1

    Install Node.js 18 or later from the Node.js download page

  2. 2

    Install the Unity MCP Server package via Unity Package Manager (Window > Package Manager)

  3. 3

    Verify Node.js is installed

    node --version

Things to know

  • Requires Unity 6 or later and Node.js 18 or later.
  • Project paths with spaces may cause connection issues.

Topics

FAQ

What is mcp-unity?
A Model Context Protocol (MCP) plugin that lets AI coding assistants like Cursor, Claude Code and Codex control and query the Unity Editor. MCP Unity is a bridge between the Unity Editor and a Node.js server that implements the Model Context Protocol. A WebSocket server runs inside the Editor, and the Node.js side forwards requests from AI clients such as Cursor, Windsurf, Claude Code, Codex CLI, GitHub Copilot and OpenCode into Unity.
Is mcp-unity free to use? What license does it have?
mcp-unity is open source under the MIT license. Check the license terms before using it in commercial products.
Is mcp-unity still maintained?
Actively maintained. The last commit to mcp-unity was on Oct 11, 2026.
What can I use mcp-unity for?
Letting an AI coding assistant set up scene objects, prefabs and materials while you describe them in natural language. Running Unity tests from an AI chat and reading failures from the console. Batch-creating or renaming many GameObjects without manual clicks in the Editor. Onboarding teammates to an unfamiliar Unity project by querying its scene hierarchy and assets.
How do I install mcp-unity?
Install Node.js 18 or later from the Node.js download page Install the Unity MCP Server package via Unity Package Manager (Window > Package Manager) Verify Node.js is installed: node --version
Where can I get mcp-unity?
The source code and installation instructions are on GitHub: https://github.com/CoderGamester/mcp-unity

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects