MCP ExplorerExplorer

Unity Mcp Visualscripting

@dunwardon 9 months ago
3 MIT
FreeCommunity
AI Systems
Unity visual scripting mcp example

Overview

What is Unity Mcp Visualscripting

unity-mcp-visualscripting is a Unity example project that demonstrates the interaction between a TypeScript-based MCP server and Unity, allowing users to build and configure their own tools for further development.

Use cases

Use cases include developing custom game mechanics, creating interactive tools for designers, and enhancing Unity applications with server-side logic and data processing.

How to use

To use unity-mcp-visualscripting, clone the repository, install the necessary dependencies with ‘npm install’, and build the MCP server using ‘npm run build’. Then, configure the MCP in Claude Desktop settings to point to the built server.

Key features

Key features include a simple setup for Unity and TypeScript integration, the ability to create custom tools, and a straightforward management interface through UnityMCP-ShowWindow.

Where to use

unity-mcp-visualscripting can be used in game development, interactive applications, and any project that requires visual scripting and server communication within Unity.

Content

GitHub License

Unity MCP Template

mcp-template-ezgif com-resize

This is a simple example project demonstrating interaction between a TypeScript-b
ased MCP server and Unity. You can build and configure your own tools to expand and develop further.

Create more tools your own!

Quick Start

unity-mcp-sample is a Unity example project. To minimize version-related issues and ensure compatibility with legacy versions, it does not use packages like NewtonsoftJSON. Additionally, the EditorWindow is implemented using IMGUI. The MCP can be managed through the UnityMCP-ShowWindow at the top.

Build MCP Server

within the unity-mcp-server

npm install
npm run build

Add MCP in Claude Desktop

Open Claude Desktop Settings, and Developer-Edit Config

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

Create your own tools!

Both input data structure should be same.

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
  • [ ] 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)

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers