Unity3d Game Engine

Unity3d Game Engine

Bridge between Unity Editor and a Node.js MCP server enabling AI agents to automate Unity operations.

1,104
Stars
135
Forks
7
Releases

Overview

MCP Unity Editor is an implementation of the Model Context Protocol for Unity Editor, providing a bridge between Unity and a Node.js server that implements the MCP protocol. It enables AI assistants to interact with Unity projects by exposing a set of tools to manipulate Scenes and GameObjects, run tests, manage packages, log console output, and create assets or prefabs. The server runs a WebSocket server inside Unity and a separate Node.js MCP client that routes commands to Unity. Tools available include execute_menu_item, select_gameobject, update_gameobject, update_component, add_package, run_tests, send_console_log, add_asset_to_scene, create_prefab, and recompile_scripts. It also provides resources, such as unity://menu-items, unity://scenes-hierarchy, unity://gameobject/{id}, unity://logs, unity://packages, unity://assets, and unity://tests/{testMode}. The project supports integration with IDEs like VSCode, Windsurf, Cursor, and Claude Desktop; port and timeout configuration, remote connections, and debugging with MCP Inspector. The project is MIT-licensed, open-source, and designed to be extensible with custom tools in both Unity and Node.js.

Details

Owner
CoderGamester
Language
C#
License
MIT License
Updated
2025-12-07

Features

IDE Integration - Package Cache Access

Automatic integration with VSCode-like IDEs by adding the Unity Library/PackedCache folder to your workspace to improve autocompletion and type information for Unity packages.

MCP Server Tools - Execute Menu Item

Executes Unity menu items (functions tagged with MenuItem) from an MCP prompt.

MCP Server Tools - Object and Component Manipulation

Select and update GameObjects and their components (rename, tag, layer, active/static, add components) via MCP.

MCP Server Tools - Package and Asset Management

Install Unity packages, add assets to scenes, create prefabs, and recompile scripts through MCP.

MCP Server Tools - Run Tests

Run Unity Test Runner tests from MCP prompts.

MCP Server Resources Endpoints

Expose Unity data via unity:// endpoints (menu items, scenes/hierarchy, gameobjects, logs, packages, assets, tests).

Networking, Port and Remote Access Configuration

Configure WebSocket port, request timeout, and allow remote connections for MCP Bridge between Unity and external clients.

Extensibility

Extend MCP Unity with custom tools in Unity (C#) and Node.js (TypeScript) by registering new tools and handlers.

Audience

AI assistantsInteract with the Unity Editor via MCP to perform tasks.
Unity developersAutomate editor workflows and asset management via AI prompts.
IDE usersUse MCP clients (Windsurf, Cursor, Claude Desktop, Copilot) to drive Unity tasks.

Tags

UnityMCPMCP UnityUnity EditorWebSocketNode.jsAIIDE integrationOpen-sourceMIT LicenseAutomationEditor tooling