Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NUKE_MCP_EXENoPath to the Nuke executable used by the server for headless runs. Defaults to the newest installed Nuke.
NUKE_MCP_HOMENoDirectory used by Nuke and the server for nuke-mcp state such as the shared token.~/.nuke_mcp
NUKE_MCP_HOSTNoHost used by Nuke and the server for the live TCP listener.127.0.0.1
NUKE_MCP_PORTNoPort used by Nuke and the server for the live TCP listener.7393
NUKE_MCP_TOKENNoShared token used by Nuke and the server. Defaults to the contents of ~/.nuke_mcp/token.
NUKE_MCP_DISABLENoSet when launching Nuke to skip starting the live listener for that session.unset
NUKE_MCP_NUKE_VERSIONNoNuke version to use for headless runs, e.g. 17.0. Defaults to the newest installed Nuke.

Instructions

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

Controls Foundry Nuke in two ways, chosen per call with mode:

  • live: the Nuke GUI session you have open (needs the nuke-mcp plugin). You see and edit the same script as the artist. Every change is one undo step (see undo).

  • headless: a fresh nuke -t process on a .nk file (takes one Nuke licence while it runs). Nothing has to be open. Changes are saved back to the file (a .bak copy is kept).

mode="auto" (default) uses the live session when it has the requested script open (or when no script is given), otherwise runs headless. render always runs headless, on a snapshot of the live script when no script is given, so the Nuke interface never freezes. Start with get_app_info to see what is available.

Nodes are addressed by name. Knob values: numbers, strings, booleans, lists for multi-value knobs ([x, y] or [r, g, b, a]); "=expr" or {"expression": "..."} for expressions; {"keyframes": {"1": 0, "24": 1}} for animation; {"script": "..."} for Nuke's own text form. For a Read, file accepts "name.####.exr 1001-1100".

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_app_infoA

Which Nuke backends are available: the live GUI session (version, open script) and the installed executables used for headless runs.

get_script_infoC

Frame range, fps, format, colour management, node counts by class, and the names of Read and Write nodes.

open_scriptA

Open a .nk script in the live Nuke session. Refuses if the open script has unsaved changes unless discard_changes is true.

save_scriptA

Save the live script, or save it to a new .nk path ("save as") when path is given.

undoA

Undo the last action in the live Nuke session.

redoA

Redo the last undone action in the live Nuke session.

execute_pythonA

Run Python in Nuke for anything the other tools do not cover.

`nuke` is pre-imported. Assign to a variable named `result` to return a JSON-serialisable value;
stdout, stderr and any traceback are returned too. Headless runs only keep changes to the script when `save` is true.
list_nodesB

Nodes with class, position, inputs and disabled flag. Filter by class ("Blur"), selection, text in the name, or look inside a Group node by name.

get_nodeC

One node's inputs, dependents and knobs. By default only knobs that differ from their default are listed.

create_nodeA

Create a node (e.g. "Blur", "Grade", "Read", "Write") with optional name, knob values and input node names.

Without `position` the node is placed under its first input. Headless runs save the script afterwards.
set_knobsC

Set one or more knobs on a node. Returns the values they have afterwards.

connect_nodeA

Connect source to input number input of node (0 is the main input). Leave source empty to disconnect.

delete_nodesA

Delete nodes by name. Nothing is deleted if one of the names does not exist.

get_selectionB

Names of the nodes selected in the live Nuke session.

set_selectionA

Select nodes in the live Nuke session (replaces the selection unless add is true).

renderA

Render a Write node and check that the expected frames exist on disk.

Runs headless so the Nuke interface stays usable: with no `script` it renders a snapshot of the live
script (including unsaved changes). With mode="live" it renders inside the open Nuke and blocks its interface.
Frame range defaults to the script's.
preview_frameB

Look at the output of any node: renders one frame to an image and returns it.

Uses a temporary Write node (removed afterwards). `max_size` is the longest-side width in pixels the image is scaled down to.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 17 tools

Disambiguation4/5

Each tool maps to a distinct resource+action: node listing/inspection (list_nodes vs get_node) is differentiated by the knobs/dependents detail, and app vs script info are clearly scoped. The only real overlap is execute_python acting as a superset of every other tool, plus mild adjacency between set_knobs and create_node's knob arguments, but these are conventional escape hatches rather than true ambiguity.

Naming Consistency4/5

The dominant pattern is verb_noun (get_app_info, list_nodes, create_node, set_knobs, delete_nodes, set_selection), applied consistently with correct singular/plural semantics. Deviations are the bare verbs undo/redo and the noun-ish render/preview_frame, which are idiomatic for a DCC app and remain readable.

Tool Count4/5

17 tools is slightly above the comfortable band but each earns its place across session control, node graph editing, selection, and rendering. Nothing looks like a redundant wrapper, though consolidation (e.g. selection get/set) could trim it a little.

Completeness4/5

Coverage is strong: script lifecycle (open/save), undo/redo, node CRUD, knob edits, graph wiring, selection, render verification, and a Python escape hatch for anything missing. Minor gaps remain around creating a new script from scratch, cloning/grouping nodes, and closing/reverting the session, all of which execute_python can work around.