A Unity MCP server bridges the Unity Editor and AI clients, so an agent can create and modify GameObjects, edit scenes, run menu items, read the console and automate editor tasks. Here is the setup with the widely-used mcp-unity package.
How it works
Unity MCP has two parts: a Unity package (the editor-side bridge) and a Node server that speaks MCP to your client. The client talks to the Node server, which relays commands to the Editor over a local WebSocket (default ws://localhost:8090).
Step 1 — install the Unity package
In Unity: Window → Package Manager → + → Add package from Git URL, then enter:
https://github.com/CoderGamester/mcp-unity.git
Step 2 — configure your AI client
The easiest path: in Unity open Tools → MCP Unity → Server Window, click Configure for your client (Claude Code, Cursor, Windsurf…), and confirm. It writes the MCP entry for you. If you prefer manual config, point your client at the bundled Node server per the repo's README. See MCP config file location and the Claude Code MCP setup guide.
Step 3 — start and verify
Keep the Unity Editor open (the bridge runs inside it). Ask your agent: "Create an empty GameObject named 'Spawner' and add a Rigidbody." If it appears in the scene, you are connected.
Common problems
- Connection refused on :8090 — the Unity Editor isn't open, or the MCP Unity server window isn't running.
- Tools missing in client — re-run the Configure step, then fully restart the client.
- Node errors — the bundle needs Node 18+; build the TypeScript per the README if running from source.
- Nothing happens in the Editor — make sure the right Unity project/window has focus.
Safety
An editor-driving agent can modify your project. Work in version control (commit before agent sessions) so you can revert. See MCP security best practices.
Going further
Unity pairs with GitHub and a filesystem server for a full game-dev loop. Browse the developer tools category or curated loadouts. Built a Unity server? Submit it.