{"type":"mcp_server","name":"UnityMCPIntegration","description":"This repository provides a seamless integration between Model Context Protocol (MCP) and Unity, enabling AI assistants to understand and interact with Unity projects in real-time. AI can access scene data,","category":"Developer Tools","language":"C#","stars":154,"forks":3,"owner":"quazaai","github_url":"https://github.com/quazaai/UnityMCPIntegration","homepage":null,"setup":"## Setup\n\n### Prerequisites\n- Unity 2021.3 or later\n- Node.js 18+ (for running the MCP server)\n\n### Installation\n\n#### 1. Install Unity Package\n\nYou have several options to install the Unity package:\n\n**Option A: Package Manager (Git URL)**\n1. Open the Unity Package Manager (`Window > Package Manager`)\n2. Click the `+` button and select `Add package from git URL...`\n3. Enter the repository URL: `https://github.com/quazaai/UnityMCPIntegration.git`\n4. Click `Add`\n\n**Option B: Import Custom Package**\n1. Clone this repository or [download it as a unityPackage](https://github.com/quazaai/UnityMCPIntegration/releases)\n2. In Unity, go to `Assets > Import Package > Custom Package`\n3. Select the `UnityMCPIntegration.unitypackage` file\n\n\n\n#### 2. Set up the MCP Server\n\nYou have two options to run the MCP server:\n\n**Option A: Run the server directly**\n\n1. Navigate to the `mcpServer (likely <path-to-project>\\Library\\PackageCache\\com.quaza.unitymcp@d2b8f1260bca\\mcpServer\\)` directory\n2. Install dependencies:\n   ```\n   npm install\n   ```\n3. Run the server:\n   ```\n   node build/index.js\n   ```\n\n**Option B: Add to MCP Host configuration**\n\nAdd the server to your MCP Host configuration for Claude Desktop, Custom Implementation etc\n\n```json\n{\n  \"mcpServers\": {\n    \"unity-mcp-server\": {\n      \"command\": \"node\",\n      \"args\": [\n        \"path-to-project>\\\\Library\\\\PackageCache\\\\com.quaza.unitymcp@d2b8f1260bca\\\\mcpServer\\\\mcpServer\\\\build\\\\index.js\"\n      ],\n      \"env\": {\n        \"MCP_WEBSOCKET_PORT\": \"5010\"\n      }\n    }\n  }\n}\n```\n\n### Installing via Smithery\n\nTo install Unity MCP Integration for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@quazaai/unitymcpintegration):\n\n```bash\nnpx -y @smithery/cli install @quazaai/unitymcpintegration --client claude\n```","tools":"## Available Tools\n\n1.  Browse and manipulate project files directly (Allows AI to interact with project files).\n2.  Access real-time information about your Unity project (Provides AI with project details).\n3.  Understand your scene hierarchy and game objects (Enables AI to analyze the scene).\n4.  Execute C# code directly in the Unity Editor (Allows AI to run code within Unity).\n5.  Monitor logs and errors (Provides AI with debugging information).\n6.  Control the Editor's play mode (Allows AI to start and stop the game).\n7.  Wait For Code Execution (Allows AI to synchronize with code execution).\n\n##### Unity Editor Tools\n\n8.  **get_editor_state**: Get comprehensive information about the Unity project and editor state (Provides AI with the editor's state).\n9.  **get_current_scene_info**: Get detailed information about the current scene (Provides AI with scene details).\n10. **get_game_objects_info**: Get information about specific GameObjects in the scene (Provides AI with GameObject details).\n11. **execute_editor_command**: Execute C# code directly in the Unity Editor (Allows AI to execute code).\n12. **get_logs**: Retrieve and filter Unity console logs (Provides AI with logs).\n13. **verify_connection**: Check if there's an active connection to Unity Editor (Allows AI to verify the connection).\n\n##### Filesystem Tools\n\n14. **read_file**: Read contents of a file in your Unity project (Allows AI to read files).\n15. **read_multiple_files**: Read multiple files at once (Allows AI to read multiple files).\n16. **write_file**: Create or overwrite a file with new content (Allows AI to write files).\n17. **edit_file**: Make targeted edits to existing files with diff preview (Allows AI to edit files).\n18. **list_directory**: Get a listing of files and folders in a directory (Allows AI to list directories).\n19. **directory_tree**: Get a hierarchical view of directories and files (Allows AI to view directory trees).\n20. **search_files**: Find files matching a search pattern (Allows AI to search for files).\n21. **get_file_info**: Get metadata about a specific file or directory (Allows AI to get file information).\n22. **find_assets_by_type**: Find all assets of a specific type (e.g. Material, Prefab) (Allows AI to find assets by type).\n23. **list_scripts**: Get a listing of all C# scripts in the project (Allows AI to list scripts).","faq":null,"created_at":"2025-03-17T15:51:49+00:00","updated_at":"2025-03-28T17:58:01+00:00","source_url":"https://model-context-protocol.com/servers/ai-control-unity-mcp-integration","related_articles":[]}