MCP Unity

by CoderGamester
Verified

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOGGINGNoEnable logging to terminalfalse
UNITY_PORTNoThe port number for the WebSocket server that connects Unity to the MCP server8080
LOGGING_FILENoEnable logging to log.txt filefalse

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
get_menu_itemsList of available menu items in Unity to execute
get_console_logsRetrieve all logs from the Unity console
get_hierarchyRetrieve all game objects in the Unity loaded scenes with their active state
get_packagesRetrieve all packages from the Unity Package Manager
get_assetsRetrieve assets from the Unity Asset Database
get_tests

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_menu_item

Executes a Unity menu item by path

select_object

Sets the selected object in the Unity editor by path or ID

package_manager

Manages packages in the Unity Package Manager

run_tests

Runs Unity's Test Runner tests

notify_message

Sends a message to the Unity console