Unity MCP Efficient
Provides an efficient MCP facade over the MCP for Unity backend, allowing AI agents to search and call Unity Editor operations, batch sequences of operations, inspect project/editor/scene/console/selected-object state, retrieve stored results, and capture Scene or Game view images.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Unity MCP EfficientSearch the catalog for duplicating selected objects in Unity and execute it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Unity MCP Efficient
A small compatibility layer that lets AI clients use MCP for Unity without loading its full tool surface into every prompt.
The model sees six stable tools and discovers the required Unity operation on demand. The facade then compacts routine output, preserves full results for bounded retrieval, and batches related work without forcing every intermediate response into the conversation.
Measured against MCP for Unity v10.1.0, the model-visible schema fell from 23,280 estimated tokens to 915, while 377 indexed Unity operations remained reachable. The reproducible benchmark measures context footprint, not API billing.
This project does not replace the Unity package or its Python server. MCP for Unity remains the backend. Register the facade, not the upstream server, with the AI client. Exposing both tool surfaces removes most of the context savings.
Measured context reduction
On 2026-08-24, the scripts in benchmarks/ produced these results against MCP for Unity v10.1.0 (c14de1e6).
Measurement | Upstream surface | Efficient facade | Reduction |
Model-visible tools | 48 | 6 | 87.50% |
Serialized tool schemas | 93,119 chars | 3,657 chars | 96.07% |
Approximate schema tokens¹ | 23,280 | 915 | 96.07% |
Synthetic 250-object hierarchy² | 628,110 chars | 875 chars | 99.86% |
Approximate hierarchy tokens¹ | 157,028 | 219 | 99.86% |
Action argument surface | 5,566 fields | 1,798 fields | 67.70% |
The dynamic catalog indexed 377 Unity operations. A small deterministic English/Russian search suite returned the expected operation at rank 1 for all 15 cases and within the top 3 for all 15 cases. The release candidate passes 35 facade tests. A live smoke test made no project changes and verified the six-tool surface, editor.refresh at rank 1, editor state, and a two-step scene inspection batch against an open Unity Editor.
¹ Token counts use a transparent four-characters-per-token estimate. They describe context footprint, not API billing. Actual tokenization varies by model and payload.
² The hierarchy benchmark models a noisy response containing 250 objects, 300 vertex indices per object, and the same data in text and structured payloads. This stress case does not promise the same reduction for every scene. See BENCHMARKS.md for the method and raw values.
Related MCP server: Agent Bridge for Unity
What the six tools do
Tool | Purpose |
| Finds the best Unity operations from a short English or Russian task phrase. Full schemas are optional. |
| Executes one exact operation and returns a bounded preview plus a recoverable result handle. |
| Runs up to 50 bounded call, select, assert, poll, foreach, and emit steps in one model round trip. |
| Reads project, editor, scene, console, or selected-object state with revision-aware suppression. |
| Pages, filters, searches, or selects data already produced without repeating Unity work. |
| Returns one bounded Scene or Game view image without duplicating it in structured JSON. |
The model still reaches the 377 indexed operations behind the facade. Those operations no longer occupy the prompt all at once.
Problems handled at the boundary
Common failure mode | What the facade changes |
The client sends dozens of large tool schemas before useful work begins | A six-tool surface with on-demand operation discovery |
Manager tools expose one large union of arguments for every action | Action-specific schemas; 67.70% fewer argument fields in the measured catalog |
Scene, console, test, and asset responses flood the conversation | Unity-aware post-processing, strict output budgets, pagination, and result handles |
A FastMCP or Pydantic | Recursive JSON normalization before preview construction |
Unity completes a mutation but disconnects during domain reload | Raw result persistence, explicit retry metadata, and no automatic mutation replay |
A test run starts but its large envelope hides or loses | A compact asynchronous receipt designed for polling |
The upstream response nests | Outer |
Repeating a timed-out mutation may duplicate work | Stable |
Multi-object work burns one model turn per operation | Bounded sequential workflows and conservative parallel batches for reads |
| Delayed, revision-aware checks with a clear stopping rule |
Architecture
Codex or another MCP client
|
| sees 6 tools
v
Unity MCP Efficient (stdio by default)
|-- capability search over the live upstream catalog
|-- compact Unity-specific post-processing
|-- bounded workflow runtime
|-- local SQLite result and request receipts
|
| HTTP, default http://127.0.0.1:8080/mcp
v
MCP for Unity server
|
v
Unity Editor packageA skill alone cannot hide tool schemas that an MCP client has already loaded. That is why this repository contains both pieces:
the facade enforces the smaller API and compact responses;
the skill teaches Codex how to search, batch, recover, and verify efficiently.
Install
1. Start MCP for Unity in HTTP mode
Install CoplayDev/MCP for Unity using its upstream instructions. In Unity, open Window → MCP for Unity, select the local HTTP transport, and start the server.
The upstream default endpoint is:
http://127.0.0.1:8080/mcpIf your project uses another port, pass it through UNITY_MCP_BACKEND_URL below.
2. Register the facade in Codex
Install uv when needed, then run:
codex mcp add unity-efficient \
--env UNITY_MCP_BACKEND_URL=http://127.0.0.1:8080/mcp \
-- uvx --from git+https://github.com/Vangardo/unity-mcp-efficient.git@v0.2.0 unity-mcp-efficientOn PowerShell, use the same command on one line:
codex mcp add unity-efficient --env UNITY_MCP_BACKEND_URL=http://127.0.0.1:8080/mcp -- uvx --from git+https://github.com/Vangardo/unity-mcp-efficient.git@v0.2.0 unity-mcp-efficientRemove or disable any direct MCP for Unity entry from the same Codex client. Keep the upstream HTTP server running, but do not register its 48-tool surface with the model.
3. Install the Codex skill
The easiest route is to ask Codex:
$skill-installer Install the skill from https://github.com/Vangardo/unity-mcp-efficient/tree/v0.2.0/skills/unity-mcp-efficientFor a manual user-level install, clone the repository and copy skills/unity-mcp-efficient to:
$HOME/.agents/skills/unity-mcp-efficientCodex detects skill changes automatically. Restart it if the skill does not appear.
Other MCP clients
Use this stdio configuration shape:
{
"mcpServers": {
"unity-efficient": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Vangardo/unity-mcp-efficient.git@v0.2.0",
"unity-mcp-efficient"
],
"env": {
"UNITY_MCP_BACKEND_URL": "http://127.0.0.1:8080/mcp"
}
}
}
}Install the packaged skill when the client supports the Agent Skills format. The facade works without it, but the skill improves tool selection and recovery behavior.
Recommended agent loop
Inspect low-detail Unity state once.
Search with one concrete task phrase.
Request the selected schema when its arguments are unclear.
Batch known dependent work sequentially. Parallelize independent reads, never Unity mutations.
Keep compact output and expand stored results by path or page.
Verify the semantic result, not every raw intermediate object.
This loop is already encoded in skills/unity-mcp-efficient/SKILL.md.
Configuration
Variable | Default | Meaning |
|
| Upstream MCP for Unity HTTP endpoint |
|
| Per-operation timeout in seconds |
| OS user cache directory | SQLite result store path; use |
|
| Facade transport: |
Keep the default stdio transport unless you have a reason to expose the facade over a network. Read SECURITY.md before using HTTP or SSE.
Development and verification
git clone https://github.com/Vangardo/unity-mcp-efficient.git
cd unity-mcp-efficient
uv sync --extra dev
uv run pytest -qWith the upstream HTTP server running:
uv run python benchmarks/evaluate_facade.py
uv run python benchmarks/measure_surface.py
uv run python benchmarks/live_smoke.pyevaluate_facade.py and measure_surface.py read the live upstream catalog. live_smoke.py makes no mutations, but it requires an open and connected Unity Editor.
Known boundaries
Compact output is intentionally lossy. The untouched raw result remains available through
get_resultfor a bounded time.The facade does not make arbitrary Unity mutations safe. Permissions and review still belong to the MCP client and user.
Parallel mode is conservative. Unity may serialize editor work internally.
A discoverable optional capability, such as Roslyn support, may still be absent from a particular Unity project.
Scene and Game view capture may omit IMGUI or editor overlays.
Compatibility tests use MCP for Unity
v10.1.0. The catalog is dynamic; benchmark later upstream releases before claiming support.
Design lineage
We took the progressive-disclosure idea from work on Vangardo/mcp_hub, a broader MCP gateway that routes a large integration catalog through a small search-and-call surface. Unity MCP Efficient applies that context discipline to Unity, then adds Unity-specific compaction, revision checks, mutation recovery, screenshots, and bounded local workflows.
If you need this pattern for Slack, Teamwork, Telegram, calendar, memory, automation, or cross-service agents, see MCP Hub.
The Unity compatibility backend is CoplayDev/MCP for Unity, distributed under the MIT License. This repository is an independent project and does not include its source code. See NOTICE.md and THIRD_PARTY_NOTICES.md.
Project documents
License and trademarks
The original code in this repository is available under the MIT License.
Unity is a trademark or registered trademark of Unity Technologies or its affiliates in the United States and elsewhere. This project is not affiliated with or endorsed by Unity Technologies or CoplayDev. Other names and brands belong to their respective owners.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceUnity Editor MCP SDK that exposes Unity Editor capabilities as MCP tools, enabling AI assistants like Claude Code to drive Unity Editor workflows through prefab inspection, asset manipulation, and preview rendering.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to control the Unity Editor through MCP, allowing scene building, runtime scripting, visual QA, and more.4Apache 2.0
- AlicenseNot gradedqualityBmaintenanceAllows MCP clients like Claude Desktop or Cursor to perform Unity Editor actions, including asset management, scene modification, and game mechanic testing.22MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents (like Claude Code, Cursor) to directly operate Unity scenes via MCP protocol, with tools for scene hierarchy, object creation/deletion, and transform modification.16ISC
Related MCP Connectors
Operator-as-agent MCP hub. 6 tools. First $5 free, then $0.001/call.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vangardo/unity-mcp-efficient'
If you have feedback or need assistance with the MCP directory API, please join our Discord server