Token-efficient CLI for LLM agents to control Unity Editor
Project description
uni-cli
Token-efficient CLI for LLM agents to control Unity Editor via MCP. Reduces token overhead by ~31x compared to raw MCP tool schemas.
Part of the uni-cli project — extends unity-mcp with additional Unity subsystem tools.
Why
LLM agents talking to Unity through MCP pay a heavy token tax — large tool schemas and verbose JSON responses eat context window budget. uni-cli solves this with a compact CLI layer:
| Metric | Value |
|---|---|
| Per-response output reduction | 79–98% (median 92.8%) |
| Tool schema overhead | MCP 14,877 → CLI 480 tokens (31x reduction) |
Install
pip install unity-mcp-cli
Prerequisites:
- Python 3.10+
- unity-mcp running in your Unity project
Usage
# List scene hierarchy (compact output)
uni-cli hierarchy ls --instance MyProject --fields id,name,parent --limit 50
# Create a GameObject
uni-cli object create --instance MyProject --name "Player" --preset Cube --pos 0,1,0
# Search assets
uni-cli asset search --instance MyProject --query "*.prefab" --limit 20
# Get full JSON output
uni-cli hierarchy ls --format json --limit 10
# List available MCP tools
uni-cli tools
Output Format
Compact row-based format designed for minimal token usage:
row id=12345 name="Main Camera" active=1 parent=-1
row id=12346 name="Directional Light" active=1 parent=-1
ok op=hierarchy.ls count=2 next="" truncated=0
Commands
| Command | Description |
|---|---|
hierarchy ls |
List scene hierarchy |
object create/get/modify/delete |
GameObject operations |
asset search/info/create/delete |
Asset operations |
batch apply |
Execute batch commands from file |
ui-toolkit <action> |
UI Toolkit (UXML, USS, VisualElement) |
addressables <action> |
Addressable Asset System |
dots <action> |
DOTS / ECS |
shader-graph <action> |
Shader Graph |
tools |
List available MCP tools |
Global Options
| Option | Default | Description |
|---|---|---|
--url |
http://127.0.0.1:8080/mcp |
MCP server URL |
--instance |
auto-detect | Unity instance selector |
--format |
compact |
Output format (compact or json) |
--timeout |
30 |
Request timeout in seconds |
Zero Dependencies
uni-cli uses only Python standard library — no external packages required.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unity_mcp_cli-0.2.0.tar.gz.
File metadata
- Download URL: unity_mcp_cli-0.2.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c0a91225980c814684f8657225a5e70e91f16b614794ee77571fd3d023f5b64
|
|
| MD5 |
fc3f74b5a6bc6d53b348cd0c537dc05a
|
|
| BLAKE2b-256 |
733a3bd854f7ff2c72dfadcbdeffdf1423a3d3438e8bf28c8ca61b36e30cba39
|
Provenance
The following attestation bundles were made for unity_mcp_cli-0.2.0.tar.gz:
Publisher:
release.yml on NaturaAurum/uni-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unity_mcp_cli-0.2.0.tar.gz -
Subject digest:
8c0a91225980c814684f8657225a5e70e91f16b614794ee77571fd3d023f5b64 - Sigstore transparency entry: 1036776255
- Sigstore integration time:
-
Permalink:
NaturaAurum/uni-cli@27cd24193209a0872da8694c7c96c6f6de45052d -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/NaturaAurum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@27cd24193209a0872da8694c7c96c6f6de45052d -
Trigger Event:
push
-
Statement type:
File details
Details for the file unity_mcp_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: unity_mcp_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d1b01f5f7fde478d59ad65b20b0bd2d2220c3bf1db80aac44187f699ed8c49d
|
|
| MD5 |
b6b362bcc63f3fc54331943d88c187ee
|
|
| BLAKE2b-256 |
f373c47251a9b2f61a2e9b5e96300d08a04fdaf9c21588ebc2036cf965156667
|
Provenance
The following attestation bundles were made for unity_mcp_cli-0.2.0-py3-none-any.whl:
Publisher:
release.yml on NaturaAurum/uni-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unity_mcp_cli-0.2.0-py3-none-any.whl -
Subject digest:
0d1b01f5f7fde478d59ad65b20b0bd2d2220c3bf1db80aac44187f699ed8c49d - Sigstore transparency entry: 1036776342
- Sigstore integration time:
-
Permalink:
NaturaAurum/uni-cli@27cd24193209a0872da8694c7c96c6f6de45052d -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/NaturaAurum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@27cd24193209a0872da8694c7c96c6f6de45052d -
Trigger Event:
push
-
Statement type: