Blender MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Allows management and execution of Python scripts in a headless Blender environment, including creating 3D objects, analyzing scenes, and manipulating Blender projects through a scriptable interface.

  • Enables writing and executing Python scripts specifically for Blender automation, with support for tracking script metadata and capturing execution results.

블렌더 MCP 서버

Blender 스크립트를 관리하고 실행하기 위한 MCP(Model Context Protocol) 서버입니다.

특징

  • Blender Python 스크립트 추가, 편집, 실행 및 제거
  • 헤드리스 Blender 환경에서 스크립트 실행
  • 실행 결과 및 오류 보기
  • 스크립트 메타데이터 추적(생성 날짜, 마지막 수정 날짜, 실행 횟수)

요구 사항

  • 파이썬 3.7 이상
  • 블렌더 설치 및 접근 가능
  • MCP 라이브러리( pip install mcp )

용법

  1. 서버를 시작합니다:지엑스피1
  2. MCP 클라이언트(Claude Desktop 등)를 사용하여 서버에 연결합니다.
  3. 제공된 도구를 사용하여 스크립트를 관리하세요.
    • add_script(name, content) - 새 스크립트 추가
    • edit_script(name, content) - 기존 스크립트 편집
    • execute_script(name, blend_file=None) - Blender에서 스크립트를 실행하며, 선택적으로 .blend 파일을 지정합니다.
    • remove_script(name) - 스크립트 제거
  4. 정보를 얻을 수 있는 리소스에 접속하세요:
    • scripts://list - 사용 가능한 스크립트 목록 가져오기
    • script://{name} - 특정 스크립트의 내용을 가져옵니다.
    • result://{name} - 스크립트 실행 결과 가져오기

예시

기본 예제

# Add a simple script add_script("hello_cube", ''' import bpy # Clear existing objects bpy.ops.object.select_all(action='SELECT') bpy.ops.object.delete() # Create a cube bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 0)) print("Cube created!") ''') # Execute the script execute_script("hello_cube") # Get the result # Access using: result://hello_cube

블렌드 파일 작업

# Add a script that works with a blend file add_script("analyze_scene", ''' import bpy # Print information about the current scene print(f"Current Blender version: {bpy.app.version_string}") print(f"Current file: {bpy.data.filepath}") # List all objects in the scene print("\\nObjects in the scene:") for obj in bpy.data.objects: print(f" - {obj.name} ({obj.type})") ''') # Execute with a specific blend file execute_script("analyze_scene", blend_file="/path/to/your/project.blend") # Get the result # Access using: result://analyze_scene

작동 원리

  1. 스크립트가 추가되면 script_files/scripts 디렉토리에 저장됩니다.
  2. 스크립트가 실행되면 헤드리스 Blender 인스턴스에서 실행됩니다.
    • 블렌드 파일이 지정된 경우 Blender는 스크립트를 실행하기 전에 해당 파일을 엽니다.
    • 그렇지 않으면 기본 빈 Blender 장면이 사용됩니다.
  3. 출력 및 오류는 script_files/results 디렉토리에 캡처되어 저장됩니다.
  4. 스크립트에 대한 메타데이터는 script_files/metadata.json 에서 추적됩니다.

설치

  1. 이 저장소를 복제하세요
  2. MCP 라이브러리를 설치하세요: pip install mcp
  3. Blender가 설치되어 PATH에서 접근 가능한지 확인하세요.

특허

MIT

-
security - not tested
F
license - not found
-
quality - not tested

Blender Python 스크립트의 관리 및 실행을 허용하는 모델 컨텍스트 프로토콜 서버로, 사용자는 자연어 인터페이스를 통해 헤드리스 Blender 환경에서 스크립트를 만들고, 편집하고, 실행할 수 있습니다.

  1. Features
    1. Requirements
      1. Usage
        1. Examples
          1. Basic Example
          2. Working with Blend Files
        2. How It Works
          1. Installation
            1. License
              ID: 4c0jocmt26