AI + UNITY

Let an LLM
drive the Editor

With MCP, your AI assistant reads your real console, inspects your real scene, and edits your real scripts — instead of guessing from what you paste into a chat box.

Every command and config here was verified on a working setup: Unity 6000.3.14f1, AI Relay 1.0.12-build.97, mcpforunityserver 10.0.0 · 2026-08-10
0 of 15 chapters read 0%

Two servers, one nickname

Most confusion about “Unity MCP” comes from there being two separate projects with the same name. Unity ships an official relay in the AI Assistant package from Unity 6.3, and a community server has existed for longer and supports older versions. Their install steps and config are not interchangeable.

Pick one deliberately

The comparison chapter puts both side by side, tested on the same machine, so you can choose before you spend an evening on the wrong one.

Then keep your project safe

An agent editing scenes is genuinely useful and genuinely risky. Safety and git hygiene covers what to commit, which tools to restrict, and how to recover.

Chapters

15
Chapter 1 Beginner

What is Unity MCP

Letting an LLM drive the Editor

What the Model Context Protocol actually is, what an LLM can and cannot do inside Unity through it, and whether it is worth setting up.

7 min Read chapter
Chapter 2 Beginner

Official vs Community Server

Unity AI Relay or MCP for Unity

A side-by-side comparison of Unity's built-in AI relay and the community MCP for Unity server, both installed and tested on the same machine.

10 min Read chapter
Chapter 3 Beginner

Installing Unity MCP

Both servers, start to finish

Step-by-step install for the official Unity AI Relay and the community MCP for Unity server, with the verification step most guides skip.

12 min Read chapter
Chapter 4 Beginner

Connect Claude Code

Config, transport, first run

How to connect Unity MCP to Claude Code and Claude Desktop, where the config files live, and how to confirm the tools are really working.

8 min Read chapter
Chapter 5 Beginner

Connect Cursor

mcp.json, stdio, troubleshooting

Connecting Unity MCP to Cursor: where mcp.json lives, global versus project scope, and why Cursor sometimes shows a server as connected with no tools.

7 min Read chapter
Chapter 6 Beginner

Connect VS Code Copilot

Agent mode and tool approval

Using Unity MCP from GitHub Copilot in VS Code: the mcp.json location, enabling agent mode, and managing which tools are allowed to run.

7 min Read chapter
Chapter 7 Intermediate

Prompt Recipes

Prompts that actually work

Concrete prompts for debugging, scene inspection, refactoring, and profiling with Unity MCP, plus the prompt patterns that reliably go wrong.

14 min Read chapter
Chapter 8 Intermediate

Safety & Git Hygiene

Never let an agent eat your scene

How to use Unity MCP without losing work: what to commit first, which tools to restrict, why Unity scenes are hard to review in git, and how to recover.

9 min Read chapter
Chapter 9 Intermediate

What The Tools Actually Do

A reference for the Unity MCP tool surface

Every family of tool the Unity MCP servers expose, what each one is good for, and which ones are safe to allow without review.

11 min Read chapter
Chapter 10 Intermediate

Debugging With MCP

One bug, start to finish

A complete worked debugging session using Unity MCP: reading the console, inspecting the scene, forming a hypothesis, and verifying the fix compiled.

10 min Read chapter
Chapter 11 Intermediate

LLMs Inside Your Game

When it works, and when it does not

The architecture of calling a language model from a shipped Unity game, what it genuinely improves, and the failure modes that sink most attempts.

10 min Read chapter
Chapter 12 Intermediate

Calling Claude From Unity

UnityWebRequest, JSON, and the reply

Real C# for calling the Claude Messages API from Unity: request shape, why JsonUtility fails on the response, and handling the cases that are not success.

13 min Read chapter
Chapter 13 Intermediate

API Key Security

Why your key cannot ship in the build

How API keys leak out of Unity builds, why every client-side hiding trick fails, and the proxy server pattern that actually solves it.

9 min Read chapter
Chapter 14 Advanced

Streaming NPC Dialogue

Words appearing as they are written

How server-sent events work, why streaming makes a slow reply feel fast, and the C# for consuming a stream in Unity without blocking the game.

11 min Read chapter
Chapter 15 Intermediate

Cost, Latency & Caching

Making it affordable at player scale

Picking a model for a game, doing the cost arithmetic before you build, using prompt caching, and the fallbacks that keep the game playable when the network does not cooperate.

11 min Read chapter