UnityMCPIntegration MCP Server

Integration between Model Context Protocol (MCP) and Unity, allowing AI assistants to understand and interact with Unity projects in real-time.

Local serverstdioTypeScript

What is the UnityMCPIntegration MCP server?

UnityMCPIntegration MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Integration between Model Context Protocol (MCP) and Unity, allowing AI assistants to understand and interact with Unity projects in real-time. Provides access to scene hierarchy, project settings, and code execution in the Unity Editor.

What the assistant can call

Once UnityMCPIntegration is connected, these are the calls the assistant has available:

  • get_editor_state — Get comprehensive information about the Unity project and editor state
  • get_current_scene_info — Get detailed information about the current scene
  • get_game_objects_info — Get information about specific GameObjects in the scene
  • execute_editor_command — Execute C# code directly in the Unity Editor
  • get_logs — Retrieve and filter Unity console logs
  • verify_connection — Check if there's an active connection to Unity Editor
  • read_file — Read contents of a file in your Unity project
  • read_multiple_files — Read multiple files at once
  • write_file — Create or overwrite a file with new content
  • edit_file — Make targeted edits to existing files with diff preview
  • list_directory — Get a listing of files and folders in a directory
  • directory_tree — Get a hierarchical view of directories and files

Configuration and credentials

You will need one environment variable: MCP_WEBSOCKET_PORT. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Unity 2021.3 or later - Node.js 18+ (for running the MCP server)

Setting it up

@smithery/cli on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Choosing this one

Among the file and storage access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. UnityMCPIntegration's toolset — get_editor_state, get_current_scene_info, get_game_objects_info and 11 more — is a fair guide to whether it matches your workflow. It is maintained by quazaai; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch UnityMCPIntegration.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the unitymcpintegration mcp server does with a few real requests.

Available tools

ToolWhat it does
get_editor_stateGet comprehensive information about the Unity project and editor state
get_current_scene_infoGet detailed information about the current scene
get_game_objects_infoGet information about specific GameObjects in the scene
execute_editor_commandExecute C# code directly in the Unity Editor
get_logsRetrieve and filter Unity console logs
verify_connectionCheck if there's an active connection to Unity Editor
read_fileRead contents of a file in your Unity project
read_multiple_filesRead multiple files at once
write_fileCreate or overwrite a file with new content
edit_fileMake targeted edits to existing files with diff preview
list_directoryGet a listing of files and folders in a directory
directory_treeGet a hierarchical view of directories and files
search_filesFind files matching a search pattern
get_file_infoGet metadata about a specific file or directory

How to install the UnityMCPIntegration MCP server

{
  "mcpServers": {
    "unitymcpintegration": {
      "command": "npx",
      "args": ["-y", "@smithery/cli"],
      "env": {
        "MCP_WEBSOCKET_PORT": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Unity 2021.3 or later - Node.js 18+ (for running the MCP server)
VariableDescriptionRequired
MCP_WEBSOCKET_PORTConfiguration value read at startup.Optional

Example prompts to try

  • Use UnityMCPIntegration to get editor state.
  • Use UnityMCPIntegration to get current scene info.
  • Use UnityMCPIntegration to get game objects info.

Frequently asked questions

It connects UnityMCPIntegration to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (get_editor_state, get_current_scene_info, get_game_objects_info, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with UnityMCPIntegration directly.