JU

jackwrichards/unitymcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

526 stars 58 forks 品質 48 トレンド 20NOASSERTION

UnityMCPは、Model Context Protocol(MCP)を実装した強力なUnityエディタープラグインで、UnityとAIアシスタント間のシームレスな統合を可能にします。

概要

UnityMCPはModel Context Protocol(MCP)を実装した強力なUnityエディタープラグインで、UnityとAIアシスタント間のシームレスな統合を可能にします。リアルタイムのエディター状態監視、リモートコマンド実行、包括的なログ機能を提供します。 このプロジェクトは主に2つの要素で構成されています。 Unity Editorプラグインを提供します:- 接続状態と監視のためのデバッグウィンドウ - リアルタイム通信用のWebSocketクライアント - C#コード実行エンジン - 包括的なログシステム - Editorの状態追跡とシリアライズ 標準化されたツールを通じてUnityエディターの機能を公開するTypeScriptベースのMCPサーバー: 1. get_editor_state - 現在のUnityエディターの状態を取得する - アクティブなGameObjects、選択状態、プレイモードの状態を含む - シーン階層とプロジェクト構造を提供する - 異なる出力フォーマット(Raw、スクリプトのみ、スクリプトなし)をサポート 2.

概要(AI 翻訳)

UnityMCPはModel Context Protocol(MCP)を実装した強力なUnityエディタープラグインで、UnityとAIアシスタント間のシームレスな統合を可能にします。リアルタイムのエディター状態監視、リモートコマンド実行、包括的なログ機能を提供します。

建築

このプロジェクトは主に2つの要素で構成されています。

1.Unityプラグイン(UnityMCPPlugin)

Unity Editorのプラグインで、以下を提供します:

  • 接続状況と監視のためのデバッグウィンドウ
  • リアルタイム通信用のWebSocketクライアント
  • C#コード実行エンジン
  • 包括的なログシステム
  • エディター状態追跡とシリアライズ

2.MCPサーバー(unity-mcp-server)

標準化されたツールを通じてUnityエディターの機能を公開するTypeScriptベースのMCPサーバー:

利用可能なツール

  1. get_editor_state
  • 現在のUnityエディターの状態を取得する
  • アクティブなGameObjects、選択状態、プレイモードの状態を含む
  • シーン階層とプロジェクト構造を提供します
  • 異なる出力フォーマット(Raw、スクリプトのみ、スクリプトなし)をサポートしています。
  1. execute_editor_command
  • Unityエディターで直接C#コードを実行
  • UnityEngineおよびUnityEditor APIへの完全アクセス

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

UnityMCP

UnityMCP is a powerful Unity Editor plugin that implements the Model Context Protocol (MCP), enabling seamless integration between Unity and AI assistants. It provides real-time editor state monitoring, remote command execution, and comprehensive logging capabilities.

Architecture

The project consists of two main components:

1. Unity Plugin (UnityMCPPlugin)

A Unity Editor plugin that provides:

  • Debug window for connection status and monitoring
  • WebSocket client for real-time communication
  • C# code execution engine
  • Comprehensive logging system
  • Editor state tracking and serialization

2. MCP Server (unity-mcp-server)

A TypeScript-based MCP server that exposes Unity Editor functionality through standardized tools:

Available Tools

  1. get_editor_state

    • Retrieves current Unity Editor state
    • Includes active GameObjects, selection state, play mode status
    • Provides scene hierarchy and project structure
    • Supports different output formats (Raw, scripts only, no scripts)
  2. execute_editor_command

    • Executes C# code directly in the Unity Editor
    • Full access to UnityEngine and UnityEditor APIs
    • Real-time execution with comprehensive error handling
    • Command timeout protection
  3. get_logs

    • Retrieves and filters Unity Editor logs
    • Supports filtering by type, content, and timestamp
    • Customizable output fields
    • Buffer management for optimal performance

Installation

Installing via Smithery

To install UnityMCP for Claude Desktop automatically via Smithery:

GitHub で README 全文を見る

インストール

npx -y @smithery/cli install @Arodoid/unitymcp --client claude
MCP 初心者?mcpskill.org のガイドから始めましょう →