Skip to main content

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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unity_mcp_cli-0.2.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unity_mcp_cli-0.2.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

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

Hashes for unity_mcp_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8c0a91225980c814684f8657225a5e70e91f16b614794ee77571fd3d023f5b64
MD5 fc3f74b5a6bc6d53b348cd0c537dc05a
BLAKE2b-256 733a3bd854f7ff2c72dfadcbdeffdf1423a3d3438e8bf28c8ca61b36e30cba39

See more details on using hashes here.

Provenance

The following attestation bundles were made for unity_mcp_cli-0.2.0.tar.gz:

Publisher: release.yml on NaturaAurum/uni-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for unity_mcp_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d1b01f5f7fde478d59ad65b20b0bd2d2220c3bf1db80aac44187f699ed8c49d
MD5 b6b362bcc63f3fc54331943d88c187ee
BLAKE2b-256 f373c47251a9b2f61a2e9b5e96300d08a04fdaf9c21588ebc2036cf965156667

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page