About Unity MCP Server (C#)
Unity MCP Server (C#) is a C# MCP server that connects the Unity Editor with external LLMs, scripts, or cloud agents. It supports real-time editor tasks and bidirectional exchange of commands, data, and events.
Key features
- 01Server implemented in C#
- 02Connect Unity Editor with external LLMs
- 03Automate editor tasks in real time
- 04Manipulate scenes and manage assets
- 05Exchange commands, data, and events both ways
Use cases
- 01Generate content procedurally
- 02Set up Unity scenes automatically
- 03Run AI-driven tests
- 04Control Unity remotely
MCP support
The MCP server receives MCP messages from clients and executes commands in the Unity Editor context, then returns responses, data, or events.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEUnity MCP Server (C#)
This project is a Model Context Protocol (MCP) server for Unity, providing a bridge between the Unity Editor and external Large Language Models (LLMs) or cloud-based AI agents. The server side is fully implemented with C#.
What is Unity Model Context Protocol (MCP)?
Unity MCP is a protocol designed to enable seamless communication between the Unity Editor and external tools, scripts, or AI models. It allows for real-time automation, remote control, and intelligent interaction with Unity projects. MCP can be used as a bridge so that LLMs (Large Language Models), either running locally or in the cloud, can directly interact with the Unity Editor—enabling advanced workflows, procedural content generation, automated testing, and more.
Key Features
- C# Server Implementation: The backend/server is written entirely in C#, making it easy to integrate with Unity and .NET environments.
- MCP Bridge: Acts as a bridge between Unity and external LLMs or cloud services, allowing AI models to send commands and receive data from the Unity Editor.
- Real-time Automation: Supports real-time automation of editor tasks, scene manipulation, asset management, and more.
- Extensible Protocol: Built on the open Model Context Protocol, making it easy to extend for custom workflows or new AI capabilities.
- Inspired by: This project is based on the original work at https://github.com/justinpbarnett/unity-mcp/.
How it Works
- Server-Client Architecture: The C# MCP server listens for incoming connections from clients (such as LLMs, scripts, or cloud agents).
- Command Handling: Clients send MCP-formatted messages to the server, which are then interpreted and executed in the Unity Editor context.
- Bi-directional Communication: The server can send responses, data, or events back to the client, enabling interactive and intelligent workflows.
- Use Cases: Procedural content generation, automated scene setup, AI-driven testing, remote Unity control, and more.
This project is a starting point for anyone looking to connect Unity with the power of LLMs or external automation tools using the Model Context Protocol.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.