Skip to main content

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

Metadata

Release files for unity-mcp-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unity-mcp-cli 0.2.0
File Size Uploaded Provenance
unity_mcp_cli-0.2.0.tar.gz 16.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for unity-mcp-cli 0.2.0
File Interpreter ABI Platform
unity_mcp_cli-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.8 kB

Release files / unity_mcp_cli-0.2.0.tar.gz

Download URL unity_mcp_cli-0.2.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8c0a91225980c814684f8657225a5e70e91f16b614794ee77571fd3d023f5b64
BLAKE2b-256 checksum
How to use checksums
733a3bd854f7ff2c72dfadcbdeffdf1423a3d3438e8bf28c8ca61b36e30cba39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

Release files / unity_mcp_cli-0.2.0-py3-none-any.whl

Download URL unity_mcp_cli-0.2.0-py3-none-any.whl
Size 22.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d1b01f5f7fde478d59ad65b20b0bd2d2220c3bf1db80aac44187f699ed8c49d
BLAKE2b-256 checksum
How to use checksums
f373c47251a9b2f61a2e9b5e96300d08a04fdaf9c21588ebc2036cf965156667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

Security for unity-mcp-cli 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for unity_mcp_cli-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page