Unity MCP Template
by dunward
This is a simple example project demonstrating interaction between a TypeScript-based MCP server and Unity. You can build and configure your own tools to expand and develop further.
Last updated: N/A
What is Unity MCP Template?
A Unity example project that demonstrates interaction between a TypeScript-based MCP (Multi-Client Platform) server and Unity. It provides a template for creating custom tools for use within the Unity editor.
How to use Unity MCP Template?
- Build the MCP server using
npm install
andnpm run build
within theunity-mcp-server
directory. - Add the MCP server configuration to Claude Desktop's settings by editing the config file.
- Create your own tools by referring to the
CreateObjectTools
(Unity) andcreateObject
(TypeScript) examples, ensuring the input data structure is consistent.
Key features of Unity MCP Template
Demonstrates MCP server interaction with Unity
Provides a template for creating custom tools
Uses IMGUI for EditorWindow implementation
Includes a sample Unity project
Uses TCP communication
Use cases of Unity MCP Template
Creating custom tools for Unity editor
Extending Unity's functionality with external servers
Building interactive development environments
Integrating Unity with other applications
Facilitating communication between Unity and TypeScript-based servers
FAQ from Unity MCP Template
What is MCP?
What is MCP?
MCP stands for Multi-Client Platform. In this context, it refers to a server that can communicate with multiple clients, in this case, the Unity editor.
What is the purpose of this template?
What is the purpose of this template?
The template provides a starting point for developers who want to create custom tools and integrate them with Unity using a TypeScript-based server.
Why doesn't the project use NewtonsoftJSON?
Why doesn't the project use NewtonsoftJSON?
To minimize version-related issues and ensure compatibility with legacy versions of Unity.
How do I create my own tools?
How do I create my own tools?
Refer to the CreateObjectTools
(Unity) and createObject
(TypeScript) examples. Ensure that the input data structure is the same for both the Unity and TypeScript sides.
Where can I find the MCP server code?
Where can I find the MCP server code?
The MCP server code is located in the unity-mcp-server
directory.