Skip to main content
Glama
alexneargarder

unity-inspector-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
pingB

Test connection to Unity Inspector

list_gameobjectsC

List all GameObjects in the scene

inspect_gameobjectA

Inspect a specific GameObject by path

inspect_componentB

Inspect a specific component on a GameObject

query_gameobjectsB

Search for GameObjects by name or component

inspect_playerB

Get detailed information about the player(s)

list_enemiesA

List all enemies in the scene

take_screenshotA

Take a screenshot of the game. Returns the path to the saved screenshot.

execute_codeB

Execute C# expressions in the Unity context. Uses Mono.CSharp.Evaluator - expects expressions, not statements

modify_componentB

Modify properties of a component on a GameObject

teleport_playerB

Teleport a player to a specific position

set_player_healthC

Set a player's health

spawn_entityC

Spawn an entity at a specific position (limited implementation)

set_game_speedA

Set the game speed (time scale)

list_campaignsA

List all available campaigns with their indices

go_to_levelB

Go directly to a specific campaign level

swap_broA

Swap the current player's bro mid-level. Kills the current bro and spawns the new one at the same position. Integrates with Swap Bros Mod when available, falls back to direct game manipulation.

set_broA

Set which bro the player will spawn as next (on death/respawn/next level). Does NOT change the current bro mid-level.

list_brosA

List all available bros that can be used with swap_bro and set_bro. Reports the selected bro for the given player (currentBro) and for all active players (currentBros array).

restart_levelA

Restart the current level from the beginning. Clears checkpoints and trigger state for a full reset.

simulate_inputC

Simulate keyboard/controller input

list_test_scriptsA

List all available test scripts in scripts/ and scripts/examples/

wait_for_gameA

Wait for the game to start up and the Unity Inspector TCP server to become responsive. Polls the connection until a ping succeeds or timeout is reached.

game_stateA

Get a high-level summary of the current game state: scene, game mode, level info, player status, and bro type. Single call to orient yourself.

read_logB

Read the UMM mod manager log file. Returns the last N lines by default, or filter by pattern.

watch_logA

Return log entries that appeared since the last call to watch_log. First call returns the last 20 lines as a baseline. Use this for iterative debug loops.

run_test_scriptA

Execute a test script containing a sequence of commands. Scripts are JSON files with command sequences that can include wait delays. Steps run directly against the game, so only game-side commands work — server-side tools (read_log, watch_log, list_scripts, launch_game, stop_game, wait_for_game, ...) cannot be used as steps.

execute_scriptA

Compile and run a C# script file in the Unity runtime. Supports full class definitions, MonoBehaviours, Harmony patches, and private member access. Scripts can define Main() for execution and Unload() for cleanup. Use ScriptContext for Harmony instances, logging, and arguments.

Available library scripts:

  • Dump Harmony Patches: List all Harmony patches on a specified method, showing patch owner, type, and priority [args: typeName, methodName]

  • Find Objects By Type: Find all active instances of a type in the scene with key state info [args: typeName, maxResults]

  • Inspect Private Fields: Dump all field values (including private) of a component on a named GameObject [args: gameObjectName, componentType]

  • Menu Tweaker: Live-edit FlexMenu element properties without rebuilding. Target by name, type, or wildcard pattern. [args: elementName]

  • Rogueforce Runner: Test harness for the Rogueforce mod. Start a run, skip levels, log state, auto-run a full campaign, or trigger game over. [args: action]

  • Trace Method Calls: Harmony-patch a method to log every call with arguments for a specified number of frames [args: typeName, methodName, maxCalls]

  • Watch Field: Monitor a field on a component and log whenever its value changes. Runs until unloaded. [args: gameObjectName, componentType, fieldName]

compile_scriptA

Compile a C# script without running it. Returns compilation success/failure and any compiler errors. Useful for validating scripts before execution.

list_scriptsA

List available C# scripts in the script library with their metadata (name, description, tags, arguments).

unload_scriptA

Unload an active C# script, cleaning up its Harmony patches, GameObjects, and calling its Unload() method if defined.

launch_gameA

Launch Broforce and wait for it to become responsive. Uses the BROFORCE_LAUNCH_CMD environment variable when set, otherwise launches Steam app 274190. Returns a warning if the game is already running unless restart is true.

stop_gameA

Stop the running Broforce process.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
C# Script LibraryAvailable C# scripts for Unity runtime execution

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alexneargarder/unity-inspector-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server