Unity MCP Server logo

Unity MCP Server

by GrandMasterK414

The Unity MCP Server bridges AI assistants with Unity projects, offering tools to interact with the Unity engine in batch mode. It enables AI to read files, parse scenes, analyze code, run tests, and generate scripts.

View on GitHub

Last updated: N/A

What is Unity MCP Server?

The Unity MCP Server is a Model Context Protocol (MCP) server designed to allow AI assistants to interact and manipulate Unity projects through a defined set of tools. It allows operations that would typically need the Unity Editor GUI to be run in batch mode.

How to use Unity MCP Server?

  1. Clone the repository. 2. Install Node.js dependencies using npm install. 3. Build the project using npm run build. 4. Configure the server settings in config/default.json, specifying paths to Unity and the project. 5. Start the server using npm start or npm run smithery:start. 6. Integrate with an AI assistant (like Cursor AI or Smithery.ai) by following their documentation to connect to the MCP server.

Key features of Unity MCP Server

  • Reading and searching files

  • Parsing Unity scenes and prefabs

  • Analyzing C# code for errors

  • Running automated tests in batch mode

  • Generating scripts from templates

  • Validating shaders

Use cases of Unity MCP Server

  • Automated code analysis and error detection

  • AI-assisted scene and prefab modification

  • Automated testing and validation

  • Script generation from templates

  • Integration with AI assistants for Unity development

FAQ from Unity MCP Server

What is MCP?

Model Context Protocol, which defines the communication between AI assistants and Unity projects.

What Unity versions are supported?

Unity 2022.3 LTS or newer is recommended.

How do I configure the server?

Edit the config/default.json file to suit your project and environment.

How do I start the server?

Run npm start or npm run smithery:start in your command line.

How do I integrate this server with Smithery.ai

Deploy the server on Smithery.ai using the provided smithery.yaml