Open-source AI agent platform for Unity with safety-first design and developer extensibility
UnityMCP is an open-source AI agent platform that lets AI assistants like Claude, Codex, and Cursor operate inside the Unity Editor. Most competing MCP servers at the time had no safety layer — UnityMCP was designed safety-first, prioritizing guardrails, evaluation, and agent reasoning alongside its 45+ built-in tools.
Safety Guardrails
Every tool carries annotations — destructiveHint, readOnlyHint, idempotentHint, openWorldHint — that inform AI assistants about the risk level of each operation before execution. A safety blacklist prevents AI from executing dangerous editor menu items. These guardrails were a deliberate design choice to make users comfortable trusting AI with their Unity projects.
Agent Reasoning Architecture
Four workflow prompts guide AI assistants through multi-step reasoning tasks: inspecting GameObjects, examining prefabs via prefab stage, safely modifying components with verification, and setting up new scenes with appropriate defaults. A progressive discovery pattern via search_tools lets the AI explore available capabilities incrementally by category or keyword rather than receiving all tools at once — shaping how agents reason about tool selection and sequencing.
Observability & Monitoring
A real-time activity log monitors all MCP requests and responses from the editor window. Built-in test tools (test_echo, test_add, test_unity_info) validate connectivity and parameter handling.
Model Evaluation
Tool-calling behavior was tested and iterated across Claude 4.5 and Claude 4.6. Tool design, parameter schemas, and prompt templates evolved based on how different model versions interacted with the platform.
Developer Extension API
A single-attribute registration system — [MCPTool], [MCPResource], [MCPPrompt] — lets developers extend the platform with custom tools, resources, and prompts without modifying core code. Parameter constraints (enums, min/max) are included in JSON Schema sent to AI assistants. Automatic discovery on domain reload means no manual registration needed, making UnityMCP a platform for the community.
Architecture
A native C plugin runs the HTTP server on a background thread, persisting across Unity domain reloads — the AI connection stays active even during script recompilation. JSON-RPC over HTTP(S) with optional TLS encryption and API key authentication supports remote access. Cross-platform: Windows, macOS, Linux. Open source under GPLv3.