Skip to content

Protocols API

dcc_mcp_core.protocols types — MCP specification-compliant type definitions.

ToolDefinition

FieldTypeDescription
namestrTool name
descriptionstrTool description
input_schemastrJSON Schema string for input (serde: inputSchema)
output_schemaOptional[str]JSON Schema string for output (serde: outputSchema)
python
from dcc_mcp_core import ToolDefinition

tool = ToolDefinition(
    name="create_sphere",
    description="Creates a sphere",
    input_schema='{"type": "object"}',
)

ToolAnnotations

FieldTypeDescription
titleOptional[str]Human-readable title
read_only_hintOptional[bool]serde: readOnlyHint
destructive_hintOptional[bool]serde: destructiveHint
idempotent_hintOptional[bool]serde: idempotentHint
open_world_hintOptional[bool]serde: openWorldHint
python
from dcc_mcp_core import ToolAnnotations

ann = ToolAnnotations(read_only_hint=True)

ToolDeclaration

Lightweight declaration of a single MCP tool provided by a Skill. Parsed from the tools: array in SKILL.md frontmatter — no script execution needed for discovery.

FieldTypeDefaultDescription
namestrTool name (used as MCP tool identifier)
descriptionstr""Human-readable description
input_schemastr""JSON Schema string for input parameters
output_schemastr""JSON Schema string for output (empty = any)
read_onlyboolFalseTrue = doesn't modify DCC state
destructiveboolFalseTrue = deletes / overwrites data
idempotentboolFalseTrue = safe to call multiple times
source_filestr""Relative path within skill's scripts/ dir
python
from dcc_mcp_core import ToolDeclaration

td = ToolDeclaration(
    name="create_sphere",
    description="Create a polygon sphere",
    input_schema='{"type": "object", "required": ["radius"], "properties": {"radius": {"type": "number"}}}',
    output_schema=None,
    read_only=False,
    destructive=False,
    idempotent=False,
    source_file="scripts/create_sphere.py",
)

# All fields are get/set
td.name, td.description, td.input_schema, td.output_schema
td.read_only, td.destructive, td.idempotent, td.source_file

Relation to SkillMetadata: skill.tools is List[ToolDeclaration], populated from SKILL.md tools: frontmatter. Each entry maps to one MCP tool. When tools: is absent, the Skill falls back to auto-discovering scripts in scripts/.

ResourceDefinition

FieldTypeDefaultDescription
uristrResource URI
namestrResource name
descriptionstrDescription
mime_typestr"text/plain"MIME type (serde: mimeType)
python
from dcc_mcp_core import ResourceDefinition

res = ResourceDefinition(uri="scene://objects", name="Objects", description="Scene objects")

ResourceTemplateDefinition

FieldTypeDefaultDescription
uri_templatestrURI template (serde: uriTemplate)
namestrTemplate name
descriptionstrDescription
mime_typestr"text/plain"MIME type (serde: mimeType)
python
from dcc_mcp_core import ResourceTemplateDefinition

tmpl = ResourceTemplateDefinition(
    uri_template="scene://objects/{name}",
    name="Object",
    description="A scene object",
)

PromptArgument

FieldTypeDefaultDescription
namestrArgument name
descriptionstrDescription
requiredboolFalseWhether required
python
from dcc_mcp_core import PromptArgument

arg = PromptArgument(name="object_name", description="Object to review", required=True)

PromptDefinition

FieldTypeDescription
namestrPrompt name
descriptionstrDescription
python
from dcc_mcp_core import PromptDefinition

prompt = PromptDefinition(name="review", description="Review a model")

DCC Adapter Traits

DCC integration packages implement these traits to expose their application to the MCP ecosystem. All methods are synchronous.

Architecture Overview

DccAdapter              — Top-level trait
  ├── DccConnection         — Connection lifecycle
  ├── DccScriptEngine       — Script execution (Python / MEL / MaxScript / …)
  ├── DccSceneInfo          — Scene inspection
  └── DccSnapshot           — Viewport capture

Cross-DCC Protocol Traits (universal, optional)
  ├── DccSceneManager       — Scene/file management, selection, visibility
  ├── DccTransform          — Object TRS transforms and bounding boxes
  ├── DccRenderCapture      — Viewport capture and scene rendering
  └── DccHierarchy          — Parent/child hierarchy and grouping

DccAdapter

Top-level trait. Implement in your DCC integration package.

MethodReturnsDescription
info()DccInfoStatic application info (type, version, pid, platform)
capabilities()DccCapabilitiesFeature flags — advertise which sub-traits are available
as_connection()DccConnection | NoneConnection lifecycle interface
as_script_engine()DccScriptEngine | NoneScript execution interface
as_scene_info()DccSceneInfo | NoneScene info query interface
as_snapshot()DccSnapshot | NoneScreenshot/capture interface
as_scene_manager()DccSceneManager | NoneUniversal scene management (optional)
as_transform()DccTransform | NoneUniversal object TRS (optional)
as_render_capture()DccRenderCapture | NoneRender/capture interface (optional)
as_hierarchy()DccHierarchy | NoneScene hierarchy interface (optional)

DccConnection

MethodReturnsDescription
connect()NoneEstablish connection to the DCC
disconnect()NoneDisconnect from the DCC
is_connected()boolWhether the connection is alive
health_check()intRound-trip ping in milliseconds

DccScriptEngine

MethodReturnsDescription
execute_script(code, language, timeout_ms)ScriptResultRun a script inside the DCC
supported_languages()list[ScriptLanguage]Languages this DCC supports

DccSceneInfo

MethodReturnsDescription
get_scene_info()SceneInfoInfo about the currently open scene
list_objects()list[tuple[str, str]](name, type) pairs for all scene objects
get_selection()list[str]Names of currently selected objects

DccSnapshot

MethodReturnsDescription
capture_viewport(viewport, width, height, format)CaptureResultCapture a viewport as PNG / JPEG / WebP

DccSceneManager

Universal scene and file management. Supported across Maya, Blender, 3dsMax, Unreal, Unity, Photoshop, Figma.

MethodReturnsDescription
get_scene_info()SceneInfoMetadata for the current scene/document
list_objects(object_type)list[SceneObject]All objects; filter by type or None for all
new_scene(save_prompt)SceneInfoCreate a new empty scene
open_file(file_path, force)SceneInfoOpen scene from disk
save_file(file_path)strSave scene; None = save in place
export_file(file_path, format, selection_only)strExport to FBX / OBJ / USD / PNG etc.
get_selection()list[str]Currently selected object names
set_selection(object_names)list[str]Replace selection
select_by_type(object_type)list[str]Select all objects of a given type
set_visibility(object_name, visible)boolToggle object/layer visibility

DccTransform

Universal TRS interface. Coordinate convention: right-hand Y-up world space, Euler XYZ in degrees, centimeter units.

MethodReturnsDescription
get_transform(object_name)ObjectTransformWorld-space TRS
set_transform(object_name, translate, rotate, scale)ObjectTransformUpdate TRS; pass None to leave a component unchanged
get_bounding_box(object_name)BoundingBoxWorld-space AABB
rename_object(old_name, new_name)strRename; returns new long name

DccRenderCapture

Viewport screenshot and scene render output.

MethodReturnsDescription
capture_viewport(viewport, width, height, format)CaptureResultScreenshot of active/named viewport
render_scene(output_path, width, height, renderer)RenderOutputFull render to disk
get_render_settings()dict[str, str]Current render settings
set_render_settings(settings)NoneUpdate one or more render settings

DccHierarchy

Parent-child object graph — Maya DAG, Blender collections, UE level, Unity scene graph, Photoshop layer groups, Figma frames.

MethodReturnsDescription
get_hierarchy()list[SceneNode]Full scene tree (root nodes with nested children)
get_children(object_name)list[SceneObject]Immediate children; None = scene root
get_parent(object_name)str | NoneParent name; None when at scene root
group_objects(object_names, group_name, parent)SceneObjectGroup under a new container
ungroup(group_name)list[str]Dissolve group; children move to group's parent
reparent(object_name, new_parent, preserve_world_transform)SceneObjectChange parent

DCC Data Types

ScriptLanguage

Enum of script languages supported by DCC applications.

ValueDescription
PYTHONPython
MELMaya Embedded Language
MAXSCRIPT3ds Max MAXScript
HSCRIPTHoudini HScript
VEXHoudini VEX
LUALua
CSHARPC# (Unity, Unreal)
BLUEPRINTUnreal Engine Blueprint
python
from dcc_mcp_core import ScriptLanguage

lang = ScriptLanguage.PYTHON
assert lang == ScriptLanguage.PYTHON

DccErrorCode

Enum of error codes for DCC adapter operations.

ValueDescription
CONNECTION_FAILEDCould not connect to the DCC process
TIMEOUTOperation exceeded time limit
SCRIPT_ERRORScript execution failed
NOT_RESPONDINGDCC is unresponsive
UNSUPPORTEDOperation not supported by this DCC
PERMISSION_DENIEDInsufficient permissions
INVALID_INPUTBad input parameters
SCENE_ERRORScene operation failed
INTERNALInternal error in the DCC adapter
python
from dcc_mcp_core import DccErrorCode, DccError

err = DccError(DccErrorCode.TIMEOUT, "operation timed out", recoverable=True)
assert err.code == DccErrorCode.TIMEOUT

DccInfo

Static information about a running DCC application instance.

FieldTypeDefaultDescription
dcc_typestrApplication type ("maya", "blender", …)
versionstrApplication version string
platformstrOS platform ("windows", "linux", "macos")
pidintProcess ID
python_versionstr | NoneNoneEmbedded Python version, if any
metadatadict[str, str]{}Arbitrary extra key/value info
python
from dcc_mcp_core import DccInfo

info = DccInfo(
    dcc_type="maya",
    version="2024.2",
    platform="windows",
    pid=1234,
    python_version="3.10.11",
)
d = info.to_dict()  # serialize to plain dict

DccCapabilities

Feature flags advertising which sub-traits a DCC adapter supports.

FieldTypeDefaultDescription
script_languageslist[ScriptLanguage][]Supported script languages
scene_infoboolFalseImplements DccSceneInfo
snapshotboolFalseImplements DccSnapshot
undo_redoboolFalseSupports undo/redo
progress_reportingboolFalseSupports progress callbacks
file_operationsboolFalseSupports file open/save/export
selectionboolFalseSupports object selection
scene_managerboolFalseImplements DccSceneManager
transformboolFalseImplements DccTransform
render_captureboolFalseImplements DccRenderCapture
hierarchyboolFalseImplements DccHierarchy
has_embedded_pythonboolTrueWhether the DCC has an embedded Python interpreter (False for bridge-based DCCs)
bridge_kindstr | NoneNoneBridge kind: "http", "websocket", "named_pipe", or custom string
bridge_endpointstr | NoneNoneBridge endpoint URL or socket path
extensionsdict[str, bool]{}Arbitrary extension flags
python
from dcc_mcp_core import DccCapabilities, ScriptLanguage

# Python-embedded DCC (e.g. Maya, Blender)
caps = DccCapabilities(
    script_languages=[ScriptLanguage.PYTHON, ScriptLanguage.MEL],
    scene_info=True,
    snapshot=True,
    file_operations=True,
)

# Bridge-based DCC (e.g. Photoshop via WebSocket)
caps_bridge = DccCapabilities(
    scene_info=True,
    has_embedded_python=False,
    bridge_kind="websocket",
    bridge_endpoint="ws://localhost:12345",
)
if caps.scene_manager:
    print("scene manager available")

BridgeKind

BridgeKind describes how a non-Python DCC communicates with the MCP server. Bridge-based DCCs (e.g. ZBrush via HTTP, Photoshop via WebSocket, 3ds Max via Named Pipe) do not have an embedded Python interpreter, so they use a bridge protocol instead.

In Python, BridgeKind is exposed as a str on DccCapabilities.bridge_kind:

ValueDescriptionExample DCC
"http"HTTP REST bridgeZBrush 2024+
"websocket"WebSocket JSON-RPC bridgePhotoshop (UXP)
"named_pipe"Named pipe / COM bridge3ds Max
Custom stringApplication-specific bridge
NoneDirect Python-embedded (no bridge)Maya, Blender, Houdini
python
from dcc_mcp_core import DccCapabilities

# Check if a DCC uses a bridge
if caps.bridge_kind == "websocket":
    print(f"Connect to bridge at {caps.bridge_endpoint}")

# has_embedded_python is False for bridge-based DCCs
if not caps.has_embedded_python:
    print("This DCC requires a bridge connection")

DccError

Raised or returned when a DCC adapter operation fails.

FieldTypeDefaultDescription
codeDccErrorCodeError category
messagestrHuman-readable description
detailsstr | NoneNoneOptional extended details
recoverableboolFalseWhether retry may succeed
python
from dcc_mcp_core import DccError, DccErrorCode

err = DccError(DccErrorCode.SCRIPT_ERROR, "NameError: name 'foo' is not defined")
print(err.code, err.recoverable)

ScriptResult

Result returned by DccScriptEngine.execute_script().

FieldTypeDefaultDescription
successboolWhether execution succeeded
execution_time_msintExecution duration in milliseconds
outputstr | NoneNoneCaptured stdout / return value
errorstr | NoneNoneError message if failed
contextdict[str, str]{}Execution context key/values
python
from dcc_mcp_core import ScriptResult

r = ScriptResult(success=True, execution_time_ms=12, output="42")
d = r.to_dict()

SceneStatistics

Lightweight scene statistics summary.

FieldTypeDefaultDescription
object_countint0Total scene objects
vertex_countint0Total mesh vertices
polygon_countint0Total polygons
material_countint0Unique materials
texture_countint0Unique textures
light_countint0Light sources
camera_countint0Cameras

SceneInfo

Information about the currently open scene / document.

FieldTypeDefaultDescription
file_pathstr""Absolute path on disk; empty if unsaved
namestr"untitled"Scene/document name
modifiedboolFalseUnsaved changes present
formatstr""File format extension (.ma, .blend, …)
frame_rangetuple[float, float] | NoneNone(start, end) frames
current_framefloat | NoneNoneActive frame
fpsfloat | NoneNoneFrames per second
up_axisstr | NoneNone"Y" or "Z"
unitsstr | NoneNoneLinear units ("cm", "m", …)
statisticsSceneStatisticsdefaultScene object counts
metadatadict[str, str]{}Arbitrary extra data

Cross-DCC Data Models

ObjectTransform

FieldTypeDescription
translate[float, float, float]World XYZ in centimeters
rotate[float, float, float]Euler XYZ in degrees
scale[float, float, float]Non-uniform scale (sx, sy, sz)
python
from dcc_mcp_core import ObjectTransform

t = ObjectTransform(
    translate=[10.0, 0.0, 5.0],
    rotate=[0.0, 45.0, 0.0],
    scale=[1.0, 1.0, 1.0],
)
identity = ObjectTransform.identity()  # origin, no rotation, scale=1

BoundingBox

FieldTypeDescription
min[float, float, float]Minimum corner in world space (cm)
max[float, float, float]Maximum corner in world space (cm)
python
from dcc_mcp_core import BoundingBox

bb = BoundingBox(min=[-1.0, 0.0, -1.0], max=[1.0, 2.0, 1.0])
bb.center()  # [0.0, 1.0, 0.0]
bb.size()    # [2.0, 2.0, 2.0]

SceneObject

Lightweight description of any scene object, layer, or actor.

FieldTypeDescription
namestrShort leaf name (e.g. pCube1)
long_namestrFull path / unique ID (e.g. |group1|pCube1)
object_typestrType string (mesh, light, camera, …)
parentstr | NoneParent long name; None = scene root
visibleboolWhether the object is visible
metadatadict[str, str]Arbitrary extra data

SceneNode

FieldTypeDescription
objectSceneObjectThe object at this node
childrenlist[SceneNode]Immediate children (nested recursively)

FrameRange

FieldTypeDescription
startfloatFirst frame (inclusive)
endfloatLast frame (inclusive)
fpsfloatFrames per second
currentfloatCurrently active frame

RenderOutput

Result of DccRenderCapture.render_scene().

FieldTypeDescription
file_pathstrAbsolute path to the rendered image
widthintImage width in pixels
heightintImage height in pixels
formatstrFile format (png, exr, jpg)
render_time_msintRender duration in milliseconds

Released under the MIT License.