Modo MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MODO_MCP_PORT | No | Ties the server to one Modo on this port (mcpBridge.start port:N); unset = choose among instances. | |
| MODO_MCP_INDEX | No | Path to the knowledge index. | ~/.modo_mcp/index.json |
| MODO_MCP_TOKEN | No | Override the token file (default from ~/.modo_mcp/bridge_token). | |
| MODO_MCP_LEASE_S | No | Idle seconds before another chat may take this chat's Modo. | 600 |
| MODO_MCP_TOOLSETS | No | `readonly`, or groups: `scene`, `discovery`, `edit`, `python`, `viewport`, `render`, `app` (diagnostics always on). | all |
| MODO_MCP_MAX_CHARS | No | Response budget; lower it for local models. | 40000 |
| MODO_MCP_WATCHDOG_S | No | Seconds without a reply before Modo is sampled; `0` disables. | 20 |
| MODO_MCP_ALLOW_PYTHON | No | `0` removes `modo_run_python`. | 1 |
| MODO_MCP_ALLOW_CAPTURE | No | `0` removes the screenshot tool, for text-only models. | 1 |
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 Modo through a bridge kit running inside the application.
Working rules that matter more here than with other 3D tools:
Start with modo_get_scene_summary to see what is actually open.
Modo commands are easy to misremember. Before running an unfamiliar one, confirm it with modo_get_command_info; find candidates with modo_find_commands. Do not guess argument names.
modo_search_examples holds real working scripts and verified API notes from this user's own codebase. Consult it before improvising.
Refer to items by their stable 'id', never by display name -- names are not unique in Modo.
After a modelling change, call modo_capture_viewport to check the result instead of assuming it worked.
Code sent to modo_run_python runs on Modo's own Python: 3.10 on Modo 17.1, 3.9 on Modo 16 (modo_bridge_status shows it). It also gets 'mcp', a module of workarounds for Modo bugs -- mcp.vmaps(item) lists vertex maps where geometry.vmaps fails on 17.1 -- and an open() that defaults to UTF-8 (Modo's locale is ASCII). 6b. Modelling tools (poly.bevel, prim.cube, xfrm.transform ...) are not commands and do not appear in modo_find_commands. Use tool.set on, tool.reset , tool.setAttr , tool.doApply, tool.set off -- tool.setAttr, not tool.attr: on 17.1 tool.attr reads back correctly but the tool can ignore it (distances on extrude and edge chamfer). Read the mesh only after the tool is switched off; while it is active reads are wrong. Check new geometry after an extrude. modo_get_command_info on a tool name lists its attributes and defaults.
Some commands are known to crash Modo (e.g. deformer.freeze). The server refuses them until the scene is saved and the call is repeated with acknowledge_risk=true.
Every changing call is one undo step. modo_undo_last undoes the newest one; wrap a multi-step build in modo_begin_action and finish with modo_commit_action, or undo it all with modo_rollback_action. A failed modo_run_python / modo_run_command / modo_set_channels call is undone automatically (rollback_on_error=false keeps its partial changes). None of these ever undoes the user's own work.
For kit development: modo_capture_ui shows Modo's UI (menus, forms, panels); modo_restart restarts Modo so changed plug-ins and configs load, and reconnects.
Several Modo instances can run at once, one per chat, but all chats share this server. When the user works in several chats, or modo_list_instances shows more than one instance, claim one with modo_use_instance (or start one with modo_launch_instance) and pass the token it returns as 'instance' on EVERY Modo call. Never take over an instance another chat uses without asking the user.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| modo_get_scene_summaryA | Overview of the currently open Modo scene: file, item counts by type, render camera, current selection and selection mode. Call this first in any session -- it is cheap and prevents acting on assumptions about what is open. |
| modo_get_scene_graphA | Item hierarchy of the scene as a tree. Returns names, stable ids and types; channels are omitted by default because a single material can carry hundreds of them -- fetch those per item with modo_get_item. Narrow large scenes with root, max_depth or item_types rather than pulling everything. |
| modo_get_itemA | Everything about one item: parent, child count and channel values. By default returns a curated set of channels that matter for the item's type; pass channels='all' for the complete list, or a list of names for specific ones. Set include_graphs=true to see item-graph links -- Modo connects things (texture locators, deformers, instances) through graphs, not only through parenting. |
| modo_get_shader_treeA | The scene's shader tree: materials, masks, texture layers and their settings, in layer order (which is semantically significant in Modo). Also resolves texture locators and image stills that hang off layers via the shadeLoc item graph and would be invisible to a plain hierarchy walk. Use detail='structure' for a big tree, or pass a mask id as root to inspect one material. |
| modo_get_selectionA | Current selection. kind='items' returns selected items; 'vertices', 'edges' or 'polygons' return component indices for the active mesh. Many Modo commands depend on both the selection and the selection mode, so check this when a command fails for no obvious reason. |
| modo_get_command_infoA | Exact signature of a Modo command: description plus every argument with its type, whether it is optional, and its permitted values. Also works for modelling tools (poly.bevel, prim.cube ...): for those it returns the tool's attributes with defaults and how to drive it with tool.set / tool.setAttr / tool.doApply. Query this before running any command you are not certain about -- it reads Modo's live command service, so it is authoritative in a way that recalled syntax is not. |
| modo_find_commandsA | Search Modo's command names by keyword, e.g. 'bevel', 'select.', 'uv'. Matching modelling tools are listed separately under 'tools'. Use this when you do not know what something is called, then confirm the match with modo_get_command_info. |
| modo_capture_viewportA | Screenshot of Modo's active 3D viewport. Modelling is a visual task: call this after making changes to verify the result rather than assuming a command did what you intended. |
| modo_undo_lastA | Undo the newest change the assistant made in Modo (one call of modo_run_python, modo_run_command, modo_set_channels ... is one undo step). Safe against the user's own work: if the newest undo step is not the bridge's because something was changed in Modo since, nothing is undone and the answer says so. A call that fails is already undone automatically. |
| modo_begin_actionA | Start an action: the following calls can be rolled back together with modo_rollback_action, or kept with modo_commit_action. Use it around a multi-step build that should be all or nothing. |
| modo_commit_actionB | Keep the changes of the open action and close it. |
| modo_rollback_actionA | Undo every change made since modo_begin_action and close the action. Stops, and says so, when it reaches an undo step that is not the bridge's (the user changed something meanwhile), so the user's work is never undone. |
| modo_capture_uiA | Screenshot of Modo's user interface -- menus, toolbars, panels, forms, viewports -- as Modo draws it. Use it when building or debugging a kit's UI (did the button appear, is the form laid out right). target='main' captures the main window; 'windows' also floating panels, popovers and non-modal dialogs. region [x, y, width, height] crops the main window (logical pixels). Modal dialogs cannot be captured: while one is open Modo, and with it the bridge, waits for it. |
| modo_list_dialogsA | List the dialogs open in Modo -- title, text and buttons -- read from outside Modo, so it works while a dialog blocks Modo and the bridge (calls time out, or the watchdog reports a modal dialog). Octane's error windows, file pickers, 'save changes?' and other kits' dialogs cannot be suppressed and show up here. macOS needs Accessibility permission once for the server's Python and osascript. |
| modo_close_dialogA | Close a dialog in Modo from outside Modo. Without button it cancels (Escape on macOS, Close on Windows) -- the safe answer in nearly every dialog. With button (its exact label from modo_list_dialogs) it presses that button. Never press a button that discards work (Don't Save, Discard, Delete ...) without asking the user. window: the index from modo_list_dialogs; default the frontmost dialog. |
| modo_restartA | Restart Modo, for example after changing a kit's lxserv plug-ins or configs, which Modo only loads at start. Refuses while a scene has unsaved changes unless discard_changes=true -- ask the user before discarding. Needs the bridge to start with Modo (MCP menu > Start with Modo, or 'mcpBridge.autostart true'), otherwise it could not reconnect. Waits up to wait_s seconds (at most 40) for the new Modo's bridge and reports its state. |
| modo_get_event_logA | Recent entries from Modo's event log. Modo often fails quietly: a command returns without error while the real reason sits in the log. Check here when something appears to have done nothing. |
| modo_search_examplesA | Search working Modo code and verified API notes from this user's own codebase. Categories: 'script' (standalone lx.eval idioms), 'plugin' (lxserv command/listener patterns), 'sdk' (functions and classes from the bundled modo/ and lxu/ packages, with real signatures), 'facts' (hard-won notes on what actually works in Modo). Consult this before writing non-trivial Modo code -- it is far more reliable than recall. |
| modo_get_sdk_sourceA | Full source of one SDK function or class by qualified name, e.g. 'modo.scene.Scene.items' or 'modo.item.Item.childAtIndex'. Use after modo_search_examples when the exact signature or behaviour matters. |
| modo_run_commandA | Run one Modo command, e.g. 'item.create mesh' or 'select.type polygon'. Append ' ?' to query a value instead of setting it. Modelling tools such as bevel, extrude or primitives are not commands: drive them with 'tool.set on', 'tool.setAttr ', 'tool.doApply', 'tool.set off'. Verify unfamiliar commands with modo_get_command_info first: a wrong argument name fails rather than being ignored. Never query 'commandservice command. ? {name}' for an unverified name -- it crashes Modo 17.1, so the bridge refuses it. Commands known to crash Modo are refused until repeated with acknowledge_risk=true -- save the scene before doing so. For anything that changes the scene, fill 'purpose' with one plain sentence about the effect. |
| modo_run_pythonA | Run Python inside Modo. 'lx', 'lxu', 'modo' and 'scene' (the current scene) are preloaded. The value of a trailing expression, or of a variable named RESULT, is returned. Runs on Modo's own Python (3.10 on Modo 17.1, 3.9 on Modo 16); code is checked against that version first. 'mcp' holds workarounds for Modo bugs: mcp.vmaps(item) lists vertex maps where geometry.vmaps fails on 17.1. Keep each call under about 50 s (timeout_ms is capped at 55000): the client gives up after about 60 s while Modo keeps working, so split long builds into steps and never re-run a call that timed out without checking the scene first. Prefer this over long chains of single commands. Code using a command known to crash Modo is refused until repeated with acknowledge_risk=true. Always fill 'purpose' with one plain sentence about the effect: the user reads it, not the code, when deciding whether to approve. |
| modo_set_channelsA | Set channel values on items in one batch, e.g. position, material colour or a light's radiance. Returns the old and new value of each write. Safer than hand-writing item.channel commands, and applied as a single undo step. Use atomic=true to abort the whole batch on the first failure. Writes that would not change the value are skipped (every write fires all scene listeners), and NaN or infinite values are refused. |
| modo_save_sceneA | Save the scene. With no path, saves over the current file; with a path, saves as that file (set overwrite=true to replace an existing one). incremental=true writes a numbered version alongside. |
| modo_renderA | Start a render. Returns a job_id immediately because rendering takes far longer than a tool call should block -- poll modo_get_job_status for the image. |
| modo_get_job_statusA | Check a render job started with modo_render. When finished, returns the rendered image. |
| modo_get_bridge_logA | Recent entries from the kit's forensic log, which is written to disk and flushed before every operation. If Modo crashed or the bridge went unreachable, the last entry names exactly what was running when it died -- check this first after any hard failure. |
| modo_get_crash_reportsA | Modo's recent crash and hang reports (macOS), each classified -- crash while quitting, crash during a Python call, crash inside Modo, hang or GIL deadlock -- and matched against the bridge's forensic log: when a bridge operation was running and never finished, it is named with its purpose and code. Works while Modo is down. Use after Modo crashed or the bridge became unreachable, and before retrying the same operation. |
| modo_list_instancesA | List the Modo instances that run a bridge -- several can run side by side so that several chats can work at once -- with process id, port, whether it is Modo's main instance, and which chat uses it. Pass this chat's token as instance to see which one is yours. |
| modo_use_instanceA | Claim a Modo instance for this chat and get the token to pass as 'instance' on every further Modo call. Without pid/port it takes a free instance (Modo's main one first). An instance another chat uses is refused unless take_over=true -- ask the user before taking it over, the other chat may be in the middle of work. Give your current token as instance to switch: its claim is released. |
| modo_launch_instanceA | Start an additional Modo instance for this chat, for example when all running instances are used by other chats, and get the token to pass as 'instance' on every further call. It starts with -dbon:noconfig, so it never overwrites Modo's settings when it quits. Needs the bridge to start with Modo (autostart). Waits up to wait_s seconds (at most 40) for its bridge. Each instance takes memory and may need its own licence seat (Octane often allows one session). Give your current token as instance to release its claim. |
| modo_bridge_statusA | Bridge diagnostics: whether the kit is reachable, which main-thread pump strategy is active, and how many documents the knowledge index holds. Use when tools start failing to tell a Modo-side problem from a connection one. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 31 tools
Most tools target clearly distinct facets of Modo control: scene reading, command discovery/inspection, execution, rendering, diagnostics, and instance management are well separated. Some mild overlap exists among the three diagnostic log tools (modo_get_event_log, modo_get_bridge_log, modo_get_crash_reports) and between modo_undo_last and modo_rollback_action, though the descriptions do differentiate them.
Names consistently use snake_case with the modo_ prefix and a predictable verb_noun structure (get_scene_summary, run_command, set_channels, list_instances). A couple of exceptions like modo_render and modo_bridge_status lack an explicit verb but remain readable and unsurprising.
At 31 tools this set is heavy, but the domain is broad: scene introspection, command execution, rendering, undo/rollback, diagnostics, crash analysis, UI/dialog control, and multi-instance management all justify dedicated tools. Still, several groups could be consolidated (for example the three log/diagnostic tools or the four instance tools), making the count borderline rather than ideal.
The surface covers the major lifecycle needs: scene overview and graph reading, item and shader inspection, command discovery and execution, Python scripting, channel setting, saving, rendering with job polling, undo/begin/commit/rollback, viewport and UI capture, dialogs, and instance management. Minor gaps exist—no dedicated scene open/close or item create/delete tools—but these are reachable through modo_run_command or modo_run_python.