Dcc Mcp Core 标志

Dcc Mcp Core

组织
dcc-mcp
dcc-mcp-core

面向 DCC Model Context Protocol(MCP)生态系统的基础库。提供由 Rust 驱动的操作管理、技能系统、IPC 传输、MCP Streamable HTTP 服务器(符合 2025-03-26 规范,并支持识别 2025-06-18 和 2025-11-25 版本)、沙盒安全、共享记忆、屏幕捕获、USD 场景支持,以及用于 AI 辅助 DCC 工作流的遥测功能。适用于 Maya、Blender、Houdini、3ds Max 或任何 DCC MCP 集成场景。

概览

发布者dcc-mcp
代码仓库dcc-mcp-core
技能名称dcc-mcp-core
星标数
74
复刻数
7
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 dcc-mcp 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Dcc Mcp Core AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/dcc-mcp/dcc-mcp-core/tree/main/.agents/skills/dcc-mcp-core
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dcc-mcp/dcc-mcp-core.git /tmp/dcc-mcp-core
mkdir -p .claude/skills
cp -r /tmp/dcc-mcp-core/.agents/skills/dcc-mcp-core .claude/skills/dcc-mcp-core
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Dcc Mcp Core,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Dcc Mcp Core。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Dcc Mcp Core 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

dcc-mcp-core — DCC MCP Ecosystem Foundation

The foundational library enabling AI assistants to interact with Digital Content Creation (DCC) software through the Model Context Protocol (MCP).

Quick Decision Guide — Use the Right API

TaskUse thisNot this
Operate a live DCC from an agentdcc-mcp + dcc-mcp-cliembedding the Python API in the agent
Create or modernize a DCC-MCP adapterdcc-mcp-creatoradapter-local copies of core wiring
Create a DCC-specific Skill packagedcc-mcp-skills-creatora new adapter repository
Analyze or report a failed DCC calldcc-mcp recovery flow: doctor, failure-filtered stats, dcc_feedback__report, public-safe issue reportraw unreviewed logs
Return action resultsuccess_result() / error_result()raw dicts
Load skillsscan_and_load() → (skills, skipped)manual file scanning
One-call MCP servercreate_skill_server("maya", McpHttpConfig(port=8765))manual wiring
Validate paramsToolValidator.from_schema_json()isinstance checks
Connect to DCCIpcChannelAdapter.connect(name) or SocketServerAdapter(path)raw sockets
Define MCP toolToolDefinition + ToolAnnotationsraw JSON
Serve MCP over HTTPMcpHttpServer(registry, McpHttpConfig(port=8765))raw HTTP server
Build DCC adapterDccServerOptions.from_env(...) + DccServerBase(options=opts)legacy 17-parameter constructor
Main-thread DCC callsHostExecutionBridge / dispatcher passed via DccServerOptionsprivate _core imports
Enable skill hot-reloadDccSkillHotReloader(dcc_name, server)custom file watchers
Gateway failoverDccGatewayElection(dcc_name, server)manual election logic
Write skill scriptsskill_entry + skill_success / skill_errormanual JSON output

What This Library Does

CapabilityDescription
Action ManagementRegister, validate, dispatch, and execute actions with typed inputs/outputs
Skills SystemZero-code script registration (Python/MEL/Batch/Shell/JS) as MCP tools via SKILL.md
Transport LayerHigh-performance IPC via ipckit with DccLink framing (IpcChannelAdapter, SocketServerAdapter)
MCP HTTP ServerMCP Streamable HTTP (2025-03-26 spec) powered by axum/Tokio, runs in background thread
Process ManagementLaunch, monitor, auto-recover DCC processes (Maya, Blender, Houdini, etc.)
Sandbox SecurityPolicy-based access control, input validation, audit logging
Shared MemoryLZ4-compressed inter-process data exchange for large scenes
Screen CaptureCross-platform DCC viewport capture for visual feedback
USD SupportRead/write Universal Scene Description for pipeline integration
TelemetryStructured tracing and recording for observability
MCP Protocol TypesComplete Tool/Resource/Prompt schema implementations
DCC Server BaseReusable base class for DCC adapters (hot-reload, gateway election, lifecycle)
Gateway FailoverAutomatic gateway election when primary gateway becomes unreachable
Skill Hot-ReloadFile-watching auto-reload for live skill development

Installation

The CLI refreshes the official signed installation catalog independently of its binary version. Inspect plan.catalog for source, digest, expiry, and latest_checked; --offline explicitly uses a valid signed cache or bundled metadata. Never treat an integrity failure as permission to bypass verification. Adapter promotion must preserve curated versions, immutable artifact hashes, withdrawal policy, and minimum Core compatibility. See verified-install-catalog.md.

For agent-side DCC control, install the published dcc-mcp Skill and use its CLI workflow; the Python package below is for adapters and embedded runtimes:

bash
openclaw skills install @loonghao/dcc-mcp
# Direct ClawHub CLI:
npx --yes clawhub@0.23.1 install @loonghao/dcc-mcp

Use dcc-mcp-creator only for a complete adapter/runtime, and dcc-mcp-skills-creator only for a DCC-specific Skill package.

bash
pip install dcc-mcp-core
# Python 3.7-3.14, zero runtime dependencies

Local Dependency Maintenance

Use the repository-pinned vx toolchain for Rust dependency refreshes and CI parity:

bash
vx --version  # CI pins loonghao/vx@v0.9.7
vx cargo update
vx cargo tree -d
vx cargo build --workspace --all-targets --timings

Review duplicate dependency output before editing manifests, and keep generated lockfile changes only when they are part of the intended dependency refresh.

Core Patterns

Pattern 1: Skills-First — one-call MCP server (recommended)

python
import os
from dcc_mcp_core import create_skill_server, McpHttpConfig

os.environ["DCC_MCP_MAYA_SKILL_PATHS"] = "/opt/my-skills"

# One call: creates registry + dispatcher + catalog + discovers skills + server
server = create_skill_server("maya", McpHttpConfig(port=8765))
handle = server.start()
print(f"Maya MCP server: {handle.mcp_url()}")

# Agents connect and use on-demand skill discovery:
# → search_tools(query="bevel") or search_skills(query="modeling")
# → get_skill_info(skill_name="maya-bevel") to inspect schemas
# → load_skill("maya-bevel") only when selected
# → tools/call maya_bevel__bevel to execute
# Do not treat the first tools/list page as complete; follow nextCursor if listing.
handle.shutdown()

Pattern 2: Return structured results (always use factories)

python
from dcc_mcp_core import success_result, error_result, from_exception

# All actions should return ActionResultModel
def my_action(params):
    try:
        result = do_work(params)
        return success_result(
            f"Created {result['name']}",
            prompt="Object created. You can now modify its properties.",
            object_name=result["name"],
        )
    except Exception as e:
        return from_exception(str(e), message="Action failed")

Pattern 3: Validate action inputs

python
import json
from dcc_mcp_core import ToolValidator, error_result

schema = json.dumps({
    "type": "object",
    "required": ["name", "radius"],
    "properties": {
        "name": {"type": "string", "maxLength": 64},
        "radius": {"type": "number", "minimum": 0.001},
    },
})
validator = ToolValidator.from_schema_json(schema)
ok, errors = validator.validate(json.dumps(params))
if not ok:
    return error_result("Invalid parameters", "; ".join(errors))

Pattern 4: Connect to a running DCC via IPC

python
from dcc_mcp_core import DccLinkFrame, IpcChannelAdapter, success_result, error_result

# Connect to a DCC process via named pipe / Unix domain socket
channel = IpcChannelAdapter.connect("dcc-mcp-maya-12345")
try:
    # Send a Call frame and receive the reply
    channel.send_frame(DccLinkFrame(msg_type=1, seq=1, body=b'{"method":"execute_python","params":"cmds.sphere()"}'))
    reply = channel.recv_frame()  # DccLinkFrame
    if reply.msg_type == 2:  # Reply
        return success_result(reply.body.decode())
    else:
        return error_result("DCC call failed", reply.body.decode())
finally:
    channel.shutdown() if hasattr(channel, 'shutdown') else None

Pattern 5: Build a DCC adapter with DccServerBase

python
from pathlib import Path
from dcc_mcp_core import DccServerBase, DccServerOptions

class BlenderMcpServer(DccServerBase):
    def __init__(self, port: int = 8765, **kwargs):
        opts = DccServerOptions.from_env(
            "blender",
            Path(__file__).parent / "skills",
            port=port,
            **kwargs,
        )
        super().__init__(options=opts)

    def _version_string(self) -> str:
        import bpy
        return bpy.app.version_string

# All skill methods, hot-reload, gateway are ready:
server = BlenderMcpServer(port=8765)
server.register_builtin_actions()
handle = server.start()
print(f"MCP: {handle.mcp_url()}")

Pattern 6: Watch skills for live reload

python
from dcc_mcp_core import SkillWatcher

watcher = SkillWatcher(debounce_ms=300)
watcher.watch("/my/dev/skills")  # immediate load + start watching

# Get always-up-to-date snapshot
current_skills = watcher.skills()  # -> List[SkillMetadata]

Pattern 7: ActionDispatcher with handlers

python
import json
from dcc_mcp_core import ToolRegistry, ToolDispatcher

reg = ToolRegistry()
reg.register("create_sphere",
    input_schema=json.dumps({"type": "object", "required": ["radius"],
                              "properties": {"radius": {"type": "number", "minimum": 0.0}}}))

dispatcher = ToolDispatcher(reg)
dispatcher.register_handler("create_sphere", lambda params: {"created": True, "r": params["radius"]})

# Introspect handlers
dispatcher.has_handler("create_sphere")  # True
dispatcher.handler_count()               # 1
dispatcher.handler_names()               # ["create_sphere"]
dispatcher.remove_handler("create_sphere")  # True

result = dispatcher.dispatch("create_sphere", json.dumps({"radius": 2.0}))
# result == {"action": "create_sphere", "output": {"created": True, "r": 2.0}, "validation_skipped": False}

Pattern 8: DCC main-thread safety

Most DCC applications (Maya, Blender, Houdini) require scene API calls on their main thread. For Python adapters, prefer the public host bridge/dispatcher stack and pass it through DccServerOptions before skills are loaded. Low-level DeferredExecutor details are covered in docs/guide/dcc-thread-safety.md.

python
from pathlib import Path
from dcc_mcp_core import DccServerBase, DccServerOptions, HostExecutionBridge, InProcessCallableDispatcher

dispatcher = InProcessCallableDispatcher()  # replace with the DCC UI-thread dispatcher
bridge = HostExecutionBridge(dispatcher=dispatcher)
opts = DccServerOptions.from_env("maya", Path("skills"), execution_bridge=bridge)
server = DccServerBase(options=opts)
handle = server.start()

Pattern 9: Write skill scripts with skill_entry

python
from dcc_mcp_core.skill import skill_entry, skill_success, skill_error, skill_exception

@skill_entry
def create_sphere(radius: float = 1.0, name: str = "sphere") -> dict:
    import maya.cmds as cmds
    obj = cmds.polySphere(r=radius, n=name)[0]
    return skill_success(
        f"Created sphere '{obj}' with radius {radius}",
        prompt="You can now adjust properties or add materials.",
        object_name=obj,
        radius=radius,
    )

Pattern 10: Launch an isolated DCC child

Use child-only environment overrides instead of mutating os.environ when multiple artist and automation sessions share a machine:

python
from dcc_mcp_core import PyDccLauncher

launcher = PyDccLauncher()
info = launcher.launch(
    name="nuke-mcp",
    executable="Nuke15.2",
    args=["--disable-nuke-frameserver", "project.nk"],
    environment={
        "NUKE_DISABLE_FRAMESERVER": "1",
        "DCC_MCP_NUKE_PORT": "0",
    },
    working_directory="/projects/solar-system",
)

Creating a Custom Skill (Zero Python Code)

bash
# 1. Create directory structure
mkdir -p my-tool/scripts/

# 2. Write SKILL.md (name is required, follows agentskills.io spec)
cat > my-tool/SKILL.md << 'EOF'
---
name: my-tool
description: "My custom DCC automation tools. Use when automating scene setup or batch operations."
compatibility: "python>=3.7"
allowed-tools: "python"
metadata:
  dcc-mcp:
    dcc: maya
    version: "1.0.0"
    layer: example
    tags: ["automation", "custom"]
    tools: tools.yaml
---

# My Tool

Automation scripts for Maya workflow optimization.
EOF

# 3. Add the sibling tool declaration referenced by metadata.dcc-mcp.tools
cat > my-tool/tools.yaml << 'YEOF'
tools:
  - name: list_selected
    description: List selected objects in the Maya scene.
    input_schema:
      type: object
      properties: {}
    read_only: true
    idempotent: true
    source_file: scripts/list_selected.py
YEOF

# 4. Add a script
cat > my-tool/scripts/list_selected.py << 'PYEOF'
#!/usr/bin/env python3
"""List selected objects in the Maya scene."""
import json

result = {"selected": ["pSphere1", "pCube1"], "count": 2}
print(json.dumps(result))
PYEOF

# 5. Use it
export DCC_MCP_SKILL_PATHS="$(pwd)/my-tool"
python -c "
from dcc_mcp_core import scan_and_load
skills, _ = scan_and_load(dcc_name='maya')
print(f'Loaded: {[s.name for s in skills]}')
# Action: my_tool__list_selected
"

Architecture Overview

┌─────────────────────────────────────────────────────┐
│                   Python Layer                       │
│  dcc_mcp_core/__init__.py  →  _core (PyO3 cdyll)   │
│  380+ public symbols re-exported from Rust core      │
│  + Pure-Python: DccServerBase, DccServerOptions,     │
│    gateway election, hot-reload, factory, helpers    │
└──────────────────────┬──────────────────────────────┘
                       │ PyO3 bindings
┌──────────────────────▼──────────────────────────────┐
│        Rust Workspace (47 members total)             │
│        46 functional crates + workspace-hack         │
│  naming → models → actions → skills → protocols     │
│  gateway/http-types/http-server/http-py/http         │
│  host → transport → process → sandbox → telemetry   │
└─────────────────────────────────────────────────────┘

Environment Variables

VariablePurpose
DCC_MCP_SKILL_PATHSColon/semicolon-separated paths to scan for SKILL.md dirs
DCC_MCP_{APP}_SKILL_PATHSPer-app skill paths (e.g. DCC_MCP_MAYA_SKILL_PATHS)
DCC_MCP_GATEWAY_PORTGateway port for multi-DCC setup
DCC_MCP_REGISTRY_DIRDirectory for FileRegistry JSON
MCP_LOG_LEVELLog level override (DEBUG, INFO, WARN)
DCC_MCP_IPC_ADDRESSIPC endpoint address (auto-set by register_diagnostic_handlers)
DCC_MCP_GATEWAY_PROBE_INTERVALSeconds between gateway health probes (default 1)
DCC_MCP_GATEWAY_PROBE_TIMEOUTTimeout per probe in seconds (default 2)
DCC_MCP_GATEWAY_PROBE_FAILURESConsecutive failures before election (default 2)

Key Files in This Repository

FilePurpose
AGENTS.mdAI agent navigation map — entry point, decision tables, top traps
docs/guide/agents-reference.mdDetailed agent rules — traps, do/don't, code style, project-specific architecture, iteration playbook
llms.txtConcise API reference for LLMs
llms-full.txtComprehensive API reference with all examples
python/dcc_mcp_core/__init__.pyComplete public API (380+ symbols, ground truth for imports)
python/dcc_mcp_core/_core.pyiGenerated type stubs — authoritative parameter names after a dev/stub build
examples/skills/15 complete skill package examples
tests/Python integration tests (executable usage examples)

Supported DCC Software

  • Autodesk Maya — MEL/Python scripting (dcc: maya)
  • Blender — Python API (dcc: blender)
  • SideFX Houdini — HScript/Python (dcc: houdini)
  • Autodesk 3ds Max — MaxScript/Python (dcc: 3dsmax)
  • Any DCC — Generic Python wrapper (dcc: python)

Related Projects

MCP Specification Roadmap

The library currently implements MCP 2025-03-26 (Streamable HTTP). The ecosystem has since released:

VersionKey FeaturesStatus in dcc-mcp-core
2025-03-26Streamable HTTP, Tool Annotations, OAuth 2.1Implemented
2025-06-18Structured Tool Output, Elicitation, Resource Links, JSON-RPC batching removed, MCP-Protocol-Version header mandatoryPlanned
2025-11-25Icon metadata, Tasks (experimental), Sampling with tool calls, JSON Schema 2020-12, enhanced OAuthPlanned

AI Agents: Do NOT implement draft features manually. Wait for dcc-mcp-core to expose them via McpHttpServer. Track progress at the GitHub repository.

Iteration Playbook

Repeating work in a DCC host has three shipped moves. Full details live in the Iteration Playbook section of docs/guide/agents-reference.md.

  1. Reuse a materialized script — materialize_script(..., reuse=True, reuse_key="...") returns a derived, stable file_path ({reuse_key}_{sha256[:12]} under ~/.dcc-mcp/<dcc_type>/temp/<instance_id>/<session_id>/); a byte-identical repeat comes back with reused=True instead of writing a second copy. resolve_materialized_script re-verifies hash + expiry and fails closed.
  2. Change a value, not the script — re-send the same file_path with a new params object. The contract is FileBackedScriptExecutionParams; params is derived from main(**params) by derive_script_parameters_schema (parsed with ast, never executed). No CLI flag, no params file, no re-materialize.
  3. Resume an interrupted workflow — workflows_resume takes workflow_id plus optional force_steps / expected_spec_hash / strict. It is Rust-only (MCP tools/call or REST /v1/call) and needs WorkflowStorage + the job-persist-sqlite feature.

Common Pitfalls

  1. scan_and_load returns (List[SkillMetadata], List[str]) — always unpack: skills, skipped = scan_and_load(...)
  2. Prefer public HostExecutionBridge / dispatcher wiring; use DeferredExecutor only when following docs/guide/dcc-thread-safety.md low-level guidance
  3. Register ALL actions before server.start() — server reads from registry at startup only
  4. Use IpcChannelAdapter + DccLinkFrame for IPC (v0.14+) — FramedChannel/connect_ipc were removed in #251
  5. ToolDispatcher(registry) takes ONE arg — no validator= parameter
  6. Action naming: {skill_name.replace('-','_')}__{script_stem} (double underscore)
  7. SKILL.md name must match parent directory name (agentskills.io spec)
  8. allowed-tools in SKILL.md is space-separated string, not a list (agentskills.io spec)
  9. DccServerBase provides all skill/lifecycle/gateway/hot-reload methods — don't reimplement
  10. MCP 2025-06-18 removes JSON-RPC batching — do not implement batch calls manually
  11. MCP-Protocol-Version header is mandatory in 2025-06-18 — handled by McpHttpServer internally

常见问题

Dcc Mcp Core AI 技能有什么作用?

面向 DCC Model Context Protocol(MCP)生态系统的基础库。提供由 Rust 驱动的操作管理、技能系统、IPC 传输、MCP Streamable HTTP 服务器(符合 2025-03-26 规范,并支持识别 2025-06-18 和 2025-11-25 版本)、沙盒安全、共享记忆、屏幕捕获、USD 场景支持,以及用于 AI 辅助 DCC 工作流的遥测功能。适用于 Maya、Blender、Houdini、3ds Max 或任何 DCC MCP 集成场景。

为什么在 TypingMind 中使用 Dcc Mcp Core?

因为您只需安装一次,就能搭配任何模型使用。Dcc Mcp Core 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Dcc Mcp Core?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/dcc-mcp/dcc-mcp-core/tree/main/.agents/skills/dcc-mcp-core。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Dcc Mcp Core?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Dcc Mcp Core 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Dcc Mcp Core 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Dcc Mcp Core AI 技能免费吗?

是的。dcc-mcp 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇