MCP server for Unity game debugging and manipulation via MelonLoader, providing tools for code execution, game state inspection, object manipulation, and knowledge management
MelonMCP defines 13 tools with explicit schemas and descriptions. Naming follows verb_noun convention (find_objects_of_type, set_time_scale, execute_csharp). Descriptions are present and substantive (avg ~150 chars), exceeding the 10-char minimum. However, several critical gaps reduce quality: (1) execute_csharp and set_property accept free-form string inputs without validation constraints, inviting injection attacks; (2) parameter descriptions lack format/range guidance (e.g., 'value' in set_property says 'will be parsed' but doesn't specify supported types); (3) no output schemas documented, tools return JSON but structure is inferred, not declared; (4) error handling is basic (ErrorResult calls) with no recovery guidance; (5) tool annotations (readOnlyHint, destructiveHint) are absent despite clear risk levels (IRREVERSIBLE, WRITE). Schemas are well-formed with types and defaults, but lack constraints (min/max for numeric params, enums where applicable). Composition is sound, tools are single-purpose and chainable (find_objects_of_type returns paths/IDs usable by toggle_behaviour and set_property).
Add a discovery to the game knowledge base. Categories include: 'console_commands', 'static_accessors', 'cheats', 'type_info', 'useful_methods', 'config', 'notes'. This persists knowledge across sessions so the AI remembers what works for each game.
Clear the MelonMCP log buffer. This removes all stored log messages.
Control the mouse cursor visibility and lock state. Useful for freeing the cursor to interact with debug UIs.
Evaluate a simple C# expression and return the result. This is for quick evaluations like property access, method calls, or calculations. Examples: - "UnityEngine.Time.time" - "UnityEngine.Application.productName" - "UnityEngine.QualitySettings.GetQualityLevel()" - "System.DateTime.Now.ToString()"
Execute C# code at runtime in the Unity game context. The code has access to: - All Unity namespaces (UnityEngine, UnityEngine.SceneManagement, etc.) - All game assemblies and types - MelonLoader APIs The code should be a complete method body or expression. For complex operations, wrap in a function. Results are returned as string output. Examples: - Get current scene: return UnityEngine.SceneManagement.SceneManager.GetActiveScene().name; - Find player: var player = UnityEngine.GameObject.Find("Player"); return player != null ? player.transform.position.ToString() : "Not found"; - List all cameras: return string.Join("\n", UnityEngine.Object.FindObjectsOfType<UnityEngine.Camera>().Select(c => c.name));
execute_csharp and evaluate_expression accept arbitrary code strings with no validation, format constraints, or injection guards. Descriptions mention 'complete method body' but do not specify allowed syntax, forbidden patterns, or timeout behavior. LLMs may pass malicious payloads.
Output schemas are not documented. Tools return JSON (e.g., get_game_info, get_time_info) but structure is inferred from code, not declared in tool definitions. LLMs cannot plan downstream calls or extract fields reliably.
set_property parameter 'value' lacks type/format guidance. Description says 'will be parsed based on property type' but does not list supported types (string, int, float, bool, Vector3, Color) or parsing rules. LLMs cannot predict valid inputs.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 53 | 2026-07-28+ | v2 |
Find all Unity objects of a specific type in the scene. Useful for finding all instances of a component type like 'Camera', 'Light', 'AudioSource', etc. Can also find custom game types like 'Enemy', 'PlayerController', etc.
Get information about the running game including: - Game name, developer, version - Unity version - Platform information - MelonLoader version - Current scene information - Screen resolution
Get Unity time information including: - Current time, delta time, fixed delta time - Time scale (for slow-motion or pause detection) - Frame count - Real time since startup
Read recent MelonLoader log messages. Use this to see console output, errors, warnings, and messages from mods.
Set a property or field value on a Unity object (GameObject or Component). Supports basic types (string, int, float, bool) and some Unity types (Vector3, Color).
Set the Unity time scale. 0 = paused, 1 = normal speed, 0.5 = half speed, 2 = double speed. This affects physics and time-based game logic.
Capture a screenshot of the current game view. Returns the image as base64-encoded PNG data.
Enable or disable a MonoBehaviour component. This controls whether the component receives Update, FixedUpdate, and other callbacks.
Tool annotations (readOnlyHint, destructiveHint, idempotentHint) are absent. Tools are marked with Risk levels (READ_ONLY, WRITE, IRREVERSIBLE) in metadata but not exposed in MCP schema. Agents cannot distinguish safe from destructive operations.
Error handling returns generic ErrorResult() calls with no recovery guidance. Example: 'Type not found' does not suggest calling find_objects_of_type or checking type name. Agents cannot self-correct.