YetAnotherUnityMcp

YetAnotherUnityMcp is a Unity Master Control Protocol implementation enabling AI agents to control Unity through a .NET/C# plugin and a Python MCP client, facilitating real-time interaction. YetAnotherUnityMcp is a Unity

5
4

YetAnotherUnityMcp

DO NOT USE THIS. THIS IS A TOY PROJECT.

YetAnotherUnityMcp is a Unity Master Control Protocol (MCP) implementation designed for AI agents to interact with Unity. It uses a Unity .NET/C# plugin as a TCP server and a Python MCP client (FastMCP) to handle AI requests. Communication occurs via a custom TCP protocol, enabling real-time JSON and image data exchange.

The system separates game engine concerns from AI logic, enhancing scalability. It allows AI agents to inspect and control Unity scenes safely. Key components include the Unity MCP Plugin (server), FastMCP Python Client, and the external MCP Client (AI).

MCP facilitates AI model interaction with applications through resources, tools, and prompts. YetAnotherUnityMcp fully complies with the MCP specification.

Features include executing C# code, querying Unity state, organizing resources, capturing screenshots, getting logs, modifying GameObject properties, and real-time communication. The project includes detailed setup instructions for both Unity and Python environments, along with a comprehensive project structure overview.

Repository

AZ
Azreal42

Azreal42/YetAnotherUnityMcp

Created

March 16, 2025

Updated

March 28, 2025

Language

C#

Category

AI