UnityMCP
by isuzu-shiranui·★ 131·Score 50
Unity Editor integration with MCP enabling AI assistants to directly interact with Unity projects via HTTP and MCP tools.
Overview
UnityMCP is a comprehensive framework for connecting Unity Editor with AI assistants through the Model Context Protocol. It features a dual architecture with both TypeScript MCP server and C# Unity plugin, supporting HTTP access for direct API calls and MCP tool integration for AI assistants like Claude. The system includes UDP discovery for multiple Unity instances, idempotent command handling, and extensible plugin architecture allowing custom command implementations.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose UnityMCP when you need to connect AI assistants directly with Unity development workflows, especially if you're already using Claude and need code execution capabilities.
When NOT to choose this
Don't choose UnityMCP if you need broader AI model support beyond Claude, require network exposure (it's loopback-only), or need stable versions across Unity version updates.
Tools this server exposes
12 tools extracted from the READMEunity_listClientsList available Unity clients connected to MCP
unity_setActiveClientSet the active Unity client for subsequent operations
unity_connectToProjectConnect to a specific Unity project
unity_getActiveClientGet information about the currently active Unity client
unity_execute_codeExecute C# code in the Unity editor using Roslyn
console_getLogsGet console logs from Unity editor
console_getCountGet count of console log messages
console_clearClear the Unity console
console_setFilterSet filter for console log messages
menu_executeExecute Unity menu commands
browse_hierarchyBrowse Unity scene hierarchy with filters
inspectInspect GameObject and Component properties
Comparable tools
Installation
Unity Editor Setup
- Open Package Manager in Unity (Window > Package Manager)
- Click '+' > 'Add package from git URL...'
- Enter:
https://github.com/isuzu-shiranui/UnityMCP.git?path=jp.shiranui-isuzu.unity-mcp
Claude Desktop Integration
- In Unity, go to Edit > Preferences > Unity MCP
- Click 'Open Installer Window' and follow the installer instructions
- Copy the JSON configuration from 'Configuration Preview'
- Add to Claude Desktop config:
{
"mcpServers": {
"unity-mcp": {
"command": "node",
"args": ["/absolute/path/to/unity-mcp-ts/build/index.js"]
}
}
}- Restart Claude Desktop
FAQ
- How do I connect to multiple Unity Editors?
- Use the proxy endpoint on port 27180 or specify a target parameter with project name. The system automatically discovers multiple Unity instances via UDP broadcast.
- Is the code execution feature secure?
- The `/execute_code` endpoint can run arbitrary C# code. In shared environments, disable it in MCP settings or restrict listeners to loopback only (default behavior).
Compare UnityMCP with
Last updated · Auto-generated from public README + GitHub signals.