Logotipo de blender-open-mcp

blender-open-mcp

Comunidad
dhakalnirajan

Open Models MCP for Blender Using Ollama

Editordhakalnirajan
Repositorioblender-open-mcp
IdiomaPython
Forks
35
Estrellas
117
Herramientas disponibles
0
Tipo de transportestdio, streamable-http
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    blender-open-mcp ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    117 estrellas y 35 forks en el repositorio enlazado.

Blender Open MCP

Local-first Model Context Protocol (MCP) server for controlling a live Blender session from AI agents, with a provider-agnostic LLM backend:

  • Ollama
  • LM Studio
  • llama.cpp server
  • OpenAI (and every OpenAI-compatible endpoint: vLLM, TGI, OpenRouter, Groq, Together, Azure AI Foundry via its OpenAI-compatible surface, …)
  • any server that speaks POST /chat/completions with an optional base URL and API key

Providers are configured at startup (CLI flags or environment variables) and can be switched at runtime through MCP tools, so an agent can hop between backends without restarting the server.

MCP Client ──▶ FastMCP Server ──▶ (TCP 9876) ──▶ Blender add-on (addon.py) ──▶ bpy
                  │
                  └──────────────▶ (HTTP) ──▶ LLM provider (Ollama / LM Studio /
                                               llama.cpp / OpenAI-compatible / Azure)

Repository layout

PathPurpose
addon.pySingle-file Blender add-on: TCP server + scene/render/PolyHaven handlers + sidebar panel
src/blender_open_mcp/server.pyMCP server: Blender tools, PolyHaven tools, LLM prompt + provider tools
src/blender_open_mcp/llm.pyProvider-agnostic LLM layer (registry, adapters, model listing)
src/blender_open_mcp/client/Canonical async MCP client + CLI
client/Thin compat wrapper so from client import … keeps working from source
tests/pytest suites (server, client, addon)

Quick start

1. Install

Requires Python ≥ 3.10.

bash
python -m venv .venv
.venv/Scripts/pip install -e ".[dev]"   # Windows (bash/PowerShell)
# or: source .venv/bin/activate && pip install -e ".[dev]"   # macOS/Linux

2. Enable the Blender add-on

  1. Open Blender.
  2. Edit → Preferences → Add-ons → Install…, choose addon.py.
  3. Enable Blender MCP.
  4. In the 3D Viewport press N, open the Blender MCP tab and click Start MCP Server (listens on localhost:9876 by default).

3. Start the MCP server

Default LLM backend is Ollama:

bash
blender-mcp                          # Ollama at http://localhost:11434, model llama3.2

Or pick a different backend at startup:

bash
# LM Studio (OpenAI-compatible, default localhost:1234/v1)
blender-mcp --llm-provider lmstudio --llm-model "local-model"

# llama.cpp server (default localhost:8080/v1)
blender-mcp --llm-provider llamacpp --llm-model qwen2.5-coder

# OpenAI-compatible generic endpoint
blender-mcp --llm-provider openai_compat --llm-base-url http://my-server:8000/v1 \
            --llm-api-key sk-... --llm-model my-model

# OpenAI
blender-mcp --llm-provider openai --llm-api-key "$OPENAI_API_KEY" --llm-model gpt-4o-mini

# Azure AI Foundry / Azure OpenAI
blender-mcp --llm-provider azure --llm-api-key "$AZURE_API_KEY" \
            --llm-base-url https://my-resource.openai.azure.com \
            --llm-model my-deployment \
            --llm-extra '{"resource":"my-resource","deployment":"my-deployment","api_version":"2024-06-01"}'

Environment variables are honored: BLENDER_OPEN_MCP_PROVIDER, BLENDER_OPEN_MCP_BASE_URL, BLENDER_OPEN_MCP_MODEL, BLENDER_OPEN_MCP_API_KEY.

Other useful flags: --host, --port (MCP endpoint, default 0.0.0.0:8000), --blender-host, --blender-port, --transport streamable_http|http|stdio.

4. Register with an MCP client

Point your MCP client at http://localhost:8000/mcp (streamable HTTP) or run blender-mcp --transport stdio.

Example Claude/Cursor-style config:

json
{
  "mcpServers": {
    "blender": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

Available MCP tools

Scene / object control (forwarded to the Blender add-on over TCP): blender_get_scene_info, blender_get_object_info, blender_create_object, blender_modify_object, blender_delete_object, blender_set_material, blender_render_image, blender_execute_code.

PolyHaven assets: blender_get_polyhaven_categories, blender_search_polyhaven_assets, blender_download_polyhaven_asset, blender_set_texture.

LLM / provider control:

  • blender_ai_prompt – send a prompt to the active backend (per-call provider/base_url/model/api_key overrides supported).
  • blender_get_llm_provider – show active provider config (API key masked).
  • blender_set_llm_provider – switch/configure the backend at runtime.
  • blender_list_llm_models – list models (Ollama /api/tags or OpenAI-compatible /models).

Legacy aliases: blender_set_ollama_model, blender_set_ollama_url, blender_get_ollama_models keep old Ollama-only clients working.

MCP Prompts (prompts/list / prompts/get):

  • blender_build_scene – guided plan for building a scene from a description.
  • blender_review_scene – read-only inspection workflow.
  • blender_configure_llm – provider-switching instructions with examples.

Prompts are registered in src/blender_open_mcp/prompts.py.

Runtime provider switching (examples)

text
# Switch to LM Studio
tool blender_set_llm_provider {"provider":"lmstudio","base_url":"http://localhost:1234/v1","model":"local-model"}

# Switch to llama.cpp
tool blender_set_llm_provider {"provider":"llamacpp","base_url":"http://localhost:8080/v1"}

# Back to Ollama
tool blender_set_llm_provider {"provider":"ollama","base_url":"http://localhost:11434","model":"llama3.2"}

Azure AI Foundry (worked example)

Azure's OpenAI-compatible endpoint is deployment-scoped, so three values from your Azure AI Foundry project are required — all of them go into the extra parameter, and the model you name in model must match the deployment name:

  1. Resource name — in the Azure portal, open your resource (e.g. Azure OpenAI or AI Foundry project) and take the short name from its endpoint URL: https://<resource>.openai.azure.com/....
  2. Deployment name — on the Deployments page, e.g. gpt-4o-mini. This is what you pass as model (it is not the base model name).
  3. API key — on the resource's Keys and Endpoint page.
  4. API version (optional) — e.g. 2024-06-01 (the adapter defaults to it).

Switch to Azure at runtime with a single call (CLI form):

bash
blender-mcp-client --host http://localhost:8000 tool blender_set_llm_provider \
  '{"provider":"azure","api_key":"YOUR_AZURE_API_KEY","model":"gpt-4o-mini",' \
  '"extra":{"resource":"my-openai-resource","deployment":"gpt-4o-mini","api_version":"2024-06-01"}}'

The same call through the Python API:

python
import asyncio
from blender_open_mcp.client.client import BlenderMCPClient

async def main():
    async with BlenderMCPClient("http://localhost:8000") as c:
        # Switch to Azure AI Foundry
        print(await c.set_llm_provider(
            provider="azure",
            api_key="YOUR_AZURE_API_KEY",
            model="gpt-4o-mini",
            extra={
                "resource": "my-openai-resource",
                "deployment": "gpt-4o-mini",
                "api_version": "2024-06-01",
            },
        ))
        # Confirm the active config (API key is masked)
        print(await c.get_llm_provider())
        # Use it
        print(await c.ai_prompt("Create a red cube at the origin"))

asyncio.run(main())

What the adapter does with those values — it builds the deployment-scoped request and sends the key in the api-key header:

POST https://my-openai-resource.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-06-01
api-key: YOUR_AZURE_API_KEY
{"model": "gpt-4o-mini", "messages": [...], "stream": false}

Notes:

  • You may omit base_url entirely (the placeholder https://RESOURCE.openai.azure.com is filled in from extra.resource) or pass the full base URL explicitly.
  • If you use an AI Foundry serverless model endpoint (the *.services.ai.azure.com/models surface) instead of a deployment-scoped resource, point provider at the generic OpenAI-compatible adapter with the serverless base URL: provider="openai_compat", base_url="https://<resource>.services.ai.azure.com/models".
  • The same configuration can be applied at startup instead of at runtime:
bash
blender-mcp --llm-provider azure \
  --llm-api-key "$AZURE_API_KEY" \
  --llm-model gpt-4o-mini \
  --llm-extra '{"resource":"my-openai-resource","deployment":"gpt-4o-mini","api_version":"2024-06-01"}'

---

## Client CLI

```bash
blender-mcp-client --host http://localhost:8000 tools
blender-mcp-client --host http://localhost:8000 tool blender_get_scene_info
blender-mcp-client --host http://localhost:8000 tool blender_set_llm_provider '{"provider":"lmstudio"}'
blender-mcp-client --host http://localhost:8000 prompt "Create a metallic sphere at 0,0,2"
blender-mcp-client --host http://localhost:8000 interactive

As a library:

python
import asyncio
from blender_open_mcp.client.client import BlenderMCPClient

async def main():
    async with BlenderMCPClient("http://localhost:8000") as c:
        print(await c.get_scene_info())
        await c.create_object("SPHERE", location=(0, 0, 2))
        print(await c.ai_prompt("What should I build next?"))

asyncio.run(main())

Provider layer internals

src/blender_open_mcp/llm.py keeps a registry of provider specs and routes every request through one chat helper:

  • OpenAI-style providers post to <base_url>/chat/completions with a Bearer token when an API key is set, and parse choices[0].message.content.
  • Ollama posts to /api/chat natively (or to its /v1/chat/completions surface when the base URL ends in /v1).
  • Azure posts to https://<resource>.openai.azure.com/openai/deployments/<deployment>/chat/completions?api-version=… using the api-key header.
  • Model listing: Ollama /api/tags, others /models (Azure deployments are managed in the portal and not listed).

Add new backends by inserting an entry in PROVIDERS (plus an alias in PROVIDER_ALIASES); nothing else changes.


Development

bash
.venv/Scripts/python -m pytest tests -q

The suites mock bpy (addon tests), httpx (provider/PolyHaven routing), and the MCP client wire format, so they run without Blender or a live LLM.

tests/test_integration.py additionally proves the layers work together:

  • an in-process fastmcp.Client session lists tools/prompts and calls provider tools over the real MCP protocol;
  • the actual addon.py TCP server loop is started on a local port (bpy mocked) and driven through the MCP server's Blender bridge, so blender_get_scene_info and blender_execute_code round-trip over a real socket;
  • a parity test pins every bridge command to a registered addon handler and every blender_* tool to a registered MCP tool.

Notes / known gaps

  • Tests exercise the server without a live Blender; run them against a real Blender session to validate addon.py end to end.
  • See ARCHITECTURE.md for the component diagram and AGENTS.md for contributor conventions.

Instalación

TypingMind
{
  "mcpServers": {
    "blender-open-mcp": {
      "command": "blender-mcp",
      "args": [
        "--transport",
        "stdio"
      ]
    }
  }
}

Usa el MCP de blender-open-mcp con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado blender-open-mcp, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Puedes ejecutar MCP localmente en tu dispositivo o conectarte a la URL de un servidor MCP remoto.

Opción 1: Usa el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade blender-open-mcp como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de blender-open-mcp.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "blender-open-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de blender-open-mcp y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de blender-open-mcp.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar blender-open-mcp para ayudarme con esta tarea?
blender-open-mcp
Claro. Lo he leído.
Esto he encontrado usando blender-open-mcp.

Opción 2: Añade la URL de un servidor MCP

Usa esta opción si blender-open-mcp ya está alojado en un servidor remoto o si tu equipo quiere un conector compartido al que puedan acceder varios usuarios.

1

Abre Conectores MCP

En TypingMind, ve a Plugins, abre Conectores MCP y elige Añadir URL.

  1. Abre TypingMind en tu navegador.
  2. Ve a Plugins.
  3. Abre Conectores MCP.
  4. Haz clic en Añadir URL.
Formulario de TypingMind para añadir la URL de un servidor MCP personalizado
2

Pega la URL del servidor

Introduce la URL del servidor MCP facilitada por el proveedor en el campo URL del servidor. Añade un nombre de conexión, una descripción, un icono, cabeceras HTTP personalizadas o la configuración del cliente OAuth si el servidor los requiere.

  1. Pega la URL del servidor MCP facilitada por el proveedor en el campo URL del servidor.
  2. Introduce un nombre para la conexión de blender-open-mcp.
  3. Añade una descripción y un icono si quieres que sea más fácil de identificar.
  4. Añade cabeceras HTTP personalizadas o los datos del cliente OAuth si el servidor requiere autenticación.
3

Crea la conexión

Haz clic en Crear conexión, vuelve a la lista de plugins y comprueba que la nueva conexión MCP esté activa.

  1. Haz clic en Crear conexión.
  2. Vuelve a la lista de conectores MCP.
  3. Comprueba que la conexión de blender-open-mcp aparezca como activa.
  4. Actualiza la lista de plugins si la conexión no aparece de inmediato.
4

Cambia de modelo sin volver a conectar

Inicia un chat con tu modelo preferido, activa las herramientas de blender-open-mcp desde Plugins y cambia de modelo cuando lo necesites. La conexión MCP seguirá disponible en el espacio de trabajo de TypingMind.

  1. Inicia un nuevo chat en TypingMind.
  2. Selecciona el modelo de IA que quieras usar.
  3. Activa las herramientas de blender-open-mcp desde Plugins.
  4. Pide al modelo que use la herramienta cuando sea necesario.
  5. Cambia a otro modelo de IA y reutiliza la misma conexión MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar blender-open-mcp para ayudarme con esta tarea?
blender-open-mcp
Claro. Lo he leído.
Esto he encontrado usando blender-open-mcp.

Preguntas frecuentes

¿Para qué sirve el servidor MCP blender-open-mcp?

blender-open-mcp es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP blender-open-mcp con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar blender-open-mcp con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de blender-open-mcp con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con blender-open-mcp conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP blender-open-mcp a TypingMind?

Puedes conectar blender-open-mcp en TypingMind con el conector MCP local o añadiendo la URL de un servidor MCP remoto. Usa el conector local cuando el servidor necesite acceder a archivos, aplicaciones o recursos privados de tu dispositivo, y una URL de servidor cuando el servidor MCP esté alojado de forma remota.

¿Qué herramientas ofrece el servidor MCP blender-open-mcp en TypingMind?

blender-open-mcp ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP blender-open-mcp?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si blender-open-mcp requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇