Unity MCP Server

Integrations

  • Supports deployment through Docker with configuration options, allowing the server to be containerized and run in isolated environments.

  • Enables repository interactions for cloning the Unity MCP server codebase as part of the installation process.

  • Supports accessing and cloning the Unity MCP server repository from GitHub as part of the setup workflow.

Smithery.ai 用 Unity MCP サーバー

プロジェクト管理、シーン編集、プレハブ作成、スクリプト生成などのツールを提供する、Unity ゲーム開発用の包括的な Model Context Protocol (MCP) サーバーです。

特徴

  • プロジェクト管理: Unity プロジェクトを作成して開く
  • シーン編集:Unityシーンの作成と変更
  • プレハブ作成: カスタマイズ可能なコンポーネントでプレハブを生成
  • スクリプト生成: さまざまなテンプレート (MonoBehaviour、ScriptableObject、EditorWindow) を使用して C# スクリプトを作成します。
  • Smithery.ai 統合: Smithery.ai プラットフォームとの完全な互換性

はじめる

前提条件

  • Node.js 18以上
  • Unityがインストールされている(Unityの実際の操作用)

インストール

  1. リポジトリをクローンします。
git clone https://github.com/GrandMasterK414/unity-mcp-server.git cd unity-mcp-server
  1. 依存関係をインストールします:
npm install
  1. プロジェクトをビルドします。
npm run build

サーバーの実行

地域開発

npm run dev

Smithery.ai の展開

npm run smithery:start

または Docker を使用する場合:

docker-compose up -d

構成

サーバーは環境変数を通じて設定できます:

  • SMITHERY : Smithery モードを有効にするには「true」に設定します (WebSocket トランスポートを使用)
  • PORT : WebSocketサーバポート(デフォルト: 3000)
  • UNITY_PROJECTS_PATH : Unityプロジェクトを保存するディレクトリ
  • SCRIPT_ROOT : スクリプトテンプレートを保存するディレクトリ

APIツール

Unityプロジェクトを作成する

指定された構成で新しい Unity プロジェクトを作成します。

{ "name": "MyGameProject", "path": "./projects", "unityVersion": "2022.3.5f1" }

オープンユニティプロジェクト

既存の Unity プロジェクトを開きます。

{ "path": "./projects/MyGameProject" }

Unityシーンを作成する

新しい Unity シーンを作成します。

{ "name": "MainLevel", "projectPath": "./projects/MyGameProject" }

Unityプレハブを作成する

新しい Unity プレハブを作成します。

{ "name": "EnemyCharacter", "projectPath": "./projects/MyGameProject", "components": ["Rigidbody", "MeshRenderer", "BoxCollider"] }

Unityスクリプトを生成する

Unity 用の新しい C# スクリプトを生成します。

{ "name": "PlayerController", "projectPath": "./projects/MyGameProject", "scriptType": "MonoBehaviour", "template": "// Optional custom template content" }

Docker サポート

サーバーは Docker を使用してデプロイできます。

# Build the Docker image docker build -t unity-mcp-server . # Run the container docker run -p 3000:3000 -d unity-mcp-server

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

-
security - not tested
F
license - not found
-
quality - not tested

Unity ゲーム開発用のモデル コンテキスト プロトコル サーバー。ユーザーは Smithery.ai との自然言語統合を通じて、プロジェクトの管理、シーンの編集、プレハブの作成、スクリプトの生成を行うことができます。

  1. Features
    1. Getting Started
      1. Prerequisites
      2. Installation
      3. Running the Server
    2. Configuration
      1. API Tools
        1. Create Unity Project
        2. Open Unity Project
        3. Create Unity Scene
        4. Create Unity Prefab
        5. Generate Unity Script
      2. Docker Support
        1. License
          ID: x6qf49foir