UnityInfoMCP
A runtime inspection and automation toolkit that enables MCP clients to interact with live Unity game sessions through a dedicated bridge plugin. It allows users to browse scene hierarchies, inspect component fields, search text elements, and modify game object properties in real-time.
README
English | 한국어
UnityInfoMCP
Unity runtime inspection toolkit for MCP-based automation.
This repository contains two parts:
UnityInfoMCP: an external Python MCP serverUnityInfoBridge: an in-game Unity plugin that exposes runtime data over local JSON-RPC
The split is intentional:
- the MCP server can stay alive while games restart
- AI clients keep a stable MCP endpoint
- the game-side bridge can reconnect whenever the game launches again
Port layout
This is the part that matters most in practice:
- MCP server:
127.0.0.1:16000by default - Game bridge: first free port in
127.0.0.1:16001~16100
These are different endpoints.
--portchanges the MCP server portUNITY_INFO_BRIDGE_PORTis only a legacy fallback for bridge connection attempts- bridge auto-discovery still scans
16001~16100
There are also two separate transport layers:
- Client ->
UnityInfoMCP: Streamable HTTP UnityInfoMCP->UnityInfoBridge: TCP
Repository layout
UnityInfoMCPThe Python MCP packageUnityInfoBridgeThe Unity plugin projectUnityInfoBridge/includesReference DLLs used to build the bridgedocsBridge protocol and tool mapping documents
Supported bridge targets
UnityInfoBridge currently targets:
BepInEx BE #754+MonoBepInEx BE #754+IL2CPPMelonLoader 0.7.2MonoMelonLoader 0.7.2IL2CPP
Running the MCP server
Create and activate a virtual environment:
python -m venv .venv
. .venv/Scripts/activate
pip install -e .
For PyInstaller or release builds, install the build extra instead:
pip install -e ".[build]"
Run the MCP server on the default HTTP port:
unity-info-mcp
If the unity-info-mcp command is not found on Windows, use:
python -m UnityInfoMCP
That usually means Python's user Scripts directory is not on PATH.
In this environment, the generated launcher is installed at:
C:\Users\USER\AppData\Local\Python\pythoncore-3.12-64\Scripts\unity-info-mcp.exe
Run it on a different port:
unity-info-mcp --port 8080
Behavior:
- MCP transport: Streamable HTTP
- default bind:
127.0.0.1:16000 - startup failure: prints the error and waits for
Enterbefore exiting
MCP client configuration
Recommended when unity-info-mcp is available on PATH:
[mcp_servers.UnityInfoMCP]
command = "unity-info-mcp"
args = []
startup_timeout_sec = 45
[mcp_servers.UnityInfoMCP.env]
UNITY_INFO_BRIDGE_HOST = "127.0.0.1"
UNITY_INFO_BRIDGE_PORT = "16000"
If you prefer to invoke the module directly:
[mcp_servers.UnityInfoMCP]
command = "python"
args = ["-m", "UnityInfoMCP"]
startup_timeout_sec = 45
[mcp_servers.UnityInfoMCP.env]
UNITY_INFO_BRIDGE_HOST = "127.0.0.1"
UNITY_INFO_BRIDGE_PORT = "16000"
If neither unity-info-mcp nor python is reliably on PATH, use an explicit interpreter path:
[mcp_servers.UnityInfoMCP]
command = 'C:\path\to\.venv\Scripts\python.exe'
args = ["-m", "UnityInfoMCP"]
startup_timeout_sec = 45
[mcp_servers.UnityInfoMCP.env]
UNITY_INFO_BRIDGE_HOST = "127.0.0.1"
UNITY_INFO_BRIDGE_PORT = "16000"
Environment variables
UNITY_INFO_BRIDGE_TRANSPORTDefault:tcpTransport used betweenUnityInfoMCPand the game-sideUnityInfoBridgeUNITY_INFO_BRIDGE_HOSTDefault:127.0.0.1UNITY_INFO_BRIDGE_PORTDefault:16000Legacy fallback bridge port onlyUNITY_INFO_BRIDGE_TIMEOUT_SECDefault:8.0UNITY_INFO_MCP_NAMEDefault:UnityInfoMCPUNITY_INFO_MCP_LOG_LEVELDefault:INFO
Use .env.example as a starting point if needed.
Building UnityInfoBridge
Build inputs:
- bridge references are resolved from
UnityInfoBridge/includes - the project only uses local reference DLLs under:
UnityInfoBridge/includes/bepinex/monoUnityInfoBridge/includes/bepinex/il2cppUnityInfoBridge/includes/melonloader/monoUnityInfoBridge/includes/melonloader/il2cppUnityInfoBridge/includes/unity/monoUnityInfoBridge/includes/unity/il2cpp UnityInfoBridge/build.ps1builds all supported variants
The repository already includes the required reference DLLs, so builds do not depend on any extra sync step.
Typical build:
Set-Location UnityInfoBridge
.\build.ps1
Build specific targets:
Set-Location UnityInfoBridge
.\build.ps1 -Configurations Release_BepInEx_IL2CPP
Build outputs:
UnityInfoBridge/Release/UnityInfoBridge.BepInEx.Mono/UnityInfoBridge/Release/UnityInfoBridge.BepInEx.IL2CPP/UnityInfoBridge/Release/UnityInfoBridge.MelonLoader.Mono/UnityInfoBridge/Release/UnityInfoBridge.MelonLoader.IL2CPP/
Release assets
The GitHub release workflow produces:
UnityInfoMCP_vx.x.x.exeUnityInfoBridge_vx.x.x_MelonLoader_Mono.zipUnityInfoBridge_vx.x.x_MelonLoader_IL2CPP.zipUnityInfoBridge_vx.x.x_BepInEx_Mono.zipUnityInfoBridge_vx.x.x_BepInEx_IL2CPP.zip
Package structure:
- MelonLoader zip:
Mods/UnityInfoBridge.dll - BepInEx zip:
BepInEx/plugins/UnityInfoBridge/UnityInfoBridge.dll
MCP tool surface
Runtime:
bridge_statuslist_bridge_targetsselect_bridge_targetget_runtime_summary
Scene and hierarchy:
list_scenesget_scene_hierarchyfind_gameobjects_by_nameresolve_instance_idget_gameobjectget_gameobject_by_pathget_gameobject_children
Components and fields:
get_componentsget_componentget_component_fieldssearch_component_fields
Text and localization discovery:
list_text_elementssearch_textget_text_context
Snapshots:
snapshot_gameobjectsnapshot_scene
Example workflow
Find which font a live dialogue line is using:
User prompt:
"어디까지나 이리스의 의견이니까"라는 텍스트가 어느 폰트를 사용하고 있는지 알려줘.
Primary tool call:
UnityInfoMCP.search_text({
"query": "어디까지나 이리스의 의견이니까",
"include_inactive": true,
"limit": 10
})
Typical result summary:
- scene:
Search - object path:
_root/Canvas2/ScreenScaler2/GameObject/messagewindow/messagearea/text_message (TMP) - component type:
TMPro.TextMeshProUGUI - current TMP font asset:
message#en-font
Move the same text up by 100px:
User prompt:
그 텍스트를 위로 100px 올려줘.
Tool flow:
UnityInfoMCP.get_components({
"gameobject_instance_id": 480506,
"include_fields": true,
"include_non_public": false,
"field_depth": 1
})
UnityInfoMCP.set_component_member({
"component_instance_id": 485632,
"member_name": "anchoredPosition",
"value": "{\"x\":0.0,\"y\":-258.0}",
"include_non_public": false
})
Verification:
UnityInfoMCP.get_component_fields({
"component_instance_id": 485632,
"include_non_public": false,
"include_properties": true,
"max_depth": 1
})
Typical result summary:
- target component:
UnityEngine.RectTransform anchoredPosition:(0.0, -358.0)->(0.0, -258.0)- effective change: moved upward by
100px
Runtime object IDs such as 480506 and 485632 are example values and will differ each session.
Documentation
- Bridge protocol:
docs/bridge-protocol.md - Tool mapping:
docs/tool-catalog.md
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。