MCP Catalogs
首页Unity-MCP screenshot

Unity-MCP

by IvanMurzak·2,767·综合分 57

Unity-MCP 通过 MCP 协议让 AI 代理直接在 Unity 编辑器和运行环境中工作。

developer-toolsai-llmproductivity
256
Forks
48
活跃 Issue
本月
最近提交
2 天前
收录于

概述

Unity-MCP 是一个全面的 MCP 服务器,将 Unity 游戏开发与 AI 功能连接起来。它提供大量工具,让 AI 代理可以操作 Unity 项目、创建游戏对象、修改资产,甚至在编译后的游戏运行时环境中工作。该服务器支持多个 AI 提供商,包括 Claude、OpenAI 和 Microsoft,无供应商锁定,并提供 CLI 用于快速设置。它能够在游戏内实现 AI 互动,为动态 NPC 行为和实时调试提供了可能性。

试试问 AI

装完之后,这里有 6 个你可以让 AI 做的事:

:使用 AI 代理自动化 Unity 项目开发任务
:在游戏运行时使用 LLM 创建动态 NPC 行为
:借助 AI 调试 Unity 项目
:Unity-MCP 是否能在运行时游戏中工作?
:支持哪些 AI 提供商?
:能否创建自定义工具?

什么时候选它

如果你正在使用 Unity 开发,并希望将 AI 直接集成到开发工作流或游戏运行时中,Unity MCP 是理想选择。

什么时候不要选它

如果你不使用 Unity 或需要与其他游戏引擎集成 AI,则不应选择 Unity MCP。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • assets-copy

    Copy the asset at path and stores it at newPath

  • gameobject-create

    Create a new GameObject in opened Prefab or in a Scene

  • scene-open

    Open scene from the project asset file

  • script-update-or-create

    Updates or creates script file with the provided C# code

  • reflection-method-call

    Call any C# method with input parameters and return results

  • editor-application-set-state

    Control the Unity Editor application state (start/stop/pause playmode)

  • assets-find

    Search the asset database using the search filter string

  • gameobject-modify

    Modify GameObjects and/or attached component's fields and properties

  • package-add

    Install a package from the Unity Package Manager registry

  • tests-run

    Execute Unity tests (EditMode/PlayMode) with filtering and detailed results

  • screenshot-game-view

    Captures a screenshot from the Unity Editor Game View

  • reflection-method-find

    Find method in the project using C# Reflection (even private methods)

可对比工具

unity-tools-mcpgame-dev-assistantclaude-codecursorai-game-dev

安装

安装

Unity 包

  1. [下载 Unity 包](https://github.com/IvanMurzak/Unity-MCP/releases/latest/download/AI-Game-Dev-Installer.unitypackage)
  2. 导入到您的 Unity 项目中

OpenUPM

openupm add com.ivanmurzak.unity.mcp

CLI

# 安装 CLI
npm install -g unity-mcp-cli

# 在 Unity 项目中安装插件
unity-mcp-cli install-plugin ./MyUnityProject

# 设置 AI 技能
unity-mcp-cli setup-skills claude-code ./MyUnityProject

Claude Desktop 配置

添加到 claude_desktop_config.json

{
  "mcpServers": {
    "unity-mcp": {
      "command": "npx",
      "args": ["unity-mcp-server"],
      "env": {}
    }
  }
}

FAQ

Unity-MCP 是否能在运行时游戏中工作?
是的,与其他许多工具不同,Unity-MCP 能够在编译后的游戏内部工作,支持实时 AI 调试和玩家-AI 互动。
支持哪些 AI 提供商?
Unity-MCP 支持 Anthropic (Claude)、OpenAI、Microsoft 等多家 AI 提供商的 AI 代理,无供应商锁定。
能否创建自定义工具?
是的,该服务器具有可扩展性 - 您可以通过将 C# 方法作为 MCP 工具来暴露,在项目代码中创建自定义工具。

Hacker News 讨论

开发者社区最近的相关讨论。

Unity-MCP 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。