### Install MCP Python SDK Source: https://github.com/appleweed/unrealmcpbridge/blob/master/README.md Install the MCP Python SDK using pip. This is a prerequisite for the bridge client script. ```bash pip install mcp ``` -------------------------------- ### Starting a Session Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Steps to start an MCP bridge session by launching the server from Unreal Engine and then starting Claude Code. ```APIDOC ## Starting a Session 1. Open your Unreal Engine project and click the MCP Bridge toolbar button to start the server. 2. Open a terminal in your project root directory and launch Claude Code: ```bash claude ``` 3. Claude Code will detect the `.mcp.json` and prompt you to approve the MCP server on first use. 4. Once approved, all MCP tools (get_actors, spawn_actor, execute_python, etc.) are available. Claude Code can call them directly during the conversation. ``` -------------------------------- ### Implement MCP Tool Server-Side Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Implement the server-side logic for an MCP tool within Unreal Engine using Python. This example shows how to access Unreal Engine's API to get the project directory and return it as a JSON response. ```python import unreal import json @staticmethod def get_project_dir(): """Get the top level project directory""" try: project_dir = unreal.Paths.project_dir() return json.dumps({ "status": "success", "result" : f"{project_dir}" }) except Exception as e: return json.dumps({ "status": "error", "message": str(e) }) ``` -------------------------------- ### Starting Claude Code Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Launch Claude Code from your project's root directory to initiate the MCP bridge connection. ```bash claude ``` -------------------------------- ### Start CSV Profiler Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Initiates the CSV profiler to capture per-frame statistics. This command should be called before performing actions to be profiled. ```unrealscript start_csv_profile ``` -------------------------------- ### Implement Get Project Directory Server-Side Source: https://github.com/appleweed/unrealmcpbridge/blob/master/README.md Implement the server-side logic for the `get_project_dir` tool using `unreal.Paths.project_dir()`. This ensures the command is correctly handled within Unreal Engine. ```python @staticmethod def get_project_dir(): """Get the top level project directory""" try: project_dir = unreal.Paths.project_dir() return json.dumps({ "status": "success", "result" : f"{project_dir}" }) except Exception as e: return json.dumps({ "status": "error", "message": str(e) }) ``` -------------------------------- ### Get Trace Frame Summary Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Obtain frame time percentiles (p50/p90/p95/p99) and FPS statistics from a trace file. ```python get_trace_frame_summary(path) ``` -------------------------------- ### Script Multiplayer PIE for Network Trace Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Automate the process of starting network traces, launching a multiplayer PIE session, stopping the session, and analyzing the trace results for network performance. ```text Start a trace, launch a 2-client listen-server PIE session for 5 seconds, stop, and analyze the net channel. ``` -------------------------------- ### Define Get Project Directory Tool in Python Source: https://github.com/appleweed/unrealmcpbridge/blob/master/README.md Use the `@mcp.tool()` decorator to define a tool that retrieves the project directory. This function sends a command to Unreal Engine and processes the response. ```python @mcp.tool() def get_project_dir() -> str: """Get the top level project directory""" result = send_command("get_project_dir") if result.get("status") == "success": response = result.get("result") return response else: return json.dumps(result) ``` -------------------------------- ### Get Trace Spikes Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Retrieve information about frames that exceeded budget, with a per-frame breakdown of the contributing hotspots. Requires a valid trace file path. ```python get_trace_spikes(path) ``` -------------------------------- ### Get Trace Network Summary Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Analyze network performance from a multiplayer trace. This includes packet/byte totals, drop rates, and bandwidth usage by replication. Pair with `start_pie` for automated capture. ```python get_trace_net_summary(path) ``` -------------------------------- ### Define MCP Tool in Python Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Use the `@mcp.tool()` decorator to define a Python function that can be called as an MCP tool. This example shows how to send a command to Unreal Engine and process its response. ```python import json @mcp.tool() def get_project_dir() -> str: """Get the top level project directory""" result = send_command("get_project_dir") if result.get("status") == "success": response = result.get("result") return response else: return json.dumps(result) ``` -------------------------------- ### Unreal Insights Deep Dive Workflow Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md When the CSV profiler identifies issues, use Unreal Insights for a detailed function-level analysis. This workflow includes starting the trace, reproducing the problem, stopping the trace, and analyzing the results. ```python start_trace [reproduce the problem] stop_trace analyze_trace(path, 20) get_trace_spikes(path) get_trace_frame_summary(path) ``` -------------------------------- ### Get CSV Profile Summary Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Reads the most recent CSV profile data and returns a parsed JSON summary. This includes timing stats, counters, budget analysis, and trend data. Ensure a delay after stopping the profiler for file finalization. ```unrealscript get_csv_profile ``` -------------------------------- ### Create Blueprint with Variable and Event Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Use this prompt to create a new Blueprint asset, add member variables, and set up basic event logic. No direct Python execution is needed for graph work. ```text Create a Blueprint at /Game/Blueprints/BP_DayNightCycle that has a public float variable called "CycleSpeed" and a DirectionalLight reference variable called "SunLight". On BeginPlay it should print "Day/Night cycle started" to the screen. ``` -------------------------------- ### Manual Configuration Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Instructions for manually configuring the MCP Python Bridge by copying the client script and creating a .mcp.json configuration file. ```APIDOC ## Manual Configuration 1. Copy `unreal_mcp_client.py` from the MCPClient folder to a location of your choice. 2. Create a `.mcp.json` file in your Unreal Engine project root directory (the folder containing your `.uproject` file) with the following contents: **Mac/Linux:** ```json { "mcpServers": { "unreal-bridge": { "command": "python", "args": ["/path/to/unreal_mcp_client.py"], "env": {} } } } ``` **Windows** (use forward slashes or escaped backslashes): ```json { "mcpServers": { "unreal-bridge": { "command": "python", "args": ["C:/path/to/unreal_mcp_client.py"], "env": {} } } } ``` ``` -------------------------------- ### MCP Server Configuration (Mac/Linux) Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Configure the MCP server for Mac or Linux by specifying the Python command and the path to the client script. ```json { "mcpServers": { "unreal-bridge": { "command": "python", "args": ["/path/to/unreal_mcp_client.py"], "env": {} } } } ``` -------------------------------- ### Define Create Castle Prompt in Python Source: https://github.com/appleweed/unrealmcpbridge/blob/master/README.md Define a new prompt using the `@mcp.prompt()` decorator. Ensure the prompt content is enclosed in triple-quotes to maintain its structure. ```python @mcp.prompt() def create_castle() -> str: """Create a castle""" return f""" Please create a castle in the current Unreal Engine project. 0. Refer to the Unreal Engine Python API when creating new python code: https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/?application_version=5.5 1. Clear all the StaticMeshActors in the scene. 2. Get the project directory and the content directory. 3. Find basic shapes to use for building structures. 4. Create a castle using these basic shapes. """ ``` -------------------------------- ### Building Utilities Tools Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Utilities for generating procedural content like grids and towns using specified assets and parameters. ```APIDOC ## Building Utilities | Tool | Parameters | Description | |------|-----------|-------------| | `create_grid` | `asset_path`, `grid_width`, `grid_length` | Creates a grid of tiles using the given asset, automatically spaced based on the asset's bounding box. `grid_width` and `grid_length` are the number of tiles in each dimension. | | `create_town` | `town_center_x/y`, `town_width`, `town_height` | Creates a procedural town layout centered at the given position using available assets. | ``` -------------------------------- ### Project & Asset Discovery Tools Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Tools for discovering project directories, content paths, basic shapes, and assets within the Unreal Engine project and engine. ```APIDOC ## Project & Asset Discovery | Tool | Parameters | Description | |------|-----------|-------------| | `get_project_dir` | — | Returns the top-level project directory path (e.g., `D:/MyProject/`). | | `get_content_dir` | — | Returns the Content directory path (e.g., `D:/MyProject/Content/`). | | `find_basic_shapes` | — | Returns a list of built-in basic shapes (cube, sphere, cylinder, etc.) that can be used for building. | | `find_assets` | `asset_name` | Searches the asset registry for assets matching a name (substring, case-insensitive). Scans both `/Game` (project content) and `/Engine` (engine assets like `BasicShapeMaterial`, `WorldGridMaterial`). | | `get_asset` | `asset_path` | Returns the bounding box dimensions of a static mesh asset. | ``` -------------------------------- ### MCP Server Configuration (Windows) Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Configure the MCP server for Windows, ensuring to use forward slashes or escaped backslashes for the script path. ```json { "mcpServers": { "unreal-bridge": { "command": "python", "args": ["C:/path/to/unreal_mcp_client.py"], "env": {} } } } ``` -------------------------------- ### Configure Claude Desktop MCP Server Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Add the Unreal Engine MCP server configuration to your Claude Desktop settings. Ensure the path to `unreal_mcp_client.py` is correctly formatted for your OS. ```json { "mcpServers": { "unreal-engine": { "command": "python", "args": [ "[mac_or_windows_format_path_to_unreal_mcp_client.py]" ] } } } ``` -------------------------------- ### Configure MCP Server for Unreal Engine Source: https://github.com/appleweed/unrealmcpbridge/blob/master/README.md Add the Unreal Engine MCP server configuration to your AI agent's configuration file. This tells the agent how to launch the bridge. ```json { "mcpServers": { "unreal-engine": { "command": "python", "args": [ "[mac_or_windows_format_path_to_unreal_mcp_client.py]" ] } } } ``` -------------------------------- ### Blueprint Execution Tool Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md A tool to execute functions defined within Unreal Engine Blueprints, allowing for custom logic execution. ```APIDOC ## Blueprint Execution | Tool | Parameters | Description | |------|-----------|-------------| | `run_blueprint_function` | `blueprint_name`, `function_name`, `arguments` | Executes a function defined in a Blueprint. Arguments are passed as a comma-separated string. | ``` -------------------------------- ### Define MCP Prompt in Python Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Use the `@mcp.prompt()` decorator to define a prompt that can be used with AI models. Ensure the prompt is enclosed in triple-quotes to return the entire string. ```python import unreal @mcp.prompt() def create_castle() -> str: """Create a castle""" return f""" Please create a castle in the current Unreal Engine project. 0. Refer to the Unreal Engine Python API when creating new python code: https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/?application_version=5.7 1. Clear all the StaticMeshActors in the scene. 2. Get the project directory and the content directory. 3. Find basic shapes to use for building structures. 4. Create a castle using these basic shapes. """ ``` -------------------------------- ### CSV Profiler Workflow Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Use this sequence of commands for high-level performance triage with the CSV Profiler. Ensure a 2-3 second delay after stopping the profile to allow game thread ticks to flush. ```python start_csv_profile [perform actions] stop_csv_profile [wait 2-3 seconds] get_csv_profile ``` -------------------------------- ### Viewport & Screenshots Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Tools for capturing screenshots and manipulating the editor viewport camera. ```APIDOC ## take_screenshot ### Description Captures the active editor viewport and saves it as a PNG file. ### Method `take_screenshot()` ### Returns (string) - The file path to the saved screenshot. ``` ```APIDOC ## set_viewport_camera ### Description Moves the editor viewport camera to a specified location and rotation. ### Method `set_viewport_camera(location_x, location_y, location_z, rotation_pitch, rotation_yaw, rotation_roll)` ### Parameters - **location_x** (float) - The X coordinate for the camera location. - **location_y** (float) - The Y coordinate for the camera location. - **location_z** (float) - The Z coordinate for the camera location. - **rotation_pitch** (float) - The pitch rotation of the camera. - **rotation_yaw** (float) - The yaw rotation of the camera. - **rotation_roll** (float) - The roll rotation of the camera. ``` ```APIDOC ## focus_viewport_on_actor ### Description Points the editor viewport camera at a specified actor. ### Method `focus_viewport_on_actor(actor_name, distance)` ### Parameters - **actor_name** (string) - The name of the actor to focus on. - **distance** (float, optional) - The distance from the actor to position the camera. If 0, distance is calculated automatically. ``` -------------------------------- ### Blueprint Graph Authoring (Writes) Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Tools for programmatically creating and modifying Blueprint assets without direct Python execution within the graph. ```APIDOC ## create_new_blueprint ### Description Creates a new Blueprint asset. Returns its full asset path. ### Method `create_new_blueprint(path, name, parent_class_path)` ### Parameters - **path** (string) - The path where the new Blueprint will be created. - **name** (string) - The name of the new Blueprint. - **parent_class_path** (string) - The class path of the parent class for the new Blueprint. ### Returns (string) - The full asset path of the newly created Blueprint. ``` ```APIDOC ## add_event_node ### Description Adds an event node to a Blueprint graph. ### Method `add_event_node(blueprint_path, event_name, pos_x, pos_y)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **event_name** (string) - The name of the event to add (e.g., "ReceiveDestroyed"). - **pos_x** (integer) - The X coordinate for the node's position. - **pos_y** (integer) - The Y coordinate for the node's position. ### Returns (string) - The node ID of the newly added event node. ``` ```APIDOC ## add_call_function_node ### Description Adds a function call node to a Blueprint graph. ### Method `add_call_function_node(blueprint_path, target_class_path, function_name, pos_x, pos_y)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **target_class_path** (string) - The class path of the target function (e.g., "/Script/Engine.KismetSystemLibrary"). - **function_name** (string) - The name of the function to call. - **pos_x** (integer) - The X coordinate for the node's position. - **pos_y** (integer) - The Y coordinate for the node's position. ### Returns (string) - The node ID of the newly added function call node. ``` ```APIDOC ## add_spawn_actor_node ### Description Adds a node to spawn an actor from a specified class. ### Method `add_spawn_actor_node(blueprint_path, actor_class_path, pos_x, pos_y)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **actor_class_path** (string) - The class path of the actor to spawn. - **pos_x** (integer) - The X coordinate for the node's position. - **pos_y** (integer) - The Y coordinate for the node's position. ### Returns (string) - The node ID of the newly added spawn actor node. ``` ```APIDOC ## add_variable_get_node ### Description Adds a node to get the value of a Blueprint variable. ### Method `add_variable_get_node(blueprint_path, variable_name, pos_x, pos_y)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **variable_name** (string) - The name of the variable to get. - **pos_x** (integer) - The X coordinate for the node's position. - **pos_y** (integer) - The Y coordinate for the node's position. ### Returns (string) - The node ID of the newly added variable get node. ``` ```APIDOC ## add_variable_set_node ### Description Adds a node to set the value of a Blueprint variable. ### Method `add_variable_set_node(blueprint_path, variable_name, pos_x, pos_y)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **variable_name** (string) - The name of the variable to set. - **pos_x** (integer) - The X coordinate for the node's position. - **pos_y** (integer) - The Y coordinate for the node's position. ### Returns (string) - The node ID of the newly added variable set node. ``` ```APIDOC ## add_branch_node ### Description Adds a Branch (if/else) node to a Blueprint graph. ### Method `add_branch_node(blueprint_path, pos_x, pos_y)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **pos_x** (integer) - The X coordinate for the node's position. - **pos_y** (integer) - The Y coordinate for the node's position. ### Returns (string) - The node ID of the newly added Branch node. ``` ```APIDOC ## add_custom_event_node ### Description Adds a Custom Event node to a Blueprint, which can be called from BP code. ### Method `add_custom_event_node(blueprint_path, event_name, pos_x, pos_y)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **event_name** (string) - The name of the custom event. - **pos_x** (integer) - The X coordinate for the node's position. - **pos_y** (integer) - The Y coordinate for the node's position. ### Returns (string) - The node ID of the newly added custom event node. ``` ```APIDOC ## connect_pins ### Description Wires two pins together in a Blueprint graph. ### Method `connect_pins(blueprint_path, source_node_id, source_pin, target_node_id, target_pin)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **source_node_id** (string) - The ID of the source node. - **source_pin** (string) - The name of the source pin. - **target_node_id** (string) - The ID of the target node. - **target_pin** (string) - The name of the target pin. ``` ```APIDOC ## set_pin_default_value ### Description Sets the default value for an unconnected input pin. ### Method `set_pin_default_value(blueprint_path, node_id, pin_name, value)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **node_id** (string) - The ID of the node containing the pin. - **pin_name** (string) - The name of the pin. - **value** (string) - The default value to set. For object/class pins, use an asset path. ``` ```APIDOC ## add_variable ### Description Adds a member variable to a Blueprint. ### Method `add_variable(blueprint_path, name, type_name, instance_editable)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **name** (string) - The name of the variable. - **type_name** (string) - The type of the variable (e.g., `bool`, `int`, `string`, `Vector`, or a class path). - **instance_editable** (boolean) - Whether the variable should be instance editable. ``` ```APIDOC ## add_function_graph ### Description Creates a new user-defined function graph within a Blueprint. ### Method `add_function_graph(blueprint_path, graph_name)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **graph_name** (string) - The name for the new function graph. ``` ```APIDOC ## add_function_parameter ### Description Adds an input or output parameter to a function graph. ### Method `add_function_parameter(blueprint_path, function_graph_name, param_name, type_name, is_input, default_value)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset. - **function_graph_name** (string) - The name of the function graph. - **param_name** (string) - The name of the parameter. - **type_name** (string) - The type of the parameter. - **is_input** (boolean) - True if it's an input parameter, False otherwise. - **default_value** (string, optional) - The default value for the parameter. ``` ```APIDOC ## compile_and_save_blueprint ### Description Compiles the specified Blueprint asset and saves it to disk. ### Method `compile_and_save_blueprint(blueprint_path)` ### Parameters - **blueprint_path** (string) - The path to the Blueprint asset to compile and save. ### Returns (string) - "True" on successful compilation and save, otherwise indicates errors. ``` -------------------------------- ### Analyze Trace with Top Functions Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Analyze a trace file to identify the top 20 most expensive functions, including their call counts and durations. Requires a valid trace file path. ```python analyze_trace(path, 20) ``` -------------------------------- ### Add Unreal Engine MCP Server via Claude Code CLI (Windows) Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Configure Claude Code to use the Unreal Engine MCP bridge from your project root on Windows. This command automatically creates a `.mcp.json` file. ```bash claude mcp add --transport stdio --scope project unreal-bridge -- python C:\path\to\unreal_mcp_client.py ``` -------------------------------- ### Verifying the Connection Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md How to verify that the MCP bridge connection is active by checking the server status within a Claude Code session. ```APIDOC ## Verifying the Connection Inside a Claude Code session, type `/mcp` to check the status of connected MCP servers. You should see the `unreal-bridge` server listed as connected. ``` -------------------------------- ### Actor Management Tools Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Tools for managing actors in the Unreal Engine level, including listing, detailing, spawning, modifying, and deleting actors. ```APIDOC ## Actor Management | Tool | Parameters | Description | |------|-----------|-------------| | `get_actors` | — | Lists all actors in the current level with their name, class, and location. | | `get_actor_details` | `actor_name` | Returns all properties and details for a specific actor by name. | | `get_selected_actors` | — | Returns the actors currently selected in the editor viewport. Useful for inspecting what the user is looking at. | | `spawn_actor` | `asset_path`, `location_x/y/z`, `rotation_x/y/z`, `scale_x/y/z` | Spawns a static mesh actor at the given location, rotation, and scale. All position/rotation/scale parameters default to 0. | | `modify_actor` | `actor_name`, `property_name`, `property_value` | Modifies a property of an existing actor. Three resolution paths, tried in order: (1) well-known actor setters — `ActorLabel`, `Hidden` / `bHidden`, `Location`, `Rotation`, `Scale` — dispatched via the engine setter API; (2) dotted paths like `RootComponent.RelativeLocation` walked segment-by-segment; (3) direct UProperty fallback. Value is a string; converted to bool / int / float / Vector / Rotator based on the leaf property's existing type. Vector / Rotator accept `X,Y,Z`, `(X=1,Y=2,Z=3)`, or `Pitch=0,Yaw=90,Roll=0` style. | | `set_material` | `actor_name`, `material_path` | Applies a material to a static mesh actor. Use asset paths like `/Game/Materials/M_MyMaterial`. | | `delete_all_static_mesh_actors` | — | Deletes **all** static mesh actors in the scene. Use with caution — this removes everything, not just what was recently placed. | ``` -------------------------------- ### Add Typed Function to Blueprint Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Define a new user function with specified input and output parameters on an existing Blueprint. This operation is handled by dedicated MCP functions, not `execute_python`. ```text On /Game/BP/BP_NPC, add a user function "ComputeDamage" with inputs (BaseDamage: float = 10.0, ArmorClass: int) and output (Result: float). Then compile and save. ``` -------------------------------- ### Add Unreal Engine MCP Server via Claude Code CLI (Mac/Linux) Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Configure Claude Code to use the Unreal Engine MCP bridge from your project root on Mac or Linux. This command automatically creates a `.mcp.json` file. ```bash claude mcp add --transport stdio --scope project unreal-bridge -- python /path/to/unreal_mcp_client.py ``` -------------------------------- ### PIE Control Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Functions to programmatically control Play-In-Editor (PIE) sessions. ```APIDOC ## start_pie ### Description Starts a Play-In-Editor session with specified network mode and client count. ### Method `start_pie(net_mode, num_clients)` ### Parameters - **net_mode** (string) - The network mode for the PIE session. Options: "standalone", "listen_server", "client". - **num_clients** (integer) - The number of clients to launch. Must be 1 or greater. ``` ```APIDOC ## stop_pie ### Description Stops the currently active Play-In-Editor session. ### Method `stop_pie()` ``` ```APIDOC ## is_pie_running ### Description Checks if a Play-In-Editor session is currently active. ### Method `is_pie_running()` ### Returns (string) - "True" if a PIE session is running, otherwise "False". ``` -------------------------------- ### Create Niagara Lightning Effect Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Prompt for creating a Niagara lightning effect with specific visual characteristics, including a beam emitter, jagged shape, and ribbon renderer. This is intended for direct input into a conversational AI. ```text Create a Niagara lightning effect with a beam emitter. It should be a jagged blue-white bolt that fires once from (0, 0, 2000) down to (0, 0, 0). Use a Ribbon renderer with JitterPosition for the jagged shape. ``` -------------------------------- ### Create Niagara Rain Particle Effect Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Defines a Python function using the MCP client to generate a rain particle effect in Niagara. It utilizes `execute_python` to call `NiagaraEditorLibrary` functions for system creation and module configuration. ```python @mcp.prompt() def create_rain() -> str: """Create a rain particle effect""" return f""" Create a rain Niagara particle system using the NiagaraEditorLibrary. Use execute_python with `import unreal` and `unreal.NiagaraEditorLibrary` to: 1. Create a new Niagara system at /Game/VFX/NS_Rain. 2. Add an empty emitter named "RainDrops". 3. Add these modules in order: - SpawnRate (EmitterUpdate) — set to 500 particles/sec. - BoxLocation (ParticleSpawn) — set Box Size to (3000, 3000, 50). - AddVelocity (ParticleSpawn) — set Velocity to (200, 0, -1500) for angled rain. - GravityForce (ParticleUpdate). - SolveForcesAndVelocity (ParticleUpdate). 4. Set Initialize Particle lifetime to 2.0 seconds. 5. Set Initialize Particle sprite size to (1, 15) for thin streaks. 6. Set the sprite renderer to VelocityAligned facing. 7. Compile and save the system. 8. Spawn the system into the level at (0, 0, 1500). """ ``` -------------------------------- ### Stop CSV Profiler Source: https://github.com/appleweed/unrealmcpbridge/blob/master/MCPPythonBridge-GettingStarted.md Stops the CSV profiler. Note that the output CSV file requires a few seconds to finalize after this command is issued. ```unrealscript stop_csv_profile ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.