cinema4d-mcp

作者 ttiimmaacc已验证

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

114
Stars
26
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/ttiimmaacc/cinema4d-mcp

快速入门

使用 cinema4d-mcp 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

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.

[TODO] For published server
{
  "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.

Agent Skill

If you use agent skills, the maintained companion skill for this MCP lives in vladmdgolam/agent-skills.

The skill captures production-oriented guidance that sits on top of the raw MCP tools, including:

  • when to prefer inspect_redshift_materials over ad-hoc Python for Redshift inspection
  • when to fall back to execute_python_script for full C4D API access
  • current Redshift limits when the runtime or node space is unavailable
  • practical MoGraph extraction and debugging workflows

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

  • inspect_redshift_materials: Read-only Redshift inspector with fallbacks for assignments, preview colors, readable params, a renderEngine-style node-material probe, and a Redshift GraphView fallback via redshift.GetRSMaterialNodeMaster(...). ✅ Known quirk: the top-level capabilities.redshift_module_available flag can still be false on some builds even when the per-material GraphView fallback succeeds. Treat each material's graph.backend and graph.graphview.redshift_module_imported as the authoritative signal.
  • 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 VersionPython VersionCompatibility StatusNotes
R21 / S22Python 2.7❌ Not supportedLegacy API and Python version too old
R23Python 3.7🔍 Not plannedNot currently tested
S24 / R25 / S26Python 3.9⚠️ Possible (TBD)Requires testing and fallbacks for missing APIs
2023.0 / 2023.1Python 3.9🧪 In progressTargeting fallback support for core functionality
2023.2Python 3.10🧪 In progressAligns with planned testing base
2024.0Python 3.11✅ SupportedVerified
2025.0+Python 3.11✅ Fully SupportedPrimary 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.

常见问题

What is cinema4d-mcp?

cinema4d-mcp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ttiimmaacc. Cinema 4D plugin integrating Claude AI for prompt-driven 3D modeling, scene creation, and manipulation. It has 114 GitHub stars.

Is cinema4d-mcp safe to use?

Yes. cinema4d-mcp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install cinema4d-mcp?

Clone the repository with "git clone https://github.com/ttiimmaacc/cinema4d-mcp" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is cinema4d-mcp written in?

cinema4d-mcp is primarily written in Python. It is open-source under ttiimmaacc on GitHub, so you can review or fork the full source.

Are there alternatives to cinema4d-mcp?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh cinema4d-mcp against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP 服务器
查看详情

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP 服务器
查看详情

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP 服务器
查看详情

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP 服务器
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情