Cinema 4D plugin integrating Claude AI for prompt-driven 3D modeling, scene creation, and manipulation.

What is ttiimmaacc cinema4d mcp

Cinema4D MCP โ€” Model Context Protocol (MCP) Server

Cinema4D MCP Server connects Cinema 4D to Claude, enabling prompt-assisted 3D manipulation.

Table of Contents

Components

  1. C4D Plugin: A socket server that listens for commands from the MCP server and executes them in the Cinema 4D environment.
  2. MCP Server: A Python server that implements the MCP protocol and provides tools for Cinema 4D integration.

Prerequisites

  • Cinema 4D (R2024+ recommended)
  • Python 3.10 or higher (for the MCP Server component)

Installation

To install the project, follow these steps:

Clone the Repository

git clone https://github.com/ttiimmaacc/cinema4d-mcp.git
cd cinema4d-mcp

Install the MCP Server Package

pip install -e .

Make the Wrapper Script Executable

chmod +x bin/cinema4d-mcp-wrapper

Setup

Cinema 4D Plugin Setup

To set up the Cinema 4D plugin, follow these steps:

  1. Copy the Plugin File: Copy the c4d_plugin/mcp_server_plugin.pyp file to Cinema 4D's plugin folder. The path varies depending on your operating system:

    • macOS: /Users/USERNAME/Library/Preferences/Maxon/Maxon Cinema 4D/plugins/
    • Windows: C:\Users\USERNAME\AppData\Roaming\Maxon\Maxon Cinema 4D\plugins\
  2. Start the Socket Server:

    • Open Cinema 4D.
    • Go to Extensions > Socket Server Plugin
    • You should see a Socket Server Control dialog window. Click Start Server.

Claude Desktop Configuration

To configure Claude Desktop, you need to modify its configuration file:

  1. Open the Configuration File:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Alternatively, use the Settings menu in Claude Desktop (Settings > Developer > Edit Config).
  2. Add MCP Server Configuration: For development/unpublished server, add the following configuration:

    "mcpServers": {
      "cinema4d": {
        "command": "python3",
        "args": ["/Users/username/cinema4d-mcp/main.py"]
      }
    }
    
  3. Restart Claude Desktop after updating the configuration file.

{
  "mcpServers": {
    "cinema4d": {
      "command": "cinema4d-mcp-wrapper",
      "args": []
    }
  }
}

Usage

  1. Ensure the Cinema 4D Socket Server is running.
  2. Open Claude Desktop and look for the hammer icon ๐Ÿ”จ in the input box, indicating MCP tools are available.
  3. Use the available Tool Commands to interact with Cinema 4D through Claude.

Testing

Command Line Testing

To test the Cinema 4D socket server directly from the command line:

python main.py

You should see output confirming the server's successful start and connection to Cinema 4D.

Testing with MCP Test Harness

The repository includes a simple test harness for running predefined command sequences:

  1. Test Command File (tests/mcp_test_harness.jsonl): Contains a sequence of commands in JSONL format that can be executed in order. Each line represents a single MCP command with its parameters.

  2. GUI Test Runner (tests/mcp_test_harness_gui.py): A simple Tkinter GUI for running the test commands:

    python tests/mcp_test_harness_gui.py
    

    The GUI allows you to:

    • Select a JSONL test file
    • Run the commands in sequence
    • View the responses from Cinema 4D

This test harness is particularly useful for:

  • Rapidly testing new commands
  • Verifying plugin functionality after updates
  • Recreating complex scenes for debugging
  • Testing compatibility across different Cinema 4D versions

Troubleshooting & Debugging

  1. Check the log files:

    tail -f ~/Library/Logs/Claude/mcp*.log
    
  2. Verify Cinema 4D shows connections in its console after you open Claude Desktop.

  3. Test the wrapper script directly:

    cinema4d-mcp-wrapper
    
  4. If there are errors finding the mcp module, install it system-wide:

    pip install mcp
    
  5. For advanced debugging, use the MCP Inspector:

    npx @modelcontextprotocol/inspector uv --directory /Users/username/cinema4d-mcp run cinema4d-mcp
    

Project File Structure

cinema4d-mcp/
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ main.py
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ bin/
โ”‚   โ””โ”€โ”€ cinema4d-mcp-wrapper
โ”œโ”€โ”€ c4d_plugin/
โ”‚   โ””โ”€โ”€ mcp_server_plugin.pyp
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ cinema4d_mcp/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ server.py
โ”‚       โ”œโ”€โ”€ config.py
โ”‚       โ””โ”€โ”€ utils.py
โ””โ”€โ”€ tests/
    โ”œโ”€โ”€ test_server.py
    โ”œโ”€โ”€ mcp_test_harness.jsonl
    โ””โ”€โ”€ mcp_test_harness_gui.py

Tool Commands

General Scene & Execution

  • get_scene_info: Get summary info about the active Cinema 4D scene. โœ…
  • list_objects: List all scene objects (with hierarchy). โœ…
  • group_objects: Group selected objects under a new null. โœ…
  • execute_python: Execute custom Python code inside Cinema 4D. โœ…
  • save_scene: Save the current Cinema 4D project to disk. โœ…
  • load_scene: Load a .c4d file into the scene. โœ…
  • set_keyframe: Set a keyframe on an objects property (position, rotation, etc.). โœ…

Object Creation & Modification

  • add_primitive: Add a primitive (cube, sphere, cone, etc.) to the scene. โœ…
  • modify_object: Modify transform or attributes of an existing object. โœ…
  • create_abstract_shape: Create an organic, non-standard abstract form. โœ…

Cameras & Animation

  • create_camera: Add a new camera to the scene. โœ…
  • animate_camera: Animate a camera along a path (linear or spline-based). โœ…

Lighting & Materials

  • create_light: Add a light (omni, spot, etc.) to the scene. โœ…
  • create_material: Create a standard Cinema 4D material. โœ…
  • apply_material: Apply a material to a target object. โœ…
  • apply_shader: Generate and apply a stylized or procedural shader. โœ…

Redshift Support

  • validate_redshift_materials: Check Redshift material setup and connections. โœ… โš ๏ธ (Redshift materials not fully implemented)

MoGraph & Fields

  • create_mograph_cloner: Add a MoGraph Cloner (linear, radial, grid, etc.). โœ…
  • add_effector: Add a MoGraph Effector (Random, Plain, etc.). โœ…
  • apply_mograph_fields: Add and link a MoGraph Field to objects. โœ…

Dynamics & Physics

  • create_soft_body: Add a Soft Body tag to an object. โœ…
  • apply_dynamics: Apply Rigid or Soft Body physics. โœ…

Rendering & Preview

  • render_frame: Render a frame and save it to disk (file-based output only). โš ๏ธ (Works, but fails on large resolutions due to MemoryError: Bitmap Init failed. This is a resource limitation.)
  • render_preview: Render a quick preview and return base64 image (for AI). โœ…
  • snapshot_scene: Capture a snapshot of the scene (objects + preview image). โœ…

Compatibility Plan & Roadmap

Cinema 4D Version Python Version Compatibility Status Notes
R21 / S22 Python 2.7 โŒ Not supported Legacy API and Python version too old
R23 Python 3.7 ๐Ÿ” Not planned Not currently tested
S24 / R25 / S26 Python 3.9 โš ๏ธ Possible (TBD) Requires testing and fallbacks for missing APIs
2023.0 / 2023.1 Python 3.9 ๐Ÿงช In progress Targeting fallback support for core functionality
2023.2 Python 3.10 ๐Ÿงช In progress Aligns with planned testing base
2024.0 Python 3.11 โœ… Supported Verified
2025.0+ Python 3.11 โœ… Fully Supported Primary development target

Compatibility Goals

  • Short Term: Ensure compatibility with C4D 2023.1+ (Python 3.9 and 3.10)
  • Mid Term: Add conditional handling for missing MoGraph and Field APIs
  • Long Term: Consider optional legacy plugin module for R23โ€“S26 support if demand arises

Recent Fixes

  • Context Awareness: Implemented robust object tracking using GUIDs. Commands creating objects return context (guid, actual_name, etc.). Subsequent commands correctly use GUIDs passed by the test harness/server to find objects reliably.
  • Object Finding: Reworked find_object_by_name to correctly handle GUIDs (numeric string format), fixed recursion errors, and improved reliability when doc.SearchObject fails.
  • GUID Detection: Command handlers (apply_material, create_mograph_cloner, add_effector, apply_mograph_fields, set_keyframe, group_objects) now correctly detect if identifiers passed in various parameters (object_name, target, target_name, list items) are GUIDs and search accordingly.
  • create_mograph_cloner: Fixed AttributeError for missing MoGraph parameters (like MG_LINEAR_PERSTEP) by using getattr fallbacks. Fixed logic bug where the found object wasn't correctly passed for cloning.
  • Rendering: Fixed TypeError in render_frame related to doc.ExecutePasses. snapshot_scene now correctly uses the working base64 render logic. Large render_frame still faces memory limits.
  • Registration: Fixed AttributeError for c4d.NilGuid.

Leave a Comment

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.

Related MCP Servers

chrisdoc hevy mcp avatar

chrisdoc hevy mcp

mcp
sylphlab pdf reader mcp avatar

sylphlab pdf reader mcp

An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.

pdf-parsetypescriptnodejs
aashari mcp server atlassian bitbucket avatar

aashari mcp server atlassian bitbucket

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

atlassianrepositorymcp
aashari mcp server atlassian confluence avatar

aashari mcp server atlassian confluence

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.

atlassianmcpconfluence
prisma prisma avatar

prisma prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

cockroachdbgomcp
Zzzccs123 mcp sentry avatar

Zzzccs123 mcp sentry

mcp sentry for typescript sdk

mcptypescript
zhuzhoulin dify mcp server avatar

zhuzhoulin dify mcp server

mcp
zhongmingyuan mcp my mac avatar

zhongmingyuan mcp my mac

mcp
zhixiaoqiang desktop image manager mcp avatar

zhixiaoqiang desktop image manager mcp

MCP ๆœๅŠกๅ™จ๏ผŒ็”จไบŽ็ฎก็†ๆกŒ้ขๅ›พ็‰‡ใ€ๆŸฅ็œ‹่ฏฆๆƒ…ใ€ๅŽ‹็ผฉใ€็งปๅŠจ็ญ‰๏ผˆๅฎŒๅ…จ่ฎฉTraeๅฎž็Žฐ๏ผ‰

mcp
zhixiaoqiang antd components mcp avatar

zhixiaoqiang antd components mcp

An MCP service for Ant Design components query | ไธ€ไธชๅ‡ๅฐ‘ Ant Design ็ป„ไปถไปฃ็ ็”Ÿๆˆๅนป่ง‰็š„ MCP ๆœๅŠก๏ผŒๅŒ…ๅซ็ณป็ปŸๆ็คบ่ฏใ€็ป„ไปถๆ–‡ๆกฃใ€API ๆ–‡ๆกฃใ€ไปฃ็ ็คบไพ‹ๅ’Œๆ›ดๆ–ฐๆ—ฅๅฟ—ๆŸฅ่ฏข

designantdapi

Submit Your MCP Server

Share your MCP server with the community

Submit Now