The Unity MCP Server enables AI-assisted development of Unity projects through programmatic interaction, offering comprehensive control over:
- Project Management: Set up, validate, and manage Unity projects
- Asset Creation & Management: Create and manage scripts, scenes, materials, shaders, and editor scripts
- Material Handling: Create, update, clone materials, change shaders, and modify properties
- Code Management: Create, update, analyze scripts, handle namespaces, and manage compilation
- UI Toolkit Development: Create and manage UXML layouts, USS styles, and complete UI components
- Editor Extensions: Build custom editor windows, property drawers, and scriptable object editors
- Build Automation: Build for multiple platforms (Windows, macOS, Linux, iOS, Android, WebGL)
- Diagnostics: Analyze logs, validate assets, run tests, and monitor compilation
- Batch Operations: Execute efficient bulk operations on multiple assets
- AI Integration: Analyze requirements, generate project structures, and implement game systems like player controllers, cameras, UI frameworks, and audio managers
Supports building Unity projects for Android as one of the available build targets.
Supports building Unity projects for iOS as one of the available build targets.
Supports building Unity projects for Linux (StandaloneLinux64) as one of the available build targets.
Supports building Unity projects for macOS (StandaloneOSX) as one of the available build targets.
Utilizes Node.js as the runtime environment for the MCP server, with Node.js 18.x or higher required.
Implements the MCP server using TypeScript for type-safe development and better code organization.
Enables direct interaction with Unity projects, providing tools for script creation, asset management, shader creation, custom editor extensions, ProBuilder integration, package management, and project building for multiple platforms.
Supports building Unity projects for WebGL as one of the available build targets.
Unity 6 MCP Bridge v3.0.0
Direct Unity API integration for AI-powered game development
Unity 6 MCP Bridge provides seamless integration between AI assistants (like Claude) and Unity Editor through direct Unity API calls. This is a complete rewrite of the previous MCP server, designed specifically for Unity 6000+ with breaking changes from v1.x/v2.x.
Features
Unity 6 Integration
- Direct Unity API calls via Named Pipes/Domain Sockets
- Real-time synchronization with Unity Editor
- Native AssetDatabase operations (no more meta file issues!)
- Roslyn-powered code analysis and IntelliSense
- Unity 6 template system for code generation
Script Operations
- script_create - Generate scripts from Unity 6 templates
- script_read - Read script content from Unity project
- script_delete - Safe deletion with reference checking
- script_rename - Rename with class name updates
Folder Management
- folder_create - Create with automatic parent directories
- folder_delete - Safe deletion with asset cleanup
- folder_rename - Rename with reference updates
- folder_list - List with Unity metadata
Installation
Prerequisites
- Unity 6000.0 or later (Required)
- Node.js 18+
- Claude Desktop or compatible MCP client
1. Install MCP Bridge
2. Install Unity Package
- Download
MCPBridge.cs
from this repository - Place it in
Assets/Editor/MCP/MCPBridge.cs
in your Unity project - Unity will automatically compile and start the bridge
3. Configure Claude Desktop
Add to your Claude Desktop configuration:
Quick Start
1. Start Unity 6
Open your Unity 6 project. The MCP Bridge will automatically start and listen for connections.
2. Connect with Claude
Open Claude Desktop and start using Unity commands:
3. Verify Connection
API Reference
Project Management
project_set_path
- Set Unity project pathproject_get_info
- Get project info and connection status
Script Operations
Create Script
Read Script
Folder Operations
Create Folder
List Folder
Advanced Features
Real-time Code Analysis
The bridge provides real-time Roslyn-powered analysis:
- Syntax error detection
- Reference finding
- Usage analysis
- IntelliSense data
Template System
Supports Unity 6's built-in templates:
MonoBehaviour
- Standard Unity componentScriptableObject
- Data containerEditor
- Editor extensionCustom
- Basic C# class
Template System
Supports Unity 6's built-in templates:
MonoBehaviour
- Standard Unity componentScriptableObject
- Data containerEditor
- Editor extensionCustom
- Basic C# class
Configuration
Environment Variables
UNITY_MCP_LOG_LEVEL
- Set logging level (debug, info, warn, error)UNITY_MCP_TIMEOUT
- Request timeout in milliseconds (default: 30000)
Unity Settings
The bridge automatically detects Unity installation and project settings. No manual configuration required.
Troubleshooting
Common Issues
"Unity Bridge disconnected"
- Ensure Unity 6000+ is running
- Verify MCPBridge.cs is in
Assets/Editor/MCP/
- Check Unity Console for errors
"Method not implemented"
- Verify Unity version (6000.0+ required)
- Check if Newtonsoft.Json package is installed
- Update Unity to latest 6.x version
Permission Errors
- On macOS/Linux, ensure socket file permissions
- Run Unity with appropriate permissions
- Check firewall settings
Debug Mode
Breaking Changes from v2.x
API Changes
asset_create_script
→script_create
asset_update_script
→ Removed (update functionality removed)script_patch
→ Removed (patch functionality removed)script_move
→ Removed (move functionality removed)folder_move
→ Removed (move functionality removed)script_analyze
→ Removed (analysis functionality removed)folder_info
→ Removed (detailed info functionality removed)- All APIs now use Unity's AssetDatabase directly
Requirements
- Unity 6000+ required (was 2019+)
- Node.js 18+ required (was 16+)
- MCP Bridge package required
Removed Features
- File system-based operations
- Manual meta file handling
- Legacy Unity version support
- Script update/patch functionality
- File/folder move functionality
- Script analysis functionality
- Detailed folder information
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Development Setup
License
MIT License - see LICENSE file for details.
Acknowledgments
- Unity Technologies for Unity 6 API improvements
- Anthropic for the Model Context Protocol
- The Unity developer community
Unity 6 MCP Bridge v3.0.0 - Bringing AI and Unity closer together
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
A Model Context Protocol server that enables Claude to interact directly with Unity projects, providing tools for script creation, asset management, and project building.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that allows Claude to interact with Linear's API for managing teams, issues, projects, and cycles.Last updated -301TypeScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that allows Claude to make API requests on your behalf, providing tools for testing various APIs including HTTP requests and OpenAI integrations without sharing your API keys in the chat.Last updated -Python
- -securityAlicense-qualityA Model Context Protocol server that integrates Claude with Blender, enabling users to analyze and interact with IFC (Industry Foundation Classes) building models through natural language commands.Last updated -9PythonMIT License
- -securityFlicense-qualityModel Context Protocol server that enables Claude to retrieve and analyze code from GitHub repositories through the uithub API.Last updated -229JavaScript