dunward_unity_mcp_template

dunward_unity_mcp_template

by dunward
A template project demonstrating interaction between a TypeScript-based MCP server and Unity for custom tool development.

Unity MCP Server Template

MCP Badge

A simple template project for controlling Unity via MCP (Message Control Protocol). This project demonstrates interaction between a TypeScript-based MCP server and Unity, allowing you to build and configure custom tools for further development.

Overview

The Unity MCP Server Template provides a foundation for integrating Unity with MCP, enabling seamless communication between Unity and external tools. The project includes a Unity example project (unity-mcp-sample) and a TypeScript-based MCP server (unity-mcp-server).

Quick Start

Unity Example Project

The unity-mcp-sample is a Unity example project designed to minimize version-related issues. It does not use packages like NewtonsoftJSON and implements the EditorWindow using IMGUI. The MCP can be managed through the UnityMCP-ShowWindow at the top.

Unity Example

Build MCP Server

To build the MCP server, navigate to the unity-mcp-server directory and run the following commands:

npm install
npm run build

Add MCP in Claude Desktop

Open Claude Desktop Settings, navigate to Developer-Edit Config, and add the following configuration:

{
  "mcpServers": {
    "unity-mcp": {
      "command": "node",
      "args":["F:/unity-mcp-template/unity-mcp-server/dist/index.js"]
    }
  }
}

Create Your Own Tools

Both Unity and TypeScript components should follow the same input data structure.

Unity

Refer to CreateObjectTools and create the tool you want.

TypeScript

Refer to createObject and create the tool you want.

TODO List

  • [x] Enable Unity to send result messages to MCP
  • [ ] Discussion here
    ~Change TCP structure (currently implemented with client-server reversed due to a bug in the TypeScript SDK)~
  • ~Unity (Current : TCP Server, TODO : TCP Client)~
  • ~MCP (Current : TCP Client, TODO : TCP Server)~

About

This project is a simple template for controlling Unity via MCP. It provides a starting point for developers to build and expand their own tools.

Topics

Resources

License

MIT license

Activity

Activity

Stars

5 stars

Watchers

1 watching

Forks

1 fork

Contributors

Languages

Features & Capabilities

Categories
mcp_server model_context_protocol typescript unity ai template_project docker api_integration

Implementation Details

Stats

0 Views
5 GitHub Stars

Repository Info

dunward Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300