Unity MCP Server
MCP server for Unity — Gives AI assistants structured access to your Unity project from any MCP-capable IDE or app. No Unity Editor required.
Your IDE talks to this server; the server reads your Unity project folder and answers with project info, build scenes, scripts, prefabs, and more — so the AI can help without opening the Editor.
Overview
- Editor-free — Reads only from the project filesystem.
- One server, many projects — Set
UNITY_PROJECT_PATHper project in your MCP config. - MCP-native — Works with any client that supports the Model Context Protocol (tools over stdio).
Supported IDEs and clients
This server uses the standard MCP protocol over stdio and exposes tools. Any IDE or app that can run an MCP server and pass environment variables will work. Commonly used clients include:
Configuration is the same everywhere: command = node, args = path to dist/index.js, env = UNITY_PROJECT_PATH = your Unity project root. See Configuration below for a Cursor example; other clients use the same structure in their own config format.
Tools
Expand a category below to see the tools it includes.
Using search_tools — Pass an optional query to filter tools by name, description, or category. Omit query to get the full catalog grouped by category.
All tools read from the project filesystem only.
Real-life examples
Copy-paste these into Claude, Cursor, or any MCP client (with this server configured and UNITY_PROJECT_PATH set). The AI will pick the right tools.
What to type in Claude / Cursor or any other MCP Client
In Claude, Cursor, or any MCP client, ask in natural language; the AI picks the right tool. Use the Example prompt to type column in each tools table above — those are the phrases to type in chat to get that result.
Prerequisites
- Node.js 18+
- UNITY_PROJECT_PATH — Absolute path to your Unity project root (set in your MCP client)
Installation
git clone https://github.com/rachitkumarrastogi/unity-mcp-server.git
cd unity-mcp-server
npm install
npm run build
The server uses stdio; your MCP client starts it automatically.
Configuration
Example for Cursor (same idea for Claude Desktop, VS Code + MCP, Windsurf, etc.):
{
"mcpServers": {
"unity": {
"command": "node",
"args": ["/absolute/path/to/unity-mcp-server/dist/index.js"],
"env": {
"UNITY_PROJECT_PATH": "/absolute/path/to/YourUnityProject"
}
}
}
}
Replace the paths with your actual paths. For Claude Desktop, add an entry under mcpServers in claude_desktop_config.json with the same command, args, and env. For VS Code, use your MCP extension’s config to add the server and UNITY_PROJECT_PATH. Other clients follow the same pattern in their own config files.
Development
- Run built:
node dist/index.js - Run dev:
npm run devornpx tsx src/index.ts
Integration with Unity Editor
-
Current workflow: The AI runs inside your IDE (Cursor, VS Code with MCP, Claude Desktop, Windsurf, or another MCP-capable client). This server provides the AI with read-only access to your project (scenes, scripts, settings, and related assets). You run Unity Editor separately to open scenes, enter Play mode, and build. The AI uses the server to inspect the project and to suggest changes, answer questions, and assist with refactoring.
-
Future compatibility: This server implements the standard MCP protocol over stdio and requires a single environment variable (
UNITY_PROJECT_PATH). If Unity Editor gains built-in MCP client support, you could connect it to this server using the same configuration: commandnode, arguments pointing todist/index.js, andUNITY_PROJECT_PATHset in the environment. No changes to this codebase would be required.
Security
This repository does not include game code, assets, or secrets. The Unity project path is supplied at runtime by your MCP client. The server is suitable for public and private use.
Documentation
- MCP Registry — Discover and install this server from the official registry.
- Guides: Quick start · Publish · Tools by role
- Skills: Unity-domain agent skills
- Changelog: CHANGELOG.md