# unity MCP server

> Connects AI assistants to the Unity Editor to manipulate scenes, manage GameObjects, install packages, and run tests.

- Repository: https://github.com/CoderGamester/mcp-unity
- Page: https://hostedmcp.org/servers/codergamester/mcp-unity
- Transport: —
- Stars: 2017
- License: MIT

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MCP_UNITY_ALLOW_BATCH_MODE` | no | no |  |
| `UNITY_HOST` | no | no |  |

## Tools (33)

- `execute_menu_item`
- `select_gameobject`
- `update_gameobject`
- `update_component`
- `add_package`
- `run_tests`
- `send_console_log`
- `add_asset_to_scene`
- `create_prefab`
- `create_scene`
- `load_scene`
- `delete_scene`
- `get_gameobject`
- `get_console_logs`
- `recompile_scripts`
- `save_scene`
- `get_scene_info`
- `unload_scene`
- `duplicate_gameobject`
- `delete_gameobject`
- `reparent_gameobject`
- `move_gameobject`
- `rotate_gameobject`
- `scale_gameobject`
- `set_transform`
- `create_material`
- `assign_material`
- `modify_material`
- `get_material_info`
- `batch_execute`
- `show_unity_dashboard`
- `get_play_mode_status`
- `set_play_mode_status`

## FAQ

### What can the AI do within the Unity Editor?

The AI can execute menu items, select and update GameObjects, add components, install packages, run tests, and manage scenes.

### How does this improve code intelligence in IDEs?

It automatically adds the Unity Library/PackedCache folder to your workspace, which improves autocompletion and type information for Unity packages.
