Unreal Engine 5.8's built-in MCP server: setup, what it can do, and its limits
Unreal Engine 5.8 can act as an MCP server, so an AI assistant can work inside your open project. This guide shows how to turn it on, how to connect the common clients, what it can do, what it cannot, and how to add your own tools.
What the built-in MCP server is
Unreal Engine 5.8 ships a plugin called Model Context Protocol (MCP), made by Epic. When it runs, the editor serves an HTTP MCP endpoint at http://localhost:8000/mcp. Any AI client that speaks MCP over HTTP can connect to it and call tools that act on your open project.
The server does not hard-code its tools. It is built on a Toolset Registry. A toolset is a group of functions the registry exposes to MCP clients. Epic registers its own toolsets, and you can register yours, either from C++ or from Python.
The server is not started automatically by default. You turn it on in the project settings.
Enable and start the server
- Open Edit > Plugins and make sure Model Context Protocol and Toolset Registry are enabled. Restart the editor if it asks.
- Open Project Settings and search for "MCP". In the Model Context Protocol section, start the server.
- To start it every time the project opens, tick
bAutoStartServerin the same section and restart the editor.
The server only exists while the editor is running. If a client reports "connection refused", check that the editor is open, that the server is started, and that you are using the right port.
The server exposes your project to whatever connects to it. It listens on localhost, but any tool you let the assistant call can edit assets, so work in a project under version control.
Connect an AI client
The URL is the same for every client: http://localhost:8000/mcp, with HTTP transport. Only the config format differs.
| Client | Where to configure it |
|---|---|
| Claude Code | One command in a terminal |
| Claude Desktop | claude_desktop_config.json, through the mcp-remote bridge |
| Cursor | .cursor/mcp.json |
| VS Code | .vscode/mcp.json |
Claude Code
claude mcp add --transport http unreal http://localhost:8000/mcp
Claude Desktop
Claude Desktop reaches the server through the mcp-remote bridge, which needs Node.js for npx.
{ "mcpServers": { "unreal": { "command": "npx", "args": ["-y", "mcp-remote", "http://localhost:8000/mcp"] } } }
Cursor
{ "mcpServers": { "unreal": { "url": "http://localhost:8000/mcp" } } }
VS Code
{ "servers": { "unreal": { "type": "http", "url": "http://localhost:8000/mcp" } } }
Client config formats change from time to time. If a snippet is rejected, check your client's MCP documentation. The parts that stay fixed are the URL and the HTTP transport.
To confirm the connection, start with a harmless prompt such as "List the toolsets you can see." The reply should show Epic's toolsets, plus any you have added.
What Epic's toolsets cover
Epic's toolsets cover the core of day-to-day editor work. In 5.8 they include:
| Area | What an assistant can do |
|---|---|
| Blueprints | Edit Blueprint graphs |
| Actors and assets | Find, create and change actors and assets |
| Materials | Work with material graphs |
| Data tables | Read and edit data tables |
| UMG | Build and change widget layouts |
| PCG | Work with Procedural Content Generation graphs |
| Play-In-Editor | Start and stop PIE |
| Viewport | Capture the viewport |
| Logs | Read the editor logs |
| Sequencer | Work with sequences |
Ask the assistant to list the toolsets it sees to get the exact tool names and parameters in your engine build. They can change while the plugin is young.
Where the built-in server stops
The built-in set is a foundation, so some jobs fall outside it. These are the gaps we ran into when reading the 5.8 plugin source:
- No injected player input during PIE. An assistant can start and stop Play-In-Editor but cannot press keys or move a gamepad stick inside it.
- No automated playtest reports. Nothing turns a play session into a pass or fail result with evidence.
- No Blueprint style linting. The assistant can edit a graph, but it has no rule set to judge whether the graph is any good.
- No level or flow checks. Nothing checks scale, gaps, dead ends or unreachable states.
- Limited Behavior Tree, StateTree and Niagara authoring. Reading and validation are there, creation is thin.
- No cross-session analytics. There is no record of what tools were called, how often they failed or how long they took.
None of this is a criticism. A general server should stay general, and the registry exists so the rest can be added as separate toolsets.
Write your own toolset in Python
A Python toolset is a class derived from unreal.ToolsetDefinition. Each tool is a static method marked with the registry's tool_call decorator. The docstring matters: it is what the assistant reads to decide when and how to use the tool, so describe the arguments and the return value.
This sketch follows the same structure our own packs use. Treat it as a starting point and check it against the toolset documentation that ships with your engine version.
# Content/Python/init_unreal.py (in a project or plugin)
import json
import unreal
import toolset_registry
from toolset_registry.registration import Registration
@unreal.uclass()
class ProjectInfoTools(unreal.ToolsetDefinition):
"""Small read-only helpers about the open level."""
@toolset_registry.tool_call
@staticmethod
def count_actors_by_class(class_name_contains: str = "") -> str:
"""Counts actors in the open level, grouped by class name.
Args:
class_name_contains: Optional text the class name must contain.
Returns:
JSON string: an object that maps class name to actor count.
"""
subsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
counts = {}
for actor in subsystem.get_all_level_actors():
name = actor.get_class().get_name()
if class_name_contains in name:
counts[name] = counts.get(name, 0) + 1
return json.dumps(counts)
Registration([ProjectInfoTools]).register()
Restart the editor, then ask the assistant to list the toolsets. Your new tool should appear next to Epic's.
A few habits help:
- Return JSON strings with stable keys, so the assistant and your own scripts can both read them.
- Keep tools small and single-purpose. Several short tools are easier for an assistant to chain than one with twenty parameters.
- Wrap editing tools in an undo transaction and tell the assistant in the docstring that they change the project.
- Register each group in its own try block, so one broken toolset does not stop the rest from loading.
For C++, the registry accepts static functions marked UFUNCTION(meta=(AICallable)) in a UToolsetDefinition subclass. Choose C++ when Python cannot reach the API you need, such as injecting input into a running game.
Where MaxHP AI fits
MaxHP AI is an Unreal Engine 5.8 plugin we are building that registers more toolsets in the same registry, so it shows up next to Epic's in your client. It covers playtesting, Blueprint linting with 21 rules, level checks, game flow, cinematics and a few gap-filling tools, and it adds a dashboard inside the editor for reports and tool usage. It is coming soon on Fab and has not been released.
If you only want one or two of those capabilities, the Python example above is a reasonable way to build them yourself.
For a worked example of one gap, read our guide to automated playtesting in Unreal Engine with an AI assistant.
Frequently asked questions
Is the Unreal Engine 5.8 MCP server on by default?
No. The Model Context Protocol plugin ships with 5.8, but the server is not started automatically. Start it in Project Settings, or tick bAutoStartServer to start it each time the editor opens.
What is the MCP server URL and port?
The default endpoint is http://localhost:8000/mcp over HTTP. The server runs only while the Unreal Editor is open.
Which AI clients can connect to it?
Any client that supports MCP over HTTP, for example Claude Code, Claude Desktop through the mcp-remote bridge, Cursor and VS Code. The URL is the same for all of them and only the config file differs.
Can I add my own tools to the server?
Yes. Register a toolset with the Toolset Registry, either in Python with a class derived from unreal.ToolsetDefinition or in C++ with static functions marked AICallable.
Can the built-in server play my game and report bugs?
It can start and stop Play-In-Editor, capture the viewport and read logs, but it cannot inject player input or produce a playtest report. Those need extra toolsets.