default-mcp-tools.md•5.1 kB
# AI Game Developer — *Unity MCP*
[](https://modelcontextprotocol.io/introduction) [](https://hub.docker.com/r/ivanmurzakdev/unity-mcp-server) [](https://unity.com/releases/editor/archive) [](https://unity.com/releases/editor/archive) [](https://openupm.com/packages/com.ivanmurzak.unity.mcp/) [](https://github.com/IvanMurzak/Unity-MCP/actions/workflows/release.yml) [](https://github.com/IvanMurzak/Unity-MCP/blob/main/LICENSE) [](https://stand-with-ukraine.pp.ua)
## AI Tools
Unity-MCP supports a wide range of tools. Each tool is a small connector between LLM and Unity Engine. You may create your own `tools` by using API, take a look at [add custom tool](#add-custom-tool).
## Add custom `tool`
> ⚠️ It only works with MCP client that supports dynamic tool list update.
Unity-MCP is designed to support custom `tool` development by project owner. MCP server takes data from Unity plugin and exposes it to a Client. So anyone in the MCP communication chain would receive the information about a new `tool`. Which LLM may decide to call at some point.
To add a custom `tool` you need:
1. To have a class with attribute `McpPluginToolType`.
2. To have a method in the class with attribute `McpPluginTool`.
3. [optional] Add `Description` attribute to each method argument to let LLM to understand it.
4. [optional] Use `string? optional = null` properties with `?` and default value to mark them as `optional` for LLM.
> Take a look that the line `MainThread.Instance.Run(() =>` it allows to run the code in Main thread which is needed to interact with Unity API. If you don't need it and running the tool in background thread is fine for the tool, don't use Main thread for efficiency purpose.
```csharp
[McpPluginToolType]
public class Tool_GameObject
{
[McpPluginTool
(
"MyCustomTask",
Title = "Create a new GameObject"
)]
[Description("Explain here to LLM what is this, when it should be called.")]
public string CustomTask
(
[Description("Explain to LLM what is this.")]
string inputData
)
{
// do anything in background thread
return MainThread.Instance.Run(() =>
{
// do something in main thread if needed
return $"[Success] Operation completed.";
});
}
}
```
## Default tools
Here is the list of default AI tools. All of them are available after installation Unity-MCP into your project.
> **Legend:**
> ✅ = Implemented & available, 🔲 = Planned / Not yet implemented
<table>
<tr>
<td valign="top">
### GameObject
- ✅ Create
- ✅ Destroy
- ✅ Find
- ✅ Modify (tag, layer, name, static)
- ✅ Set parent
- ✅ Duplicate
##### GameObject.Components
- ✅ Add Component
- ✅ Get Components
- ✅ Modify Component
- - ✅ `Field` set value
- - ✅ `Property` set value
- - ✅ `Reference` link set
- ✅ Destroy Component
- 🔲 Remove missing components
### Editor
- ✅ State (Playmode)
- ✅ Get
- ✅ Set
- ✅ Get Windows
- ✅ Layer
- ✅ Get All
- ✅ Add
- ✅ Remove
- ✅ Tag
- ✅ Get All
- ✅ Add
- ✅ Remove
- ✅ Execute `MenuItem`
- ✅ Run Tests (see note in [running play mode tests](#running-playmode-tests))
#### Editor.Selection
- ✅ Get selection
- ✅ Set selection
### Prefabs
- ✅ Instantiate
- 🔲 Create
- ✅ Open
- ✅ Modify (GameObject.Modify)
- ✅ Save
- ✅ Close
### Package
- 🔲 Get installed
- 🔲 Install
- 🔲 Remove
- 🔲 Update
</td>
<td valign="top">
### Assets
- ✅ Create
- ✅ Find
- ✅ Refresh
- ✅ Read
- ✅ Modify
- ✅ Rename
- ✅ Delete
- ✅ Move
- ✅ Create folder
### Scene
- ✅ Create
- ✅ Save
- ✅ Load
- ✅ Unload
- ✅ Get Loaded
- ✅ Get hierarchy
- 🔲 Search (editor)
- 🔲 Raycast (understand volume)
### Materials
- ✅ Create
- ✅ Modify (Assets.Modify)
- ✅ Read (Assets.Read)
- ✅ Assign to a Component on a GameObject
### Shader
- ✅ List All
### Scripts
- ✅ Read
- ✅ Update or Create
- ✅ Delete
### Scriptable Object
- ✅ Create
- ✅ Read
- ✅ Modify
- ✅ Remove
### Debug
- ✅ Read logs (console)
### Component
- ✅ Get All
</td>
</tr>
</table>