DN

dughogan/nuke_mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

40 stars 5 forks 품질 59 트렌드 12

MCP Server 및 Nuke용 도구 코드

개요

모델 Context Protocol (MCP)을 사용하여 Foundry의 Nuke 및 AI 시스템 간의 교량. Nuke-MCP는 AI 조수가 소켓 연결을 통해 Nuke와 상호 작용할 수 있도록 합니다. - Nuke 스크립트에 대한 정보를 얻기 - 생성, 수정, 삭제 노드 - 노드 그래프의 위치 노드 - 노드를 연결 - 제어 재생 및 렌더링 - Nuke의 임의 파이썬 코드를 실행 1. (nuke mcp addon.py) : Nuke 2. (nuke mcp server.py) 내 소켓 서버를 생성하는 Nuke 스크립트 : Nuke addon에 연결하고 AI 시스템에 도구를 노출하는 Python 서버 3. (main.py) : MCP 서버를 시작하는 간단한 스크립트 - Foundry's Nuke (최근 버전이 작동해야 함) - Python 3.7+ - FastMCP 패키지 - Claude Desktop 1. 복제 또는 다운로드 이 저장소 2. 복사 nuke mcp addon.py 당신의 Nuke 스크립트 폴더 또는 Nuke Python 경로의 위치 1. : - nuke mcp addon을 가져 가라.

개요(AI 번역)

모델 Context Protocol (MCP)을 사용하여 Foundry의 Nuke 및 AI 시스템 간의 교량.

개요

Nuke-MCP는 AI 조수가 소켓 연결을 통해 Nuke와 상호 작용할 수 있도록 합니다.

  • Nuke 스크립트에 대한 정보를 얻기
  • 생성, 수정 및 삭제 노드
  • 노드 그래프의 위치 노드
  • 노드 연결
  • 제어 재생 및 렌더링
  • Nuke의 arbitrary Python 코드 실행

부품

  1. **Nuke Addon ** (nuke_mcp_addon.py): Nuke 내에서 소켓 서버를 만드는 Nuke 스크립트
  2. ** MCP 서버 ** (nuke_mcp_server.py): Nuke addon에 연결하고 AI 시스템에 도구를 노출하는 Python 서버
  3. ** 엔트리 포인트 ** (main.py): MCP 서버를 시작하는 간단한 스크립트

설치

# 필수품

  • Foundry’s Nuke (최근 버전이 작동해야 함)
  • 파이썬 3.7+
  • FastMCP 패키지
  • Claude 데스크탑

FastMCP 패키지 설치

Nuke-MCP 설치

  1. Clone 또는 다운로드 이 저장소
  2. 복사 nuke_mcp_addon.py 당신의 Nuke 스크립트 폴더 또는 Nuke Python 경로의 위치

사용법

Nuke Addon 설치

  1. ** Addon 파일 복사 **:
  • `nuke mcp addon 을 가져 가라.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Nuke-MCP

A bridge between The Foundry’s Nuke and AI systems using the Model Context Protocol (MCP).

Overview

Nuke-MCP allows AI assistants to interact with Nuke through a socket connection, enabling them to:

  • Get information about Nuke scripts
  • Create, modify, and delete nodes
  • Position nodes in the node graph
  • Connect nodes together
  • Control playback and rendering
  • Execute arbitrary Python code in Nuke

Components

  1. Nuke Addon (nuke_mcp_addon.py): A Nuke script that creates a socket server within Nuke
  2. MCP Server (nuke_mcp_server.py): A Python server that connects to the Nuke addon and exposes tools to AI systems
  3. Entry Point (main.py): A simple script to start the MCP server

Installation

Prerequisites

  • The Foundry’s Nuke (any recent version should work)
  • Python 3.7+
  • FastMCP package
  • Claude Desktop

Installing the FastMCP package

pip install fastmcp

Installing Nuke-MCP

  1. Clone or download this repository
  2. Copy nuke_mcp_addon.py to your Nuke scripts folder or a location in your Nuke Python path

Usage

Installing the Nuke Addon

  1. Copy the Addon File:

    • Take the nuke_mcp_addon.py file and place it in a location where Nuke can find it:
      • Copy it to your Nuke scripts folder (usually in ~/.nuke/python on Linux/Mac or in your home directory on Windows)
      • Or place it in a folder that’s in your Nuke Python path
  2. Create a Startup Script (Recommended):

    • Create or edit an existing init.py file in your .nuke directory
    • Add the following line to automatically load the addon when Nuke starts and making sure you’re pointing to the python subfolder where the MCP tools live:
      nuke.pluginAddPath("./python")
      
      import nuke_mcp_addon
      
  3. Manual Loading (Alternative):

    • If you don’t want to load it automatically, you can manually load it each time by:
      • Opening Nuke
      • Make sure you have a python subfolder setup in the init.py where the MCP tools live
      • Going to the Script Editor panel
      • Running import nuke_mcp_addon

Docking the NukeMCP Panel

By default, the NukeMCP panel opens as a floating window. If you prefer to have it docked in Nuke’s interface, you can modify the NukeMCPPanel class in nuke_mcp_addon.py:

# Find the NukeMCPPanel class definition (around line 380)
class NukeMCPPanel(nukescripts.PythonPanel):
    def __init__(self):
        nukescripts.PythonPanel.__init__(self, 'Nuke MCP', 'com.example.NukeMCP')
        # ... existing code ...

# Add this method to enable docking
    def addToPane(self):
        pane = nuke.getPaneFor('Properties.1')
        if not pane:
            pane = nuke.getPaneFor('Viewer.1')
        self.setMinimumSize(300, 200)  # Set a reasonable minimum size
        return pane.addPermanentAsQWidget(self)

# Modify the show_panel function to use docking
def show_panel():
    """Show the NukeMCP panel"""
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "nuke": { "command": "python", "args": [ "/path/to/your/nuke-mcp/main.py" ], "trusted": true } } }