Unity AI CLI Bridge
FreeNot checkedGo-based CLI bridge exposing Unity Editor's built-in MCP tools through stdio, enabling AI agents to perform scene manipulation, compilation, testing, and asset
About
Go-based CLI bridge exposing Unity Editor's built-in MCP tools through stdio, enabling AI agents to perform scene manipulation, compilation, testing, and asset management.
README
Experimental direct-bridge tooling for Unity MCP.
This repository contains:
- a Go CLI that connects directly to Unity's built-in
UnityMCPBridge - a local Unity companion package under
Packages/src/com.hatayama.unity-ai-cli-bridge
The Unity-managed com.unity.ai.assistant package is treated as immutable.
This project does not rely on editing Library/PackageCache.
Architecture
unity-ai-cli
|- status
|- doctor
|- help
|- recipes
|- tools
|- describe
|- call
|- wait
`- mcp serve
|
v
UnityMCPBridge direct IPC
|
v
Unity Editor + com.unity.ai.assistant
Packages/src/com.hatayama.unity-ai-cli-bridge
`- companion diagnostics snapshots
|
v
Library/UnityAiCliBridge/diagnostics.json
Library/UnityAiCliBridge/tools.json
The relay binary is not part of this runtime path.
Requirements
- Unity project with
com.unity.ai.assistant - Unity MCP enabled in the Editor
- Go 1.25 or later to build the CLI
- approval for the CLI client in
Project Settings > AI > Unity MCP
Companion Package
The repository installs a local Unity package from:
Packages/src/com.hatayama.unity-ai-cli-bridge
The package adds:
- diagnostics snapshots for the CLI
- Editor menu commands for bridge diagnostics
- EditMode tests for the companion layer
The package is wired through Packages/manifest.json.
Build
go build -o ./bin/unity-ai-cli ./cmd/unity-ai-cli
Usage
Recommended human flow:
helpto see only the Unity tools that are currently enabledhelp <tool>to understand one toolrecipesto see task-oriented workflowscall <tool>to execute the tool directly
Show the currently resolved bridge and companion snapshot state:
./bin/unity-ai-cli status --json
Diagnose discovery, heartbeat, companion snapshots, and likely approval issues:
./bin/unity-ai-cli doctor --json
Wait for bridge readiness:
./bin/unity-ai-cli wait --for=bridge
List available Unity tools from the live direct bridge:
./bin/unity-ai-cli tools --json
List human-oriented help for the currently enabled Unity tools only:
./bin/unity-ai-cli help --json
Show detailed help for one enabled Unity tool:
./bin/unity-ai-cli help Unity_GetConsoleLogs --json
Show recipes that are currently available for the enabled Unity tools:
./bin/unity-ai-cli recipes --json
Show one task-oriented recipe:
./bin/unity-ai-cli recipes inspect-console --json
Filter tools by catalog category:
./bin/unity-ai-cli tools --category capture
Describe one Unity tool:
./bin/unity-ai-cli describe Unity_GetConsoleLogs --json
Call a Unity tool directly:
./bin/unity-ai-cli call Unity_GetConsoleLogs --json-args '{"maxEntries":5,"includeStackTrace":false}'
Expose Unity tools as an MCP stdio server:
./bin/unity-ai-cli mcp serve
help and recipes are driven by the current live enabled tool set from Unity.
If a tool is disabled in Project Settings > AI > Unity MCP, it will not appear there.
Approval Flow
The first direct connection may stay pending until Unity approves the CLI.
If doctor, tools, describe, call, or mcp serve reports an approval-related issue:
- Open
Edit > Project Settings > AI > Unity MCP - Check
Pending Connections - Approve the
unity-ai-cliclient
This approval is handled from the Unity settings UI, not a modal dialog.
Verification
Build the CLI:
go build -o ./bin/unity-ai-cli ./cmd/unity-ai-cli
Check the enabled tool catalog:
./bin/unity-ai-cli help --json
./bin/unity-ai-cli help Unity_GetConsoleLogs --json
./bin/unity-ai-cli recipes --json
./bin/unity-ai-cli recipes inspect-console --json
./bin/unity-ai-cli tools --category capture
Expected results:
help --jsonlists only the tools that are currently enabled in Unityhelp Unity_GetConsoleLogs --jsonincludes summary, usage guidance, arguments, and examplesrecipes --jsonlists only recipes whose required tools are currently enabledrecipes inspect-console --jsonshows the console inspection workflowtools --category captureshows only capture tools
Development
Install the local Go quality tools:
brew install golangci-lint
go install golang.org/x/vuln/cmd/govulncheck@$(cat .govulncheck-version)
Verify local tool availability:
sh scripts/go-guardrails.sh doctor
Enable the shared local pre-commit hook:
git config core.hooksPath .githooks
Format Go files:
sh scripts/go-guardrails.sh fmt
Run the full local Go guardrail suite:
sh scripts/go-guardrails.sh check
git commit runs fmt-check, go test, go vet, and golangci-lint
automatically when the staged changes include Go-related files. It skips
commits that do not touch the Go toolchain or Go source files.
Run Go tests:
GOCACHE=/tmp/unity-ai-cli-bridge-go-cache go test ./...
Compile the Unity project:
uloop compile
Run companion package EditMode tests:
uloop run-tests --test-mode EditMode --filter-type regex --filter-value "BridgeDiagnosticsServiceTests|BridgeDiagnosticsSnapshotWriterTests"
Run the live end-to-end smoke test:
sh scripts/live-e2e.sh
Specification
License
Installing Unity AI CLI Bridge
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/hatayama/unity-ai-cli-bridgeFAQ
Is Unity AI CLI Bridge MCP free?
Yes, Unity AI CLI Bridge MCP is free — one-click install via Unyly at no cost.
Does Unity AI CLI Bridge need an API key?
No, Unity AI CLI Bridge runs without API keys or environment variables.
Is Unity AI CLI Bridge hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Unity AI CLI Bridge in Claude Desktop, Claude Code or Cursor?
Open Unity AI CLI Bridge on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Unity AI CLI Bridge with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
