Skip to main content
Glama

Maya MCP

Tests

Connect Autodesk Maya to AI assistants (Claude, Cursor, VS Code) via the Model Context Protocol.

How it works

AI Client  ──stdio──►  MayaMCP server  ──TCP :9877──►  Maya commandPort  ──►  maya.cmds

Maya's built-in commandPort acts as the TCP bridge. The MCP server sends Python expressions to it; Maya evaluates them on its main thread and returns results. No plugin required.

The server opens a new connection for every command and closes it afterwards. Maya's commandPort serves one connection at a time, so this lets several AI clients (e.g. Claude Desktop and Claude Code) use the same Maya session.

Security: the commandPort runs any Python code sent to it, and so does the execute_maya_code tool. Only open the port on a machine you trust, keep it bound to localhost, and close it (cmds.commandPort(name=":9877", close=True)) when you don't need it.

Related MCP server: Maya MCP Server

Setup

1. Install the MCP server

Requires uv (or pip) and Python 3.10+.

uv tool install git+https://github.com/science-animated/maya-mcp
# or with pip:
pip install git+https://github.com/science-animated/maya-mcp

Install from this repository. The maya-mcp package on PyPI is a different project.

2. Configure Maya

Copy (or symlink) maya_mcp_handlers.py and userSetup.py from this repository to your Maya scripts directory:

  • macOS: ~/Library/Preferences/Autodesk/maya/scripts/

  • Linux: ~/maya/scripts/

  • Windows: %USERPROFILE%\Documents\maya\scripts\

userSetup.py opens commandPort :9877 every time Maya starts. If you already have a userSetup.py, add its contents to yours instead. After restarting Maya, the Script Editor shows maya-mcp: commandPort :9877 open: True.

Maya 2022+ may ask in a Safe Mode dialog whether to allow the new userSetup.py. Allow it, otherwise Maya skips the file (see Preferences → Security).

To activate it without restarting Maya, run this in the Script Editor:

import maya.cmds as cmds

cmds.commandPort(name=":9877", sourceType="python")

3. Configure your AI client

The AI client starts maya-mcp itself. You don't need to run it in a terminal.

Claude Desktop: edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) and restart Claude Desktop:

{
  "mcpServers": {
    "maya": {
      "command": "/full/path/to/maya-mcp"
    }
  }
}

Use the full path (find it with which maya-mcp, usually ~/.local/bin/maya-mcp). Apps started from the Dock don't get your shell's PATH.

Claude Code CLI:

claude mcp add maya --scope user -- maya-mcp

Environment variables (optional):

Variable

Default

Description

MAYA_HOST

127.0.0.1

Maya host (Maya's commandPort listens on IPv4 only)

MAYA_PORT

9877

commandPort number

Available tools (23)

Category

Tools

Scene

get_scene_info, get_object_info, get_viewport_screenshot, execute_maya_code, get_selected_objects

Objects

create_object, delete_objects, duplicate_object, rename_object, set_parent

Transforms

set_transform, get_transform

Materials

create_material, assign_material, list_materials, set_material_property

Attributes

get_attribute, set_attribute, list_attributes

Rendering

render_scene, set_render_settings

File I/O

export_scene, import_file

get_scene_info lists top-level objects in pages of 20 (sorted by name, without Maya's default cameras). Use name_filter (e.g. "spike_*"), top_level_only=false, limit (up to 500) and offset; truncated and next_offset tell the agent when there are more.

render_scene renders a PNG with the active renderer, which must be Arnold or Maya Software (other renderers give an error). width/height apply to that render only; the scene's render settings are left as they were. Renders without an output_path are deleted after they are returned.

When a tool fails, the AI client gets an error result (isError) with Maya's message, e.g. the traceback from execute_maya_code.

Example prompts

  • "Create a red sphere at position (2, 0, 0)"

  • "List all objects in the scene"

  • "Take a screenshot of the viewport"

  • "Export the selected objects as FBX to /tmp/export.fbx"

  • "Set the render resolution to 1920x1080 and render the scene"

  • "Create a point light above the scene and set its intensity to 2"

Troubleshooting

Message

Cause

nothing is listening on 127.0.0.1:9877

Maya isn't running or the commandPort isn't open.

connecting … timed out

Maya is busy, or another client is holding the port open.

Maya did not answer … within 30s

The command is still running in Maya (long operations, renders).

Unexpected reply from Maya

Maya couldn't run the command, usually because maya_mcp_handlers.py isn't in its scripts directory. The Script Editor shows the error.

Claude Desktop logs are in ~/Library/Logs/Claude/mcp-server-maya.log (macOS).

Development

git clone https://github.com/science-animated/maya-mcp
cd maya-mcp
uv tool install --editable .

With an editable install, changes to src/maya_mcp/server.py take effect when the AI client restarts the server (/mcp → reconnect in Claude Code). Changes to maya_mcp_handlers.py need a Maya restart or importlib.reload(maya_mcp_handlers).

Formatting and linting

The code is formatted and linted with ruff (settings in pyproject.toml). Install the pre-commit hook once, and every commit is checked and auto-formatted:

uv sync
uv run pre-commit install

If the hook reformats a file, the commit stops: review the change, git add it and commit again. To run the checks by hand: uv run ruff format . and uv run ruff check --fix .. CI fails if either finds anything.

maya_mcp_handlers.py and userSetup.py run inside Maya's own Python (3.7 in Maya 2022), so ruff is set to keep them compatible with Python 3.7.

Tests

uv run pytest                  # unit + server tests, no Maya needed
uv run pytest -m integration   # against a running Maya with the commandPort open
  • tests/test_handlers.py: the Maya-side handlers, with maya.cmds mocked.

  • tests/test_server.py: the MCP server against a fake commandPort (connections, timeouts, error messages, tools, and a full stdio session).

  • tests/integration/: real Maya. Creates mcp_it_* nodes and deletes them again, and renders a 64×64 Arnold image if Arnold is the active renderer.

GitHub Actions runs the first two on Linux, macOS and Windows for every push and pull request.

Supported Maya versions

Maya 2022 and later (Python 3). Tested with Maya 2025 and Arnold (MtoA) 5.6 on macOS.

License

MIT

Available Tools

23 tools
assign_materialC

Assign a material to one or more objects. object_names is a list.

Inputs: object_names (required), material_name (required). Returns: result

create_materialA

Create a Maya material/shader and its shading group. material_type: lambert, blinn, phong, standardSurface, aiStandardSurface.

Inputs: name (required), material_type. Returns: result

create_objectA

Create a Maya object. object_type: cube, sphere, plane, cylinder, cone, torus, camera, point_light, directional_light, spot_light. Returns the created object name.

Inputs: object_type (required), name. Returns: result

delete_objectsB

Delete one or more Maya objects by name. names is a list of object names.

Inputs: names (required). Returns: result

duplicate_objectC

Duplicate a Maya object. Optionally rename the duplicate.

Inputs: name (required), new_name. Returns: result

execute_maya_codeA

Execute arbitrary Python code inside Maya. cmds (maya.cmds) is pre-imported. Returns printed output, and the value of the last line if it is an expression (like the Script Editor). On errors, returns the traceback with line numbers.

Inputs: code (required). Returns: result

export_sceneA

Export the scene or selection. export_type: ma, mb, fbx, obj, abc (Alembic). Set selected_only=true to export only selected objects.

Inputs: filepath (required), export_type, selected_only. Returns: result

get_attributeA

Get the value of an attribute on a Maya node. Example: node='pCube1', attribute='tx'.

Inputs: node (required), attribute (required). Returns: result

get_object_infoB

Get detailed information about a specific Maya object: transforms, bounding box, materials, hierarchy.

Inputs: object_name (required). Returns: result

get_scene_infoA

Get the scene name, material count and a page of objects (sorted by name). By default lists top-level objects only and leaves out Maya's default cameras. name_filter takes Maya wildcards, e.g. "spike_*". If "truncated" is true, there are more objects: call again with offset=next_offset. Set top_level_only=false to include objects inside groups. limit is 1-500.

Inputs: limit, offset, name_filter, top_level_only. Returns: result

get_selected_objectsB

Get the currently selected objects in Maya.

Inputs: no named parameters. Returns: result

get_transformB

Get world-space translation, rotation, and scale of a Maya object.

Inputs: name (required). Returns: result

get_viewport_screenshotB

Capture the active Maya viewport as a PNG image. The longer side is scaled to max_size.

Inputs: max_size.

import_fileC

Import a file into Maya. import_type auto-detected from extension if not specified. Supported: ma, mb, fbx, obj, abc.

Inputs: filepath (required), import_type. Returns: result

list_attributesA

List attributes on a Maya node. Set keyable=true to list only keyable attributes.

Inputs: node (required), keyable. Returns: result

list_materialsA

List all materials in the current Maya scene.

Inputs: no named parameters. Returns: result

rename_objectC

Rename a Maya object.

Inputs: name (required), new_name (required). Returns: result

render_sceneB

Render the current Maya scene with Arnold or Maya Software (whichever is active) and return it as a PNG. width/height override the resolution for this render only. output_path is where to save the render.

Inputs: width, height, output_path.

set_attributeC

Set the value of an attribute on a Maya node. Pass lists for multi-component attrs.

Inputs: node (required), value (required), attribute (required). Returns: result

set_material_propertyB

Set a property on a Maya material. For colors pass [r,g,b] (0-1 range). Examples: attribute='color' value=[1,0,0] for red, attribute='transparency' value=[0.5,0.5,0.5].

Inputs: value (required), attribute (required), material_name (required). Returns: result

set_parentA

Parent a child object to a parent. Pass parent=null to unparent (move to world).

Inputs: child (required), parent. Returns: result

set_render_settingsC

Configure Maya render settings. renderer examples: 'mayaSoftware', 'arnold', 'vray' (render_scene supports 'arnold' and 'mayaSoftware').

Inputs: width, height, renderer, end_frame, +1 more. Returns: result

set_transformB

Set world-space translation [x,y,z], rotation [rx,ry,rz] (degrees), and/or scale [sx,sy,sz] on an object. All parameters are optional — only the ones provided will be changed.

Inputs: name (required), scale, rotation, translation. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools are distinct resource/action pairs, but execute_maya_code is a universal escape hatch that overlaps with nearly every specialized tool. get_object_info, get_transform, get_attribute, and set_attribute also overlap on reading/writing node data, though descriptions provide enough guidance.

    Naming Consistency5/5

    All tool names use snake_case with a predictable verb_noun pattern such as get_, set_, create_, list_, assign_, export_, and import_. No inconsistent casing or vague standalone verbs are present.

    Tool Count3/5

    At 23 tools this is in the rubric's heavy 16-25 range, though the breadth mirrors Maya's modeling, material, attribute, rendering, and import/export surface. Each tool is purposeful, but generic attribute and transform tools could be consolidated.

    Completeness4/5

    The set covers core scene inspection, object CRUD, transforms, parenting, materials, attributes, rendering, and import/export. Minor gaps include selection mutation, group creation, material deletion, keyframing/animation, and scene save/open, though execute_maya_code provides workarounds.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to connect to and control Autodesk Maya for 3D modeling, animation, and rendering operations through the Model Context Protocol, supporting object creation, transformation, scene queries, and Python command execution.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to programmatically control Autodesk Maya via natural language using over 30 tools for 3D modeling, lighting, and animation. It connects through Maya's command port to facilitate procedural scene generation and complex production-ready workflows.
      1
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants like Claude Desktop to control Autodesk Maya via natural language through the Model Context Protocol.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables control of Autodesk Maya using natural language via Claude and the Model Context Protocol, providing tools for modeling, animation, scene management, and RAG-powered documentation search.
      17
      3
      MIT