nuke-mcp
Drives a live Foundry Nuke session, exposing tools to inspect and edit the node graph, set knobs, create and delete nodes, manage inputs and selection, run Python, save scripts, set frames, render, sample pixels, and convert colors, with edits applied immediately and grouped as undoable steps.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nuke-mcp Create a Merge node, connect Read1 and Read2, and set operation to over."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nuke-mcp
Drive a live Foundry Nuke session from Claude Code (or any MCP client). Edits appear immediately in the open Nuke and each edit is one Ctrl+Z step.
Tested with Nuke 17.0 (Python 3.11) on Linux and the mcp Python SDK 2.3. The Nuke
side is standard-library Python only, so other recent Nuke versions and OSes should
work, but are untested.
Requirements: Nuke (GUI, or a licence for nuke -t), Python 3.10+ for the MCP
server, uv (or pip).
Claude Code ──stdio/MCP──▶ nuke_mcp (src/, venv Python 3.12)
│ newline-delimited JSON, 127.0.0.1:49512
▼
nuke_mcp_bridge (nuke_side/, runs inside Nuke)
│ executeInMainThreadWithResult / undo groups
▼
nuke APILayout
Path | What |
| GUI startup hook: "MCP" menu (Start/Stop/Status/Reload Commands), autostarts the bridge |
|
|
| socket server, main-thread dispatch, undo wrapping |
|
|
| knob values / nodes to JSON |
| built-in commands (core, graph, script, image) |
| MCP server; auto-loads every |
| socket client (reconnects once, long timeout) |
| typed MCP tools, thin wrappers over bridge commands |
| end-to-end test against a headless Nuke |
Related MCP server: Unity MCP
Install
Nuke side: one line in
~/.nuke/init.py:if os.path.isdir('/path/to/nuke-mcp/nuke_side'): nuke.pluginAddPath('/path/to/nuke-mcp/nuke_side')Nuke then runs
nuke_side/menu.pyat GUI startup. To load it into an already-open Nuke without restarting, paste this into the Script Editor:import sys; sys.path.insert(0, '/path/to/nuke-mcp/nuke_side') exec(open('/path/to/nuke-mcp/nuke_side/menu.py').read())MCP side:
uv venv --python 3.12 .venv && uv pip install --python .venv/bin/python -e . claude mcp add --scope user nuke -- /path/to/nuke-mcp/.venv/bin/nuke-mcp
Env vars: NUKE_MCP_PORT (default 49512, set it the same on both sides),
NUKE_MCP_AUTOSTART=0 (don't start with the GUI), NUKE_MCP_TIMEOUT (client, s,
default 600), NUKE_MCP_COMMAND_PATHS (extra command dirs).
Extending
Add a Nuke-side command (no restarts): drop a file in ~/.nuke/nuke_mcp_commands/
(or a dir in NUKE_MCP_COMMAND_PATHS), then run the reload_commands tool or
MCP > Reload Commands. It's immediately callable through the generic call tool.
# ~/.nuke/nuke_mcp_commands/shots.py
import nuke
from nuke_mcp_bridge import command
from nuke_mcp_bridge.commands.graph import resolve_node, set_knob # reusable helpers
@command(undo="MCP: set shot colour") # undo label => one Ctrl+Z step,
def set_constant_rgb(nodes, rgb): # rolled back if it raises
"""Set the RGB (keeping alpha) of several Constants."""
return {n: set_knob(resolve_node(n), "color", rgb) for n in nodes}Rules: parameters arrive as JSON keyword args; return JSON-able data (nodes and knobs
are converted automatically); set undo= on anything that changes the script;
commands run on Nuke's main thread unless main_thread=False.
Built-in commands go in nuke_side/nuke_mcp_bridge/commands/ instead.
Promote it to a typed MCP tool (optional, nicer schema for the model): add a
function to a src/nuke_mcp/tools/*.py module (or a new module with
register(mcp, nuke)) that calls nuke.call("set_constant_rgb", ...). Needs the
MCP server restarted (restart Claude Code / /mcp reconnect).
Tools (v0.1)
core: ping, list_commands, call, reload_commands, exec_python, batch ·
graph: list_nodes, get_node, knob_info, set_knobs, create_node,
delete_nodes, set_inputs, rename_node, select_nodes ·
script: script_info, save_script, set_frame, view_node, render,
sample_pixel, convert_color
set_knobs value forms: scalar · list per channel (shorter list = leading channels,
so [r,g,b] keeps alpha) · {"expression": ..., "channel": i} · {"script": ...} ·
{"keys": {frame: value}}.
convert_color runs Nuke's own OCIO nodes on temporary nodes (no undo entries), so
convert_color("#ff2400") gives the working-space value that displays as #ff2400
through the Viewer's view transform. source= any colourspace name for other cases.
Protocol (v1)
One JSON object per line each way.
Request {"id", "cmd", "params": {}} → {"id", "ok": true, "result"} or
{"id", "ok": false, "error", "traceback"}. Any language can talk to it:
echo '{"id":1,"cmd":"ping"}' | nc -q1 127.0.0.1 49512.
Notes / gotchas
Only listens on 127.0.0.1, but any local process can run Python in Nuke through it.
Only the first Nuke opened gets the port; others log it and stay idle.
renderblocks the GUI; long renders should be headlessNuke -x.nuke -tstarts with undo disabled;serve_foreverenables it so rollback works.Nuke 17
nuke.sample()has no frame arg; usenode.sample(c, x, y, dx, dy, frame).mcp SDK v2 renamed FastMCP to
MCPServerand splits list results into one content block per item, so the MCP layer always returns one object ({"result": ...}for non-dicts).
Test
NUKE_BIN=/path/to/Nuke17.0 .venv/bin/python tests/smoke_test.py [script.nk]Starts a headless Nuke on port 49599 (uses a Nuke licence while it runs, ~30 s),
builds its own test nodes and drives every core tool through the MCP layer. Pass a
script to run the same checks on a copy of it (it is never saved). If NUKE_BIN
is unset the test looks for a Nuke* executable on PATH.
License
MIT
Available Tools
22 toolsbatchA
Run several bridge commands in one go as ONE undo step, e.g. [{"cmd": "create_node", "params": {...}}, {"cmd": "set_inputs", "params": {...}}]. If one fails (stop_on_error) the whole batch is rolled back.
Inputs: calls (required), stop_on_error.
callA
Run any bridge command by name with keyword params. Use for commands that have no dedicated tool (see list_commands).
Inputs: command (required), params.
convert_colorB
Convert an RGB colour with the script's own OCIO config, computed by Nuke. color: "#rrggbb" or [r, g, b]. source "display" (default) means "as it looks on screen through the Viewer's view transform" so the result, put in a Constant, displays as that hex. Otherwise give an OCIO colourspace/role (e.g. "sRGB - Texture" for a plain sRGB-encoded value). target defaults to the working space ("scene_linear").
Inputs: color (required), view, source, target, +1 more.
create_nodeB
Create a node (one undo step) without disturbing the selection. inputs = source node names by input index (null = unconnected); knobs use the same value forms as set_knobs; position = [x, y], else placed automatically.
Inputs: node_class (required), name, group, knobs, +2 more.
delete_nodesB
Delete nodes (one undo step).
Inputs: names (required).
exec_pythonA
Run Python inside the live Nuke session as ONE undo step. nuke and
nukescripts are imported; the namespace persists between calls. The
value of a trailing expression (or a result variable) is returned,
along with captured stdout/stderr. Prefer the dedicated tools when one fits.
Inputs: code (required), reset_namespace.
get_nodeA
Inspect one node: class, inputs, dependents, and knob values ("non_default" knobs by default, "all", "none", or a list of knob names).
Inputs: name (required), knobs.
knob_infoB
Details for one knob: class, value, label, tooltip, script form and, for dropdowns, the allowed values.
Inputs: knob (required), name (required).
list_commandsA
List every command the Nuke-side bridge offers (incl. user extension
commands from ~/.nuke/nuke_mcp_commands/), with signatures and docs.
Any of them can be run with call.
Inputs: no named parameters.
list_nodesA
List nodes with class, inputs, position and label. Filter by exact
class (e.g. "Constant", "Read", "Write"), name substring or selection;
recursive descends into Groups.
Inputs: group, recursive, node_class, name_contains, +1 more.
pingA
Check Nuke is reachable: version, GUI/headless, open script, modified flag.
Inputs: no named parameters.
reload_commandsA
Re-import the Nuke-side command modules after editing/adding them (no Nuke restart). Returns the count and any load errors.
Inputs: no named parameters.
rename_nodeB
Rename a node; returns the name it actually got (Nuke de-duplicates).
Inputs: name (required), new_name (required).
renderA
Render a Write node in the open Nuke. Freezes the GUI until done:
for long renders run Nuke -x headless instead.
Inputs: write (required), last, step, first.
sample_pixelB
Read pixel values (working space) from a node's output; default centre pixel, current frame, rgba.
Inputs: name (required), x, y, frame, +1 more.
save_scriptA
Save the script (or Save As to path). Only when the user asks.
Inputs: path.
script_infoA
Open script: path, modified, fps, format, frame range, current frame, colour management (OCIO config, working space, viewer process), node counts.
Inputs: no named parameters.
select_nodesB
Select nodes in the DAG (replaces the selection unless add=True).
Inputs: names (required), add.
set_frameC
Move the timeline to a frame.
Inputs: frame (required).
set_inputsB
Connect a node's inputs: {"0": "Read1", "1": null} (index -> source, null disconnects). One undo step.
Inputs: node (required), inputs (required).
set_knobsA
Set knobs on one or more nodes as ONE undo step. changes = {"Constant1": {"color": [0.8, 0.1, 0.02]}, "Blur1": {"size": 4}} Value forms: number/string/bool; list = per channel (fewer values than channels sets only the leading ones, e.g. RGB of an RGBA colour, alpha kept); {"expression": "...", "channel": i}; {"script": "<.nk syntax>"}; {"keys": {"1": v, "10": v}} for keyframes. Move nodes with "xpos"/"ypos". Returns the new values.
Inputs: changes (required).
view_nodeB
Show a node in the Viewer (GUI only).
Inputs: name (required), viewer_input.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools target a distinct resource+action (create_node, delete_nodes, set_inputs, rename_node, select_nodes), and knob_info vs get_node is a minor but readable split (single-knob detail vs whole-node inspection). The real overlap is the meta-layer: `call`, `batch`, and `exec_python` can all perform operations the dedicated tools already cover, though descriptions explicitly state precedence ('Use for commands that have no dedicated tool', 'Prefer the dedicated tools when one fits').
Nearly everything follows a predictable snake_case verb_noun pattern (get_node, set_knobs, list_nodes, create_node, set_frame, save_script), with a few sensible single-verb commands (ping, render, call, batch). Minor deviations: knob_info/script_info use a noun_info form, and delete_nodes is plural while create_node/rename_node are singular.
22 tools is slightly on the heavy side but each maps to a real Nuke operation (DAG editing, knob manipulation, rendering, colour conversion, pixel sampling, script lifecycle). Nothing feels redundant at the tool level; the count reflects a genuinely broad domain rather than padding.
Solid lifecycle coverage: create/delete/rename/select/list/inspect nodes, wire inputs, read and write knobs, plus render, save, frame control, colour conversion and pixel sampling. The escape hatches (list_commands/call/exec_python/batch) mean uncovered operations are still reachable, so there are no true dead ends; absence of explicit undo/redo or group-navigation tools is a minor gap.
Maintenance
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseAqualityBmaintenanceDrive SideFX Houdini from any agent: build node networks in one all-or-nothing call, cook, render, capture the viewport, and read the offline docs of your Houdini build. 20 tools with modes.2016MIT
- AlicenseNot gradedqualityDmaintenanceConnects Claude Code to the Unity Editor via MCP, enabling AI-driven control of scenes, assets, components, UI, animations, and more through 91 tools.2MIT
- AlicenseBqualityDmaintenanceA production-grade MCP server for Foundry Nuke that enables AI assistants to understand and manipulate compositing environments, including AOVs, deep workflows, distortion, tracking, OCIO/ACEScct, and CopyCat ML.45MIT
- AlicenseBqualityFmaintenanceConnects SideFX Houdini to Claude via the Model Context Protocol, enabling node creation, modification, and code execution through natural language.3MIT