Skip to main content

Multi-protocol IPC adapter layer for DCC software integration with Model Context Protocol

Project description

DCC-MCP-IPC

DCC-MCP-IPC Logo

PyPI version CI Python Version License Code style: black Ruff

Multi-protocol IPC adapter layer for DCC software integration with Model Context Protocol (MCP).

Built on top of dcc-mcp-core (Rust/PyO3 backend), it provides a high-performance, type-safe framework for exposing DCC functionality as MCP tools across multiple transport protocols.

Documentation: docs site | v2.0.0 (Unreleased) — Breaking changes ahead, see CHANGELOG.md

Why DCC-MCP-IPC?

Feature Description
Protocol-agnostic RPyC for embedded-Python DCCs (Maya/Houdini/Blender), HTTP for Unreal/Unity, WebSocket, and Rust-native IPC for maximum throughput.
Zero-code Skills Drop a SKILL.md file into a directory — SkillManager auto-registers it as an MCP tool. No Python boilerplate needed.
Rust-powered core Action dispatch, validation, and telemetry handled by dcc-mcp-core via PyO3; Python layer focuses on DCC-specific glue code.
Hot-reload skills SkillWatcher monitors skill directories and re-registers tools on file changes without restarting the DCC.
Service discovery ZeroConf (mDNS) + file-based fallback for automatic DCC server detection.
Connection pooling ConnectionPool with auto-discovery for efficient client-side connection reuse.

Features

  • Thread-safe RPyC / HTTP / WebSocket / Rust-native IPC server implementations
  • Skills system — zero-code MCP tool registration from SKILL.md frontmatter with hot-reload
  • Action system backed by ActionRegistry + ActionDispatcher (Rust) — JSON-serialised parameter dispatch
  • Transport factory — pluggable transport layer (rpyc, http, websocket, ipc)
  • Service discovery: ZeroConf (mDNS) + file-based fallback via ServiceDiscoveryFactory
  • Async client (asyncio) for non-blocking operations
  • Abstract base classes for creating DCC-specific adapters (DCCAdapter) and services
  • Application adapter pattern for generic app integration
  • Scene & snapshot interfaces over RPyC and HTTP transports
  • Mock DCC services for testing without actual DCC applications
  • Comprehensive error handling with custom exception hierarchy

Architecture

graph TD
    A[AI Assistant / MCP Client] --> B[MCP Server Layer]
    B --> C[ActionAdapter\nActionRegistry + ActionDispatcher]
    C --> D[RPyC Transport\nDCC Python env]
    C --> E[IPC Transport\nRust FramedChannel]
    C --> F[HTTP Transport\nUnreal / Unity REST]
    C --> G[WebSocket Transport]
    G[SkillManager\nSKILL.md auto-discovery] --> C
    H[dcc-mcp-core\nRust/PyO3 backend] --> C
    D --> I[DCC App\nMaya / Houdini / Blender]
    E --> I
    F --> J[DCC App\nUnreal / Unity]

    style C fill:#e1f5fe
    style H fill:#fff3e0
    style G fill:#e8f5e9

Key Components

Component Module Description
ActionAdapter action_adapter.py Wraps Rust ActionRegistry + ActionDispatcher; registers handlers and dispatches JSON-parameterised calls
SkillManager skills/scanner.py Scans directories for SKILL.md skills, registers them as action handlers, supports hot-reload
DCCServer server/dcc.py Manages the RPyC/IPC server lifecycle inside a DCC process
BaseDCCClient client/base.py Core client connection/call logic with auto-discovery
ConnectionPool client/pool.py Connection pooling for efficient resource management
IpcClientTransport / IpcServerTransport transport/ipc_transport.py Rust-native framed-channel IPC, registered as "ipc" protocol
ServiceDiscoveryFactory discovery/factory.py Strategy-pattern selector for ZeroConf or file-based discovery
MockDCCService testing/mock_services.py Simulates DCC applications for testing

Installation

pip install dcc-mcp-ipc

With optional ZeroConf support:

pip install "dcc-mcp-ipc[zeroconf]"

Or with Poetry:

poetry add dcc-mcp-ipc

Requirements

  • Python >= 3.8 (< 4.0)
  • dcc-mcp-core >= 0.12.0 (< 1.0.0)
  • rpyc >= 6.0.0 (< 7.0.0)
  • Optional: zeroconf >= 0.38.0 for mDNS discovery

Quick Start

Server-side (within DCC application)

<augment_code_snippet path="README.md" mode="EXCERPT">

from dcc_mcp_ipc.server import create_dcc_server, DCCRPyCService


class MayaService(DCCRPyCService):
    def get_scene_info(self):
        return {"scene": "Maya scene info"}

    def exposed_execute_cmd(self, cmd_name, *args, **kwargs):
        pass


server = create_dcc_server(
    dcc_name="maya",
    service_class=MayaService,
    port=18812,
)
server.start(threaded=True)

</augment_code_snippet>

Client-side

<augment_code_snippet path="README.md" mode="EXCERPT">

from dcc_mcp_ipc.client import BaseDCCClient


client = BaseDCCClient("maya", host="localhost", port=18812)
client.connect()
result = client.call("get_scene_info")
client.disconnect()

</augment_code_snippet>

Usage Guide

Action System (v2.0.0+)

The Action system is built on the Rust-backed ActionRegistry + ActionDispatcher. All parameters are JSON-serialised:

<augment_code_snippet path="README.md" mode="EXCERPT">

from dcc_mcp_ipc.action_adapter import ActionAdapter, get_action_adapter


adapter = get_action_adapter("maya")


def create_sphere(radius: float = 1.0, name: str = "sphere1") -> dict:
    return {"success": True, "message": f"Created {name}", "context": {"name": name}}


adapter.register_action(
    "create_sphere",
    create_sphere,
    description="Create a sphere primitive",
    category="modeling",
    tags=["primitive", "mesh"],
)


result = adapter.call_action("create_sphere", radius=2.0, name="mySphere")
print(result.success)   # True
print(result.to_dict()) # {"success": True, ...}

</augment_code_snippet>

Zero-code Skills via SkillManager

Drop a SKILL.md file into a directory structure:

my_skills/
  create_light/
    SKILL.md      # frontmatter: name, description, tools, scripts
    run.py        # executed when the tool is called

<augment_code_snippet path="README.md" mode="EXCERPT">

from dcc_mcp_ipc.skills import SkillManager
from dcc_mcp_ipc.action_adapter import get_action_adapter


adapter = get_action_adapter("maya")
mgr = SkillManager(adapter=adapter, dcc_name="maya")

mgr.load_paths(["/pipeline/skills"])
mgr.start_watching()

# Now "create_light" is callable as an MCP tool
result = adapter.call_action("create_light", intensity=100.0)

</augment_code_snippet>

Connection Pool

<augment_code_snippet path="README.md" mode="EXCERPT">

from dcc_mcp_ipc.client import ConnectionPool


pool = ConnectionPool()

with pool.get_client("maya", host="localhost") as client:
    result = client.call("execute_cmd", "sphere", radius=5)
    print(result)

</augment_code_snippet>

Service Factories

Three factory patterns are available for different lifecycle needs:

<augment_code_snippet path="README.md" mode="EXCERPT">

from dcc_mcp_ipc.server import (
    create_service_factory,
    create_shared_service_instance,
    create_raw_threaded_server,
)


class SceneManager:
    def __init__(self):
        self.scenes = {}

    def add_scene(self, name, data):
        self.scenes[name] = data


scene_manager = SceneManager()

# Per-connection instance
service_factory = create_service_factory(MayaService, scene_manager)

# Shared singleton instance
shared_service = create_shared_service_instance(MayaService, scene_manager)

# Raw threaded server
server = create_raw_threaded_server(service_factory, port=18812)
server.start()

</augment_code_snippet>

Rust-native IPC Transport

Zero-copy low-latency messaging via the Rust core:

<augment_code_snippet path="README.md" mode="EXCERPT">

import os
from dcc_mcp_core import TransportAddress
from dcc_mcp_ipc.transport.ipc_transport import (
    IpcClientTransport,
    IpcServerTransport,
    IpcTransportConfig,
)

# Client side
config = IpcTransportConfig(host="localhost", port=19000)
transport = IpcClientTransport(config)
transport.connect()
result = transport.execute("get_scene_info")
transport.disconnect()

# Server side (inside DCC plugin)
def handle_channel(channel):
    msg = channel.recv()
    # process and respond ...

addr = TransportAddress.default_local("maya", os.getpid())
server = IpcServerTransport(addr, handler=handle_channel)
bound_addr = server.start()

</augment_code_snippet>

Creating a Custom DCC Adapter

<augment_code_snippet path="README.md" mode="EXCERPT">

from dcc_mcp_ipc.adapter import DCCAdapter
from dcc_mcp_ipc.client import BaseDCCClient


class MayaAdapter(DCCAdapter):
    def _initialize_client(self) -> None:
        self.client = BaseDCCClient(
            dcc_name="maya",
            host=self.host,
            port=self.port,
            connection_timeout=self.connection_timeout,
        )

    def create_sphere(self, radius: float = 1.0):
        self.ensure_connected()
        assert self.client is not None
        return self.client.execute_dcc_command(f"sphere -r {radius};")

</augment_code_snippet>

Async Client

<augment_code_snippet path="README.md" mode="EXCERPT">

import asyncio
from dcc_mcp_ipc.client.async_dcc import AsyncDCCClient


async def main():
    client = AsyncDCCClient("maya", host="localhost", port=18812)
    await client.connect()
    result = await client.call("get_scene_info")
    await client.disconnect()


asyncio.run(main())

</augment_code_snippet>

Testing with Mock Services

<augment_code_snippet path="README.md" mode="EXCERPT">

import threading
from dcc_mcp_ipc.testing.mock_services import MockDCCService
from dcc_mcp_ipc.client import BaseDCCClient


server = MockDCCService.start(port=18812)

client = BaseDCCClient("mock_dcc", host="localhost", port=18812)
client.connect()
info = client.get_dcc_info()
print(info)  # {"name": "mock_dcc", ...}
client.disconnect()
server.stop()

</augment_code_snippet>

Development

Setup

git clone https://github.com/loonghao/dcc-mcp-ipc.git
cd dcc-mcp-ipc
poetry install

Running Tasks

nox -s pytest          # Run tests
nox -s lint            # Lint (mypy + ruff + isort)
nox -s lint-fix        # Auto-fix lint issues
nox -s build           # Build distribution packages

Project Structure

dcc-mcp-ipc/
├── src/dcc_mcp_ipc/
│   ├── __init__.py              # Lazy-import public API surface
│   ├── action_adapter.py         # Action system (Rust-backed)
│   ├── adapter/                  # DCC & application adapters
│   ├── client/                   # Synchronous & async clients + pool
│   ├── server/                   # RPyC server + factories + lifecycle
│   ├── transport/                # RPyC / HTTP / WS / IPC transports
│   ├── discovery/                # ZeroConf + file-based service discovery
│   ├── skills/                   # SkillManager zero-code system
│   ├── scene/                    # Scene operations interface
│   ├── snapshot/                 # Snapshot interface
│   ├── application/              # Generic application adapter/service/client
│   ├── testing/                  # Mock services for testing
│   └── utils/                    # Errors, DI, decorators, RPyC helpers
├── tests/                        # 68 test files mirroring source layout
├── examples/                     # Usage examples
├── docs/                         # VitePress documentation site
└── nox_actions/                  # Nox task definitions

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dcc_mcp_ipc-2.0.0.tar.gz (86.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcc_mcp_ipc-2.0.0-py3-none-any.whl (118.6 kB view details)

Uploaded Python 3

File details

Details for the file dcc_mcp_ipc-2.0.0.tar.gz.

File metadata

  • Download URL: dcc_mcp_ipc-2.0.0.tar.gz
  • Upload date:
  • Size: 86.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dcc_mcp_ipc-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b72da8466ceaba995963fc64cc2c8490db003301eeacc8b01c30040b348f4f88
MD5 7c17221faedd257daf28f308407a248f
BLAKE2b-256 42821b6880d3f4131fde485425141663a4999a1e59d85f3473047c8fac967a6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcc_mcp_ipc-2.0.0.tar.gz:

Publisher: release-please.yml on loonghao/dcc-mcp-ipc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dcc_mcp_ipc-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: dcc_mcp_ipc-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 118.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dcc_mcp_ipc-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d05d9b8c865517e2f30c25a62ad48e61c7da28e3cec1860e153d856337b0ec8f
MD5 ef72d1f2b603a61c5f15d387c7842094
BLAKE2b-256 3f11a721ffa13b657995a87980510957ada7104b2dc16117e6d4c8ea0b83896c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcc_mcp_ipc-2.0.0-py3-none-any.whl:

Publisher: release-please.yml on loonghao/dcc-mcp-ipc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page