▄████████ ▄██████▄ ███▄▄▄▄ ████████▄ ███ █▄ ▄█ ███
███ ███ ███ ███ ███▀▀▀██▄ ███ ▀███ ███ ███ ███ ▀█████████▄
███ █▀ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ▀███▀▀██
███ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ███ ▀
███ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ███
███ █▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ███ ███ ▄███ ███ ███ ███ ███
████████▀ ▀██████▀ ▀█ █▀ ████████▀ ████████▀ █▀ ▄████▀
A simple and fast MCP server for Unity.
A Unity MCP server that stays out of the way of your coding agent.
- Robust: survives crashes, restarts, assembly reloads, and handles multiple agents and Unity instances.
- Context-efficient: conserves the agent's context window and saves tokens. Small number of versatile tools.
- Simple setup: one Unity package, one server exe, editor config wizard. No dependencies, no pollution.
Caution
This package is WIP:
- No linux support
- Docs are incomplete
Warning
Granting an AI agent access to Unity indirectly gives them escalated access to your machine. Have a resilient backup strategy, and make sure your work machine is resilient to data loss.
Add the package to your project by Git URL:
https://github.com/apkd/Conduit.git?path=/Conduit.Unity#release
You can also declare it directly in Packages/manifest.json:
"dependencies": {
"dev.tryfinally.conduit": "https://github.com/apkd/Conduit.git?path=/Conduit.Unity#release",Tip
The Unity package includes a wizard for setting up the MCP server. This downloads the server executable and configures your installed code editors.
Tools → Conduit → Setup MCP Server
Caution
(automatic setup and tutorial/docs coming soon)
You can either:
- Download the server executable from the releases page, or...
- Build it by running
dotnet publish,
Now configure your editor:
Codex
For a basic stdio setup, add this to config.toml:
[mcp_servers.unity]
command = "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe"
cwd = "C:\\src\\Conduit"
disabled_tools = []
tool_timeout_sec = 1800
enabled = true[mcp_servers.unity]
command = "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe"
cwd = "/mnt/c/src/Conduit"
disabled_tools = []
tool_timeout_sec = 1800
enabled = true[mcp_servers.unity]
command = "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit"
cwd = "/home/you/src/Conduit"
disabled_tools = []
tool_timeout_sec = 1800
enabled = trueconduit --http [--port 5080] [--url http://127.0.0.1:5080]codex mcp add unity --url http://127.0.0.1:5080To avoid going insane from having to approve every tool call separately:
[mcp_servers.unity]
tools.discard_scenes.approval_mode = "approve"
tools.execute_code.approval_mode = "approve"
tools.find_missing_scripts.approval_mode = "approve"
tools.find_references_to.approval_mode = "approve"
tools.from_json_overwrite.approval_mode = "approve"
tools.get_dependencies.approval_mode = "approve"
tools.help.approval_mode = "approve"
tools.play.approval_mode = "approve"
tools.profiler_browse.approval_mode = "approve"
tools.profiler_overview.approval_mode = "approve"
tools.profiler_record.approval_mode = "approve"
tools.refresh_asset_database.approval_mode = "approve"
tools.reimport_assets.approval_mode = "approve"
tools.reflect.approval_mode = "approve"
tools.restart.approval_mode = "approve"
tools.run_tests_editmode.approval_mode = "approve"
tools.run_tests_player.approval_mode = "approve"
tools.run_tests_playmode.approval_mode = "approve"
tools.save_scenes.approval_mode = "approve"
tools.screenshot.approval_mode = "approve"
tools.search.approval_mode = "approve"
tools.show.approval_mode = "approve"
tools.status.approval_mode = "approve"
tools.to_json.approval_mode = "approve"
tools.view_burst_asm.approval_mode = "approve"Claude Code
Claude Code adds MCP servers with claude mcp add.
claude mcp add --transport stdio unity -- C:\src\Conduit\Conduit.Server\publish\win-x64\conduit.execlaude mcp add --transport stdio unity -- /mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.execlaude mcp add --transport stdio unity -- /home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduitconduit --http [--port 5080] [--url http://127.0.0.1:5080]claude mcp add --transport http unity http://127.0.0.1:5080Cursor
Cursor uses mcp.json with a top-level mcpServers object. You can put it in ~/.cursor/mcp.json for a global setup or .cursor/mcp.json for a project-local setup.
{
"mcpServers": {
"unity": {
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe"
}
}
}{
"mcpServers": {
"unity": {
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe"
}
}
}{
"mcpServers": {
"unity": {
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit"
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"mcpServers": {
"unity": {
"url": "http://127.0.0.1:5080"
}
}
}Windsurf
Windsurf stores MCP servers in ~/.codeium/windsurf/mcp_config.json.
{
"mcpServers": {
"unity": {
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"args": []
}
}
}{
"mcpServers": {
"unity": {
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"args": []
}
}
}{
"mcpServers": {
"unity": {
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"args": []
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"mcpServers": {
"unity": {
"serverUrl": "http://127.0.0.1:5080"
}
}
}Cline
Cline stores MCP settings in cline_mcp_settings.json.
{
"mcpServers": {
"unity": {
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"args": [],
"disabled": false
}
}
}{
"mcpServers": {
"unity": {
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"args": [],
"disabled": false
}
}
}{
"mcpServers": {
"unity": {
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"args": [],
"disabled": false
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"mcpServers": {
"unity": {
"url": "http://127.0.0.1:5080",
"type": "streamableHttp",
"disabled": false
}
}
}Continue
Continue uses YAML, typically as standalone files under .continue/mcpServers/
Create .continue/mcpServers/unity.yaml:
name: Unity MCP
version: 0.0.1
schema: v1
mcpServers:
- name: unity
type: stdio
command: C:\src\Conduit\Conduit.Server\publish\win-x64\conduit.exe
cwd: C:\src\Conduitname: Unity MCP
version: 0.0.1
schema: v1
mcpServers:
- name: unity
type: stdio
command: /mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe
cwd: /mnt/c/src/Conduitname: Unity MCP
version: 0.0.1
schema: v1
mcpServers:
- name: unity
type: stdio
command: /home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit
cwd: /home/you/src/Conduitconduit --http [--port 5080] [--url http://127.0.0.1:5080]name: Unity MCP
version: 0.0.1
schema: v1
mcpServers:
- name: unity
type: streamable-http
url: http://127.0.0.1:5080Gemini CLI
Gemini CLI stores MCP configuration in ~/.gemini/settings.json for user scope or .gemini/settings.json for project scope.
{
"mcpServers": {
"unity": {
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"cwd": "C:\\src\\Conduit"
}
}
}{
"mcpServers": {
"unity": {
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"cwd": "/mnt/c/src/Conduit"
}
}
}{
"mcpServers": {
"unity": {
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"cwd": "/home/you/src/Conduit"
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"mcpServers": {
"unity": {
"httpUrl": "http://127.0.0.1:5080"
}
}
}Equivalent CLI commands:
gemini mcp add unity /home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduitgemini mcp add --transport http unity http://127.0.0.1:5080GitHub Copilot CLI
GitHub Copilot CLI stores MCP servers in ~/.copilot/mcp-config.json.
{
"mcpServers": {
"unity": {
"type": "local",
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"args": [],
"env": {},
"tools": ["*"]
}
}
}{
"mcpServers": {
"unity": {
"type": "local",
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"args": [],
"env": {},
"tools": ["*"]
}
}
}{
"mcpServers": {
"unity": {
"type": "local",
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"args": [],
"env": {},
"tools": ["*"]
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"mcpServers": {
"unity": {
"type": "http",
"url": "http://127.0.0.1:5080",
"headers": {},
"tools": ["*"]
}
}
}Interactive alternative:
/mcp add
VS Code / GitHub Copilot Chat
VS Code uses mcp.json with a top-level servers object. For workspace scope, put it in .vscode/mcp.json; for user scope, open the user MCP configuration from the Command Palette.
{
"servers": {
"unity": {
"type": "stdio",
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"args": []
}
}
}{
"servers": {
"unity": {
"type": "stdio",
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"args": []
}
}
}{
"servers": {
"unity": {
"type": "stdio",
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"args": []
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"servers": {
"unity": {
"type": "http",
"url": "http://127.0.0.1:5080"
}
}
}Antigravity
You can get to the config file from Manage MCP Servers → View raw config.
{
"mcpServers": {
"unity": {
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"args": [],
"cwd": "C:\\src\\Conduit"
}
}
}{
"mcpServers": {
"unity": {
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"args": [],
"cwd": "/mnt/c/src/Conduit"
}
}
}{
"mcpServers": {
"unity": {
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"args": [],
"cwd": "/home/you/src/Conduit"
}
}
}Zed
Zed uses context_servers in its settings. For project scope, put this in .zed/settings.json; for user scope, add it to your user settings.
{
"context_servers": {
"unity": {
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"args": []
}
}
}{
"context_servers": {
"unity": {
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"args": []
}
}
}{
"context_servers": {
"unity": {
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"args": []
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"context_servers": {
"unity": {
"url": "http://127.0.0.1:5080"
}
}
}Roo Code
Roo Code stores global MCP configuration in mcp_settings.json. For project-local setup, create .roo/mcp.json.
{
"mcpServers": {
"unity": {
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"args": [],
"cwd": "C:\\src\\Conduit",
"disabled": false
}
}
}{
"mcpServers": {
"unity": {
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"args": [],
"cwd": "/mnt/c/src/Conduit",
"disabled": false
}
}
}{
"mcpServers": {
"unity": {
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"args": [],
"cwd": "/home/you/src/Conduit",
"disabled": false
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"mcpServers": {
"unity": {
"type": "streamable-http",
"url": "http://127.0.0.1:5080",
"disabled": false
}
}
}JetBrains IDEs / Junie
Junie in JetBrains IDEs and Junie CLI use the same MCP config file format. Use ~/.junie/mcp/mcp.json for user scope or .junie/mcp/mcp.json in the project root for project scope.
{
"mcpServers": {
"unity": {
"command": "C:\\src\\Conduit\\Conduit.Server\\publish\\win-x64\\conduit.exe",
"args": []
}
}
}{
"mcpServers": {
"unity": {
"command": "/mnt/c/src/Conduit/Conduit.Server/publish/win-x64/conduit.exe",
"args": []
}
}
}{
"mcpServers": {
"unity": {
"command": "/home/you/src/Conduit/Conduit.Server/publish/linux-x64/conduit",
"args": []
}
}
}conduit --http [--port 5080] [--url http://127.0.0.1:5080]{
"mcpServers": {
"unity": {
"url": "http://127.0.0.1:5080"
}
}
}These core tools that cover most situations.
In particular, execute_code is vital, as it can run arbitrary C# code without an assembly reload.
It returns the result, logs, exceptions, and compilation errors.
Agents are very proficient at using it for interacting with Unity and debugging code.
status: project and MCP connection stateplay: toggles Play Moderefresh_asset_database: imports modified assets, recompiles codereimport_assets: forces matching assets to reimportexecute_code: runs ad hoc C# codereflect: searches loaded C# types and membersrestart: starts or restarts Unity Editor
Together, these tools enable agents to find, read, and write any asset, GameObject, or component.
search: finds objects and assetshelp: search syntax and examplesshow: displays object propertiesto_json: read object in JSON formatfrom_json_overwrite: overwrite object properties with JSONfind_missing_scripts: scans objects for invalid/deleted scriptsget_dependencies: what assets does this use?find_references_to: what assets use this?save_scenes: save current changes for open scenesdiscard_scenes: discard current changes for open scenes
These complete the iteration loop, allowing the agent to validate their work. By the way: if your project doesn't have tests, you're doing it wrong.
run_tests_editmode: run Edit Mode testsrun_tests_playmode: run Play Mode testsrun_tests_player: run player testsscreenshot: captures the game view, scene view, or any other object
These inspect runtime performance and Burst output.
profiler_record: capture, save, load, or list profiler dataprofiler_overview: summarizes hot frames and samplesprofiler_browse: browses profiler sample hierarchyview_burst_asm: Burst assembly and optimization stats
The tool descriptions themselves should be enough to get started.
If you really want to, you can include something like this in your agent instructions:
Use the Unity MCP tools to prototype solutions, validate code compilation and run tests.
Invoke the `restart` tool in case of instability.
Don't build the Unity solution manually; simply call `refresh_asset_database` after making any code changes.
When dealing with assets and GameObjects, `search`, `show`, `to_json`, `from_json_overwrite`, `find_missing_scripts`, `get_dependencies`, `find_references_to` and `reimport_assets` are your friends.