Skip to content

gamedev-resources/unity-mcp-custom-tools-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

YouTube

How to Create Custom MCP Tools for Unity

How to Create Custom MCP Tools for Unity

Unity's official MCP integration lets AI assistants control the editor, but the built-in tools only cover so much. In this tutorial, you'll learn how to extend Unity's MCP integration with your own custom MCP tools so your AI assistant can do exactly what your project needs.

What's Included

The Assets/Editor/ folder contains the two custom MCP tools built during the video:

File Description
LogToConsoleParams.cs Parameter record for the LogToConsole tool
LogToConsoleTool.cs Logs a message to the Unity Console with a specified log type
SceneNoteParams.cs Parameter record for the SceneNote tool
SceneNoteTool.cs Places a floating text note in the scene at an optional position

How to Use

  1. Copy the files from Assets/Editor/ into your Unity project's Assets/Editor/ folder (create it if it doesn't exist).
  2. Unity will detect the scripts after a domain reload.
  3. Open Project Settings > AI > MCP Tools to verify the tools appear under the "Demo Example" group.
  4. Call the tools from any MCP client connected to your Unity Editor.

Requirements

  • Unity 6+ with the com.unity.ai.assistant package installed

Resources

About

How to extend Unity's official MCP with your own custom MCP tools.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages