Unity MCP Template - Secure MCP Server by ALMC Security 2025

Unity MCP Template

View on GitHub

GitHub License

Unity MCP Template

mcp-template-ezgif com-resize

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.

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

  • Enable Unity to send result messages to MCP
  • Discussion hereChange 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)

Related in Development - Secure MCP Servers

ServerSummaryActions
Contract Inspector基于 MCP 协议的本地以太坊合约信息获取工具,支持在 Cursor 等 AI 工具中使用。采用 uv 作为现代化的 Pyth...View
fal.ai Recraft v3A Model Context Protocol (MCP) server that provides access to the fal-ai/recraft/v3 image generation...View
OctomindView
공공 API 연동 MCP 샘플기상청 국가기후 데이터센터에서 제공하는 관광코스별 관광지 상세 날씨 조회서비스 를 사용하였다. API 관...View
Chromium HelperView
nUR MCP ServerMCP (Model Context Protocol) is a communication protocol developed by Anthropic (open-sourced in Nov...View