unity-editor
An MCP server and client for LLMs to interact with Unity Projects
claude mcp add --transport stdio ozankasikci-unity-editor-mcp npx unity-editor-mcp@latest
How to use
Unity Editor MCP enables AI assistants like Claude Desktop or Cursor to interface directly with the Unity Editor, enabling AI-assisted game development and automation. The server exposes a wide range of tools organized into categories such as System & Core, GameObject Management, Component System, Scene Management, Scene Analysis, Asset Management, Script Management, Play Mode Controls, and UI Automation. After starting the MCP server, clients connect to Unity on the default MCP port (6400) and can send commands to inspect, modify, and orchestrate Unity objects, scenes, assets, and editor states. The included tools allow creating and modifying GameObjects, managing components, handling prefabs and assets, analyzing scenes, running play mode, and automating Unity UI and editor actions. To connect, configure your MCP client (Claude Desktop or Cursor) with the server name unity-editor-mcp and unit port 6400, and ensure your Unity project has the Unity Editor MCP package installed as described in the installation steps.
How to install
Prerequisites:
- Unity Editor 2020.3 LTS or newer
- Node.js 18.0.0 or newer
- An MCP client (e.g., Claude Desktop or Cursor)
Step-by-step installation:
-
Install the MCP server package
- Using npm (recommended):
npm install -g unity-editor-mcp -
Install Unity package to enable MCP server within your project
- In Unity:
- Open Window → Package Manager
- Click "+" → Add package from git URL...
- Paste: https://github.com/ozankasikci/unity-editor-mcp.git?path=unity-editor-mcp
- Click Add
Unity will automatically start the MCP server on port 6400
- In Unity:
-
Start the MCP server (if not started automatically)
- The server is typically started automatically when using the npm package in step 1. If needed, run:
npx unity-editor-mcp@latest -
Configure your MCP client (Claude Desktop or Cursor)
-
For Claude Desktop: add to your config (macOS example path shown)
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
-
Example config:
{ "mcpServers": { "unity-editor-mcp": { "command": "npx", "args": ["unity-editor-mcp@latest"] } } }- For Cursor: use the same MCP server configuration in Cursor's MCP settings
-
-
Verify connection
- Restart your MCP client (Claude Desktop or Cursor)
- Check Unity Console for: [Unity Editor MCP] Client connected
- You are ready to start issuing commands to Unity via MCP
Additional notes
Tips and caveats:
- The server starts on port 6400 by default; ensure this port is accessible to your MCP client
- Unity Editor MCP supports a large suite of tools across many categories; start with common tasks like ping, read_logs, find_gameobject, create_gameobject, and get_editor_state to verify connectivity
- Some Unity editor actions may require the Unity project to be open and the correct scene loaded
- When using component and asset operations, be mindful of Unity's serialization and asset database state to avoid conflicts
- If you encounter connection issues, ensure the MCP package is properly added to the Unity project and that the npm-based server process is running without errors
- The npm package name is unity-editor-mcp; the server is named unity-editor-mcp in the MCP ecosystem
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
UE5
MCP for Unreal Engine 5
furi
CLI & API for MCP management
rod
Model Context Protocol Server of Rod
create -kit
Scaffold a production-ready Model Context Protocol (MCP) server in seconds.
muster
MCP tool management and workflow proxy