Unity Editor integration with Model Context Protocol (MCP) enabling AI assistants like Claude to interact with Unity projects. Features a TypeScript MCP server and C# Unity plugin with extensible command handler architecture, TCP/IP communication, and dynamic plugin discovery.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"unity-mcp": {
"args": [
"path/to/index.js"
],
"command": "node"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Unity と Model Context Protocol (MCP) を統合するための拡張可能なフレームワークです。このフレームワークにより、Claude などの AI 言語モデルがスケーラブルなハンドラーアーキテクチャを通じて Unity エディタと直接対話することができます。
This server supports HTTP transport. Be the first to test it — help the community know if it works.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
healthVersion, handler list, and uptime information
unity://health
hierarchyScene hierarchy with filtering support (limit/offset/fields)
unity://hierarchy
inspectGameObject and Component property inspection and manipulation
unity://inspect
screenshotCapture Game, Scene, or Editor panel screenshots (inspector/hierarchy/project/console)
unity://screenshot
logsConsole logs retrieval with filtering
unity://logs
play_modePlay Mode control (status/play/stop/pause/unpause/step)
unity://play_mode
resourceAssemblies and packages information
unity://resource
code_executeC# code template for unity_execute_code tool
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in developer-tools / entertainment
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP server for accessing Figma plugin console logs and screenshots via Cloudflare Workers or local mode
MCP Security Weekly
Get CVE alerts and security updates for UnityMCP and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Unity Editor と Model Context Protocol (MCP) を統合する拡張フレームワークです。Claude などの AI 言語モデル、または CLI (curl) から、HTTP 経由で Unity Editor を直接操作できます。
target パラメータ or プロキシで名前指定ルーティングSessionState で port を永続化し、リロード跨ぎで同 port を自動再バインド/execute_code と MCP tool unity_execute_code が標準装備 (Roslyn 使用)IMcpCommandHandler / IMcpResourceHandler / BasePromptHandler を実装すればリフレクションで自動登録{status, result?, error?, truncated?, next?} で成功/エラー/ページングを一貫した形で返すlimit / offset / fields / detail パラメータでレスポンスを絞り込み可能Safe / Unsafe を per-action で宣言し、TS 側が err.cause.code を見て再送可否を制御 (副作用操作の二重実行を構造的に排除)Unity パッケージマネージャからインストール:
https://github.com/isuzu-shiranui/UnityMCP.git?path=jp.shiranui-isuzu.unity-mcp を入力McpEditorInitializer が自動的に HTTP サーバを立ち上げます (127.0.0.1:27182、27182-27199 でフォールバック)curl http://127.0.0.1:27182/health で動作確認💡 macOS 利用者へ: v2.1 で Homebrew 経由の Node (
/opt/homebrew/bin/node、/usr/local/bin/node) の検出に対応しました。Finder から起動した Unity が PATH を継承しない環境でも動作します (#7)。
unity-mcp-ts リポジトリをクローン or リリース ZIP を取得npm install && npm run build を実行して build/index.js を生成claude_desktop_config.json に追加:{
"mcpServers": {
"unity-mcp": {
"command": "node",
"args": ["/absolute/path/to/unity-mcp-ts/build/index.js"]
}
}
}
Windows ではパスのバックスラッシュをエスケープ (\\) するか、フォワードスラッシュを使ってください。
TypeScript サーバ不要で、HTTP 直叩きから操作可能:
# ヘルスチェック
curl http://127.0.0.1:27182/health
# C# コード実行
curl -X POST http://127.0.0.1:27182/execute_code \
-H "Content-Type: application/json" \
-d '{"code":"return GameObject.FindObjectsByType<Transform>(FindObjectsSortMode.None).Length;"}'
# Inspector のスクショ (Windows)
curl -X POST http://127.0.0.1:27182/capture_screenshot \
-H "Content-Type: application/json" \
-d '{"view":"inspector","maxSize":1024}'
マルチ Editor 用にプロキシ経由の例:
# 複数 Unity が起動中なら TS サーバの :27180 で discover
curl http://127.0.0.1:27180/projects
# プロジェクト名指定でリクエスト転送
curl -X POST http://127.0.0.1:27180/proxy/MyProject/health
Skill として ~/.claude/skills/unity-mcp/ に curl ワークフロー集を同梱しています。
MCP client (Claude)
│ stdio (MCP protocol)
▼
unity-mcp-ts (Node)
├── HandlerAdapter / HandlerDiscovery (MCP tools / prompts / resources)
├── UnityConnection
... [View full README on GitHub](https://github.com/isuzu-shiranui/UnityMCP#readme)