Home / Guides / Cursor with Unity

How to use Cursor with Unity

Short answer: open your Unity project's root folder in Cursor, keep the Unity Editor open on the same project, and let Cursor's agent edit C# scripts under Assets/. Unity recompiles, you read the Console, and you run tests. When you want the agent to see inside the Editor, install the free Unity CLI and run unity mcp configure cursor. You can try all of it on Cursor's Free plan. Everything below comes from Unity's docs and Cursor's docs, checked October 21, 2026.

What you are connecting

Heads up if you read older tutorials: Unity has deprecated the MCP server inside the in-editor AI assistant package (com.unity.ai.assistant). Unity's docs say the Unity CLI replaces it, and name cursor as an example client for the migration command (Unity CLI as the replacement for the in-Editor MCP server).

What you need

Cursor

AI code editor with a built-in agent, plus a CLI and cloud agents, that writes and edits game code from plain English requests.

Pricing: Freemium, from $8/mo (Plus, Grok models only). Beginner rating: 3/5. Very capable but assumes some coding.

The easiest place to start if you have never used a terminal. You see every file and every change in one window.

Unity

Popular 2D and 3D engine for PC, mobile and console games, using C#.

Pricing: Freemium, from $210/mo (Pro). Beginner rating: 3/5. Huge amount of tutorials, but the editor and C# take time to learn.

Personal is free to download. Start with a tiny 2D scene.

Unity AI

Unity's AI tools: an in-editor assistant that understands your scene, plus a free official plugin, CLI and MCP server so agents like Codex and Claude Code can drive the editor. Needs Unity 6 or newer.

Pricing: Freemium, from $10/mo (assistant on Personal). Beginner rating: 3/5. The free plugin and MCP server help a lot, but you still need to learn Unity basics first.

Unity's AI tools: CLI, MCP server and skills (free), plus a credit-based in-editor assistant.

The realistic workflow (MCP optional)

  1. Cursor edits C# directly under Assets/, plus test folders when you ask.
  2. The Unity Editor stays open on the same project, so scripts recompile and errors show up in the Console.
  3. You read the Console and paste errors back. With the Unity CLI connected, the agent can check the Editor itself.
  4. You run tests with the Unity Test Framework, starting with Edit Mode tests.
  5. You playtest. No agent can tell you if the jump feels good.

Setup, step by step

1. Create a Unity project and commit it

In Unity Hub, install a Unity 6 Editor and create a 2D or 3D project in its own folder. Open it once so Unity creates Assets/, ProjectSettings/ and the .meta files. Then run git init in that folder, add a .gitignore like this one (never ignore *.meta), and make a first commit:

# Unity generated
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
*.csproj
*.sln
*.user

2. Open the project in Cursor

Install Cursor, sign in, and use File, Open Folder on the project root, the folder that holds Assets/. Open the agent chat and ask it to explain the project layout. That is a safe first request that changes nothing.

3. Add an AGENTS.md

Cursor reads an AGENTS.md file in your project root as plain instructions for the agent (Cursor rules and AGENTS.md). For more control it also supports .mdc rule files in .cursor/rules. This is an example, so edit it for your project:

# Unity project notes for the agent

- Engine: Unity 6 (edit this to match your exact version, e.g. 6000.0).
- Scripts live under Assets/Scripts/. Prefer small MonoBehaviour components.
- Prefer editing .cs files. Do not hand edit .unity scene or .prefab YAML unless asked.
- After script edits, wait for the Editor to recompile, then check the Console for errors.
- Tests: Edit Mode tests live under Assets/Tests/EditMode/.
- Never delete or rename .meta files. Commit .meta files with new assets.
- Ask before changing Project Settings, Packages/manifest.json or Input System bindings.

Your first tiny task

  1. Ask the agent: Create Assets/Scripts/PlayerController.cs: a 2D Rigidbody2D player that moves with WASD or the arrow keys. Add a comment at the top explaining how to attach it.
  2. Switch to the Unity Editor and wait for it to recompile. Create a Sprite or Capsule, add a Rigidbody2D, attach the script and press Play. If the Console shows errors, copy them into Cursor and ask it to fix them.
  3. Ask: Add an Edit Mode test assembly under Assets/Tests/EditMode with one test for a plain C# helper, for example clamping move speed. Run it from the Test Runner window in the Editor.
  4. Commit, then add one more feature: a coin, a score, a simple enemy. Repeat edit, Console, test, play, commit.

Prefer the terminal for tests? The Unity Test Framework runs Edit Mode tests in batch mode with Unity -batchmode -runTests -projectPath . -testPlatform EditMode -testResults TestResults.xml. Unity's manual says a project can't open in batch mode while the Editor has it open, so close the Editor first.

Optional: connect Cursor to the Editor with the Unity CLI

  1. Install the Unity CLI. Unity's script for macOS or Linux is curl -fsSL https://unity.com/install.sh | bash (Windows PowerShell: irm https://unity.com/install.ps1 | iex). Then run unity --version. Unity Hub also updates the CLI, so you may already have it.
  2. Open your project in the Editor, then from the project folder run unity pipeline install to add the Pipeline package. Let the Editor recompile.
  3. Check the connection with unity status. It should report the Editor as reachable for your project.
  4. Register the MCP server in Cursor: unity mcp configure cursor. Add --dry-run first to see the config path it would write. Unity says only the Unity entry is written and every other key in the file is kept. unity mcp configure --list shows every supported client and its status.
  5. Install Unity's skills for Cursor: unity skill install cursor. Add --local to install into this project, which Unity says also copies the skill that ships with your project's Pipeline package.
  6. Restart Cursor, open Customize in the sidebar, and make sure the Unity server is turned on. Then ask: Read the Unity Console and summarize any errors. Cursor asks you to approve each MCP tool call by default.

Writing the entry by hand: Cursor reads .cursor/mcp.json in your project or ~/.cursor/mcp.json for every project, and runs local servers from a command and args (MCP in Cursor). unity mcp is a stdio server, so an entry looks like this. This is our example, so prefer what unity mcp configure cursor --dry-run shows:

{
  "mcpServers": {
    "unity": {
      "command": "unity",
      "args": ["mcp"]
    }
  }
}

Two Editors open? Unity's CLI release notes say unity mcp reads UNITY_PROJECT_PATH (or --project-path) to pick which project's Editor it talks to.

Common errors and fixes

Cursor, Claude Code or Codex for Unity?

All three can use the same Unity CLI MCP server. Unity's official agent plugin is published for Claude Code and Codex, so they get a slightly smoother Unity setup. Cursor makes sense if you want a normal code editor where you watch every change, and a free plan to start. See How to use Claude Code with Unity, How to use Codex with Unity and Claude Code vs Codex vs Cursor for game dev.

Sources

All checked October 21, 2026. Plans change often, so check current pricing before you pay. Prices are in USD and exclude tax.

Related

Using Unreal instead? Follow How to use Cursor with Unreal Engine. Still choosing an engine? Read Godot vs Unity for beginners. See also our Cursor and Unity tool pages.

FAQ

Does Cursor work with Unity officially?

Yes, through the free Unity CLI. Unity's docs list cursor as a client for unity mcp configure, which registers the Unity CLI's MCP server in Cursor in one step, and its release notes say unity skill install for Cursor installs a real Agent Skills directory. Unity's official agent plugin is published for Claude Code, Codex, Grok and Antigravity, and we did not find a unity setup command for Cursor (checked October 21, 2026).

Can I do this for free?

You can start for $0. Cursor's Free plan includes limited agent requests, Unity Personal is free to download, and Unity says its CLI and MCP server are free to use. Cursor's paid plans start at $8/mo (Plus, Grok models only). Checked on cursor.com/pricing and Unity's docs, October 21, 2026.

Do I need MCP at all?

No. The core loop works without it: Cursor edits C# under Assets/, the Unity Editor recompiles, you read the Console and paste errors back, then run tests. MCP is an optional extra that lets the agent read the Console and drive the Editor itself.

Where does Cursor keep the Unity MCP entry?

Cursor reads MCP servers from .cursor/mcp.json in your project and from ~/.cursor/mcp.json in your home folder. Run unity mcp configure cursor --dry-run first to see exactly which file it would write. Unity says only the Unity entry is written and every other key in the file is kept.

Is Unity's in-Editor MCP server still the way to connect?

No. Unity's docs say the MCP server inside the in-editor AI assistant package (com.unity.ai.assistant) is deprecated and point you to the Unity CLI instead. Third-party MCP packages from GitHub are not affected.

Which Unity version do I need?

Unity 6.0 LTS or later for the Unity CLI to drive a running Editor. Older Editors still work with the plain file edit loop.

Get the free First Game Starter Pack

A 7-step path to your first tiny game, free art and sound you can actually use, and our AI tools kit for Godot, Unity, Unreal and Roblox. Plus one short tool tip a week. No spam, unsubscribe any time.

We will email you a link to confirm. The pack arrives right after you click it. Privacy Past issues