Skip to main content
Glama

Blender MCP Server

by cwahlfeldt

Servidor MCP de Blender

Un servidor de Protocolo de Contexto de Modelo (MCP) para administrar y ejecutar scripts de Blender.

Características

  • Agregar, editar, ejecutar y eliminar scripts de Python de Blender
  • Ejecutar scripts en un entorno Blender sin interfaz gráfica
  • Ver resultados de ejecución y errores
  • Metadatos del script de seguimiento (fecha de creación, última modificación, número de ejecuciones)

Requisitos

  • Python 3.7+
  • Blender instalado y accesible
  • Biblioteca MCP ( pip install mcp )

Uso

  1. Iniciar el servidor:
    python server.py
  2. Conéctese al servidor mediante un cliente MCP (como Claude Desktop)
  3. Utilice las herramientas proporcionadas para administrar scripts:
    • add_script(name, content) - Agregar un nuevo script
    • edit_script(name, content) - Editar un script existente
    • execute_script(name, blend_file=None) - Ejecuta un script en Blender, especificando opcionalmente un archivo .blend
    • remove_script(name) - Eliminar un script
  4. Acceda a recursos para obtener información:
    • scripts://list - Obtener la lista de scripts disponibles
    • script://{name} - Obtener el contenido de un script específico
    • result://{name} - Obtener el resultado de la ejecución de un script

Ejemplos

Ejemplo básico

# 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

Trabajar con archivos 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

Cómo funciona

  1. Cuando se agrega un script, se almacena en el directorio script_files/scripts
  2. Cuando se ejecuta, el script se ejecuta en una instancia de Blender sin cabeza.
    • Si se especifica un archivo de mezcla, Blender abrirá ese archivo antes de ejecutar el script
    • De lo contrario, se utiliza una escena de Blender vacía predeterminada.
  3. La salida y los errores se capturan y almacenan en el directorio script_files/results
  4. Los metadatos sobre los scripts se rastrean en script_files/metadata.json

Instalación

  1. Clonar este repositorio
  2. Instalar la biblioteca MCP: pip install mcp
  3. Asegúrese de que Blender esté instalado y sea accesible desde su PATH

Licencia

Instituto Tecnológico de Massachusetts (MIT)

-
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.

Un servidor de protocolo de contexto de modelo que permite la gestión y ejecución de scripts de Python de Blender, permitiendo a los usuarios crear, editar y ejecutar scripts en un entorno de Blender sin cabeza a través de interfaces de lenguaje natural.

  1. Características
    1. Requisitos
      1. Uso
        1. Ejemplos
          1. Ejemplo básico
          2. Trabajar con archivos Blend
        2. Cómo funciona
          1. Instalación
            1. Licencia

              Related MCP Servers

              • -
                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
                A
                license
                -
                quality
                A streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.
                Last updated -
                15
                Python
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Python-based implementation of the Model Context Protocol that enables communication between a model context management server and client through a request-response architecture.
                Last updated -
                Python
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                Model Context Protocol server to run Python code in a sandbox.
                Last updated -
                1,462
                11,454
                Python
                MIT License

              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