Unity MCP ✨
A Unity MCP server that allows MCP clients like Claude Desktop or Cursor to perform Unity Editor actions.
Overview
Unity MCP is a Unity package that facilitates communication between Unity and Large Language Models (LLMs) like Claude Desktop through the Model Context Protocol (MCP). It serves as a bridge for developers to automate workflows and control the Unity Editor programmatically.
To use Unity MCP, download the package via the Unity package manager and set up a Python server. Configure the MCP server in Unity to connect with tools like Claude Desktop or Cursor, and start sending commands to interact with LLMs.
- Bidirectional communication between Unity and LLMs. - Asset management for creating and manipulating Unity assets. - Scene control for managing scenes and objects. - Material editing capabilities. - Script integration for viewing and updating Unity scripts. - Automation of Unity Editor functions.
- Automating repetitive tasks in Unity projects.
- Enhancing game development workflows with LLMs.
- Programmatically managing assets and scenes in Unity.
Add to your AI client
Use these steps to connect Unity MCP ✨ in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"unity-mcp-justinpbarnett": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-justinpbarnett"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"unity-mcp-justinpbarnett": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-justinpbarnett"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"unity-mcp-justinpbarnett": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-justinpbarnett"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"unity-mcp-justinpbarnett": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-justinpbarnett"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"unity-mcp-justinpbarnett": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-justinpbarnett"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"unity-mcp-justinpbarnett": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-justinpbarnett"
]
}
}
}FAQ
Can Unity MCP work with any LLM?
Yes, Unity MCP is designed to work with any MCP-compliant LLM, including Claude Desktop.
Is Unity MCP free to use?
Yes, Unity MCP is an open-source project and is free to use.
What programming languages are required?
Unity MCP primarily uses C# for Unity and Python for the server-side implementation.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3248,"uuid":"0f228119-5350-4b54-b799-d0951ee02710","name":"unity-mcp","title":"Unity MCP ✨","description":"A Unity MCP server that allows MCP clients like Claude Desktop or Cursor to perform Unity Editor actions.","avatar_url":"https://avatars.githubusercontent.com/u/42453910?v=4","created_at":"2025-03-18T12:02:06.039Z","updated_at":"2025-03-18T14:08:42.038Z","status":"created","author_name":"justinpbarnett","author_avatar_url":"https://avatars.githubusercontent.com/u/42453910?v=4","tags":"ai,unity,mcp,ai-integration","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/justinpbarnett/unity-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"1426\",\"license\":\"MIT license\",\"language\":\"C#\",\"is_official\":false,\"latest_commit_time\":\"2025-04-09 09:12:24\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]