Skip to main content
Glama
chadrik

maya-mcp-server

by chadrik

maya-mcp-server

MCP server for interacting with Autodesk Maya sessions.

Features

  • Multi-session support: Manage multiple Maya sessions from a single MCP server. The server scans for new Maya sessions that have been started and shutdown by the user.

  • Full Python expressiveness: Execute arbitrary Python code. Agents can create virtual python modules to expose functions for execution, including by the user.

  • Streaming output: Capture stdout/stderr from Maya sessions via MCP resources. Agents can monitor output from their code or user activity.

  • Simple Maya-side setup: No modules to install in Maya: leverages Maya's command port to bootstrap itself.

  • Easy installation: Install and run via uvx maya-mcp-server

screen_recording_4x.gif

Related MCP server: unreal-mcp

Installation

# Using uvx (recommended)
uvx maya-mcp-server

# Or install with pip
pip install maya-mcp-server

Usage

Claude Code Configuration

Add to your Claude Code MCP configuration, run:

claude mcp add --transport stdio maya -- uvx maya-mcp-server

The default scope is "local", which adds it to your ~/.claude.json keyed to a particular project directory. Setting --scope=user adds to ~/.claude.json across all projects, and --scope=project to add the configuration into a .mcp.json in the current project directory, so that it can be commited to your repo.

For local development use:

claude mcp add --transport stdio maya -- uv run --directory /path/to/maya-mcp-server/ maya-mcp-server

Maya Setup

The server automatically discovers Maya sessions via command ports. To enable a Python command port in Maya:

import maya.cmds as cmds
cmds.commandPort(name=":7002", sourceType="python")

Or add to your userSetup.py for automatic startup.

Tools

Tools accept an optional session_key parameter for targeting specific sessions. If only one Maya session exists, it will be auto-selected. Session keys are returned by list_sessions and add_session.

Tool

Description

list_sessions

List all active Maya sessions. Returns session info including session_key for use with other tools/resources.

add_session

Manually add a Maya session at a specific host:port. Use when auto-discovery doesn't find your session.

write_module

Create a virtual Python module in Maya. Useful for defining reusable functions.

execute_code

Execute Python code in a session. Supports result capture modes: NONE, JSON, RAW.

Resources

Resource

Description

maya://sessions/{session_key}/info

Session information (pid, user, maya_version, scene_name, scene_path)

maya://sessions/{session_key}/output

Captured stdout/stderr output from the session

Similar tools

MayaMCP

This looks to be the first publicly available MCP server for Maya and I was inspired by a few aspects of this tool, especially the goal of zero Maya-side setup.

Disadvantages:

  • The MCP server is bound to a single Maya session running on the default port.

  • It is limited to a bespoke set of tools. This could be seen as a security advantage, but it cripples the ability of an agent to do just about anything.

  • No support for reading stdout or stderr, so the agent is blind to what's happening in the Maya session.

  • Less robust approach to capturing command output (e.g. does not check if code is indented within a for loop or function)

  • Can't run via uvx, or pip install from pypi.

ChatGPT4Maya

This is the original LLM integration for Maya, which embeds ChatGPT directly in a PySide window and enables the LLM to respond to user commands and queries by executing code in the session.

Disadvantages:

  • Not an MCP server, so it cannot take full advantage of agentic workflows.

  • Only works with ChatGPT.

Jupyter MCP Server

This provided an interesting reference for how to create an MCP server in python that works with multiple remote sessions (in this case, notebooks) to execute arbitrary code.

Development

# Install dev dependencies
uv sync --dev

# Run tests
uv run pytest

# Run the server
uv run maya-mcp-server

License

MIT

TODO

  • Provide an option to execute to run in global or private context.

  • Yield output as it's printed?

  • Add tools to simplify interaction with UI: shelves, hotkeys, menus

  • Plugins to extend session info, e.g. with custom pipeline info

  • Investigate RPC for extensibility, implementation of custom tools

  • Use a dispatch function for command port mode, to further harmonize. Create a shared type safe collection of tools that hold name and arguments.

  • Return stdout and stderr lines interleaved (and prefixed with STDOUT: STDERR:) so that the agent can determine order?

  • Cleanup command ports when complete. This won't be necessary if we default to the Qt command server.

Available Tools

4 tools
add_sessionA

Manually add a Maya session at a specific host and port.

Use this when auto-discovery doesn't find your Maya session, or to connect to a Maya instance on a specific port.

Args: host: The session host (default: "127.0.0.1") port: The session port number (default: 7001)

Returns: Session information for the added session

Before using this, ensure Maya has a Python command port open. In Maya's Script Editor (Python), run: import maya.cmds as cmds cmds.commandPort(name=':7001', sourceType='python')

ParametersJSON Schema
NameRequiredDescriptionDefault
hostNo127.0.0.1
portNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
pidYes
hostYes
portYes
userYes
scene_nameNo
scene_pathNo
session_keyYes
maya_versionNo

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes the action as manual addition, notes prerequisites (open command port), and mentions return type. Lacks detail on potential side effects, but given no annotations, it is fairly transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (use case, args, returns, prerequisites). The code example adds length but is helpful. Concise overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers when to use, prerequisites, parameter defaults, and return type. Adequate for a two-parameter tool with an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Parameters are described minimally as host and port, with defaults. Schema coverage is 0%, so description adds some value but doesn't provide deeper semantics like valid ranges or formats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Explicitly states it manually adds a Maya session at a specific host and port, distinguishing from auto-discovery. Clear verb-resource combination.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to use when auto-discovery fails or for specific ports, and provides prerequisite steps with code example.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_codeA

Execute Python code in a Maya session.

Args: code: Python code to execute. result_type: How to handle the result: - "NONE": Execute statements, don't capture result - "JSON": Evaluate expression, JSON encode result - "RAW": Evaluate expression, return string representation session_key: Session key (optional if only one session exists)

Returns: Captured result (None if result_type is NONE)

Note: stdout and stderr are delivered in real-time via MCP Resource subscriptions (maya://sessions/{session_key}/stdout and /stderr). Call get_output() to retrieve buffered output.

Example: # Execute statements execute_code("import maya.cmds as cmds; cmds.polyCube()")

# Get JSON result
execute_code("cmds.ls(type='mesh')", result_type="JSON")
ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
result_typeNoNONE
session_keyNo

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It explains result handling, real-time stdout/stderr via resource subscriptions, and return values. However, it does not disclose potential side effects or destructive actions (e.g., modifying scene state) beyond the general notion of code execution.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear title, Args/Returns sections, a Note, and an Example. It is front-loaded with the purpose, and every sentence serves a purpose without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters, no output schema, and no annotations, the description covers parameter semantics, return values, and side effects (real-time output). It lacks error handling or session existence checks, but is largely complete for the intended use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must provide full meaning. It does so by detailing each parameter: 'code' (Python code), 'result_type' (with three modes explained), and 'session_key' (optional). This adds substantial value beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes Python code in a Maya session. This verb-resource pair is distinct from sibling tools (list_sessions, write_module, add_session) which do not involve code execution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context on when to use (for executing code in Maya) with parameter explanations and examples. However, it does not explicitly exclude alternatives or state when not to use, leaving room for clearer differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_sessionsA

List all active Maya sessions.

Returns a list of session information including:

  • session_key: Session key used to interact with tools and resources

  • host: Session host address

  • port: Session port number

  • pid: Maya process ID

  • user: Logged-in user

  • maya_version: Maya version string

  • scene_name: Current scene filename

  • scene_path: Full path to current scene

Note: To detect new or removed sessions, clients should call this tool periodically (e.g., every 10-30 seconds) and compare results. The SessionManager automatically scans for new Maya sessions in the background.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes that it returns session information and mentions background scanning. No annotations provided, so description carries burden. Could be more transparent about data freshness or performance.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise with clear first sentence, bullet-like list of fields, and usage note. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 0 parameters, output schema available, and low complexity, the description fully covers purpose, return data, and usage hint without gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist; baseline is 4 per guidelines. Description adds no param info, which is acceptable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'List all active Maya sessions' and enumerates returned fields. Distinguishes from sibling tools (write_module, execute_code, add_session) which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Includes note about periodic polling for change detection, providing context. Lacks explicit alternatives or when-not-to-use, but usage is implied by the sibling set.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

write_moduleA

Create a virtual Python module in a Maya session.

Args: name: Module name. Can be a dotted path (e.g., 'mypackage.utils') in which case parent packages are created automatically. code: Python source code for the module. overwrite: If True, replace existing module. If False, raise error if module already exists. session_key: Session key (optional if only one session exists)

Returns: Success message

Example: write_module("mytools", ''' import maya.cmds as cmds

def create_cube(name="cube1"):
    return cmds.polyCube(name=name)[0]
''')

# Then use it:
execute_code("import mytools; mytools.create_cube('myCube')")
ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
nameYes
overwriteNo
session_keyNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosure. It transparently explains key behaviors: automatic creation of parent packages for dotted names, overwrite behavior (replace or error), and optional session key. It does not cover potential side effects on the Maya session or persistence, but what is disclosed is accurate and helpful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with an Args, Returns, and Example section, but it is somewhat lengthy. It includes a multi-line example that takes space. The core purpose is front-loaded, but conciseness could be improved by trimming the example or combining sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema (though not shown, context signals confirm), the description complements it well. It explains the return as a 'Success message' and covers parameters comprehensively. It lacks details on error conditions or scope of the virtual module, but overall it provides a complete picture for a tool of moderate complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must compensate, and it does excellently. Each parameter is explained in the Args section: 'name' can be a dotted path with auto-creation of parents, 'code' is Python source, 'overwrite' controls replacement behavior, 'session_key' is optional. The example demonstrates real usage, adding significant value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Create a virtual Python module in a Maya session.' It uses a specific verb ('Create') and identifies the resource ('virtual Python module'), making it easy to understand. This purpose is distinct from sibling tools like list_sessions, execute_code, and add_session.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an example that illustrates typical usage and implies that write_module is for creating reusable modules, while execute_code runs code directly. However, it does not explicitly state when to use this tool over alternatives or when not to use it, which would strengthen guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedadd_session
    • First observedexecute_code
    • First observedlist_sessions
    • First observedwrite_module

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a distinct purpose: listing sessions, writing modules, executing code, and adding sessions. No overlap, descriptions are clear.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case: list_sessions, write_module, execute_code, add_session.

Tool Count5/5

Four tools cover the essential functions for a Maya remote control server: session listing, code execution, module creation, and manual session addition. Not too few nor too many.

Completeness4/5

The tool set provides core functionality for executing Python code and managing modules in Maya sessions. Minor gaps include dedicated output retrieval or scene manipulation tools, but the set is functional for its scope.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with active Autodesk Maya sessions using the maya.cmds API. It allows users to manage scene objects, control selections, and perform common 3D operations through natural language.
    -
  • A
    license
    B
    quality
    A
    maintenance
    A local Model Context Protocol server for controlling Autodesk Maya, providing typed tools for scene, modeling, animation, and more without Maya imports in the server process.
    71
    17
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chadrik/maya-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server