Configuration
MifBridge is configured with environment variables. Each is read by the process that owns that piece: the Unreal editor, Blender, or the MCP server. The editor also has a few console variables. On purpose, there is no endpoint that changes configuration.
The Unreal editor
| Variable | Default | What it does |
|---|---|---|
MIF_BRIDGE_TOKEN |
dev |
Shared secret. Every request must send it in the X-Mif-Token header. Change it before real use, on both the editor and the MCP server. |
MIF_BRIDGE_PORT |
8791 |
The port the bridge listens on. It always binds loopback only. |
MIF_BRIDGE_WRITE_MODE |
scratch |
The starting write mode: read, scratch or full. See Safety and Write Modes. |
MIF_CHANGE_CAP |
25 |
From 1.2: how many things one call may change before it answers a list to commit instead. 0 turns the cap off. A project's own setting wins. See the change cap. |
MIF_BRIDGE_NO_UPDATE_CHECK |
unset | 1 turns off the daily update check for every project. Editor Preferences ▸ Plugins ▸ Mif Bridge ▸ Check for Updates does the same per engine version. |
MIF_BRIDGE_AUTO_DECLINE_RECOVERY |
off | 1 declines the editor's crash-recovery prompt at startup. This discards unsaved recovery data, so use it only on disposable automation projects. |
The editor reads these from its own process environment when it starts, so a change takes effect at the next launch. To make one stick on Windows:
setx MIF_BRIDGE_TOKEN "your-secret-here"
Then restart the editor, and the MCP client, so each picks up the new value.
Console variables
| Variable | Default | What it does |
|---|---|---|
mif.BridgeAutoOpen |
1 |
Opens the MifBridge panel a moment after the editor starts. 0 turns it off; the panel stays available under Window. |
mif.ModalGuardServe |
1 |
From 1.2: keeps the bridge answering while a modal dialog is open, refusing every call except the dialog's own. 0 only records the dialog. See MifBridge. |
mif.SourceControl.SessionChangelist |
0 |
With a revision control provider connected, 1 puts the files the bridge checks out into a changelist of their own for the session, instead of the default one. |
mif.BridgeJournal |
1 |
The crash journal: one record per call, flushed to disk before the call runs. Leave it on. A crash journal you have to enable before the crash is off when you need it. |
The MCP server
| Variable | Default | What it does |
|---|---|---|
MIF_BRIDGE_URL |
http://127.0.0.1:8791/api |
Where the editor's API is. Point it at another port for a second editor. Unset, it follows MIF_BRIDGE_PORT when that is set. |
MIF_BRIDGE_TOKEN |
dev |
Must match the editor's. |
MIF_BRIDGE_TIMEOUT |
30 |
Per-request timeout in seconds. Raise it if compiles are slow. |
MIF_BRIDGE_DEBUG |
unset | 1 logs requests and responses to stderr. |
MIF_AGENT |
the client's own name | A name for the caller, sent as the X-Mif-Agent header and shown after each call's endpoint in the panel's Activity tab. Unset, the name the MCP client gives for itself is used. Self-reported, and not checked. |
MIF_TOOL_PACKS |
lean |
Which tool packs to load. Unset (or lean), only find_tools, mif_call and run_python are registered, and mif_call reaches every other tool. Name packs, for example core,world, to load their tools directly (core comes with any named pack), or all for every tool. See MCP Server. |
MIF_GENERATIVE |
unset | off switches the generative bl_gen_* tools off for every project the server touches, whatever a project's own mode says. See Using MifBridge Without Generative AI. |
MIF_EDITOR_EXE |
unset | The editor binary mif_editor starts when a call names no engine. Unset, it is found from the project's engine association. |
MIF_BLENDER_HOST |
127.0.0.1 |
The Blender add-on's address. |
MIF_BLENDER_PORT |
8792 |
The port a session starts on. From 1.2, a MifBlender on another port is found anyway, and bl_status switches to it. |
MIF_BLENDER_TOKEN |
falls back to MIF_BRIDGE_TOKEN |
One secret for both backends, unless you want two. |
MIF_BLENDER_CONNECT_TIMEOUT |
3 |
How long to wait to reach Blender at all, so a closed Blender reports "refused" quickly instead of hanging. |
MIF_BLENDER_PROBE_TIMEOUT |
5 |
bl_status only: the cheap "is it alive" call. |
MIF_BLENDER_TIMEOUT |
180 |
Per Blender operation. Geometry work can take a while. |
The timeout ladder
The Blender add-on abandons a job after 150 seconds, and that has to stay below MIF_BLENDER_TIMEOUT. Then Blender gives up first and the socket carries a real error.
The other way round, the server drops the connection while Blender goes on changing the scene, on behalf of a caller that has already been told the operation failed. If you raise one timeout, raise the other and keep the add-on's lower.
The Blender add-on
The add-on's Token and Port are preferences in Edit ▸ Preferences ▸ Add-ons ▸ MifBlender. They must agree with MIF_BLENDER_TOKEN and MIF_BLENDER_PORT on the MCP server. It binds 127.0.0.1 only, and there is deliberately no setting to bind anything wider.
Its other preferences are Main-thread job timeout (150 seconds; see the timeout ladder above), Allow run_python (on by default; see MifBlender), Allow generative tools (ComfyUI) (on by default; off refuses every generation operation in that Blender), Start server automatically, Log to console, Write the call journal to disk, and the Viewport HUD (off by default).
The add-on also reads two variables from Blender's own environment:
| Variable | Default | What it does |
|---|---|---|
MIF_BLENDER_UNDO |
on | 0 stops the add-on recording undo steps. See MifBlender. |
MIF_CHANGE_CAP |
25 |
The change cap for a .blend that has none of its own, as on the Unreal side. |
MIF_COMFY_HOST |
127.0.0.1:8188 |
Where the generation operations (gen_image, gen_texture, gen_mesh, gen_asset) find the local ComfyUI server they drive. |
Ports
| Port | Owner | Notes |
|---|---|---|
8791 |
MifBridge, your first Unreal editor | The default. |
8792 |
MifBlender, the Blender add-on | Reserved. Do not point an editor here. |
8793–8799 |
leave clear | Headroom for the two above. |
8801 and up |
additional Unreal editors | For a second project's editor, set MIF_BRIDGE_PORT=8801, and point that MCP server's MIF_BRIDGE_URL at it. |
9876 |
the third-party blender-mcp add-on |
Not ours. Avoided so both can be installed side by side. |
Why this matters more than it looks. A port collision does not look like a collision. Put a second Unreal editor on 8792 and the Blender tools connect, something answers, and every check anyone would run passes. But they are now speaking Blender's socket protocol to an HTTP server, and nothing works. Move the editor, not the add-on: the editor's port is one variable, while the add-on's lives in two places that must agree. MifBridge logs a warning at startup if it is configured for 8792 or 9876.