Skip to main content
Glama

Blender MCP Server

by cwahlfeldt

Blender MCP サーバー

Blender スクリプトを管理および実行するための Model Context Protocol (MCP) サーバー。

特徴

  • Blender Python スクリプトの追加、編集、実行、削除
  • ヘッドレスBlender環境でスクリプトを実行する
  • 実行結果とエラーを表示する
  • スクリプトのメタデータ(作成日、最終更新日、実行回数)を追跡する

要件

  • Python 3.7以上
  • Blenderがインストールされアクセス可能
  • MCP ライブラリ ( pip install mcp )

使用法

  1. サーバーを起動します。
    python server.py
  2. MCPクライアント(Claude Desktopなど)を使用してサーバーに接続します
  3. 提供されているツールを使用してスクリプトを管理します。
    • add_script(name, content) - 新しいスクリプトを追加する
    • edit_script(name, content) - 既存のスクリプトを編集する
    • execute_script(name, blend_file=None) - オプションで.blendファイルを指定して、Blenderでスクリプトを実行します。
    • 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

Blend ファイルの操作

# 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からアクセスできることを確認してください

ライセンス

マサチューセッツ工科大学

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

local-only server

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

Blender Python スクリプトの管理と実行を可能にするモデル コンテキスト プロトコル サーバー。これにより、ユーザーは自然言語インターフェイスを通じてヘッドレス Blender 環境でスクリプトを作成、編集、実行できるようになります。

  1. 特徴
    1. 要件
      1. 使用法
          1. 基本的な例
          2. Blend ファイルの操作
        1. 仕組み
          1. インストール
            1. ライセンス

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that allows execution of Python code within Daytona workspaces, providing a secure and isolated environment for executing and managing Python scripts.
                Last updated -
                1
                14
                Python
                Apache 2.0
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
                Last updated -
                2
                Python
                MIT License
                • Apple
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
                Last updated -
                1
                Python
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that integrates Claude with Blender, enabling users to analyze and interact with IFC (Industry Foundation Classes) building models through natural language commands.
                Last updated -
                9
                Python
                MIT License
                • Apple

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/cwahlfeldt/blender-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server