Skip to main content
Glama

Blender MCP Router

FastMCP server that exposes two layers of functionality:

  • LLM routing through LiteLLM so a single FastMCP tool can reach OpenAI, Anthropic, xAI, or any other LiteLLM-supported provider.

  • Blender bridge that proxies to the Blender MCP add-on over a persistent TCP socket, providing scene inspection, PolyHaven / Sketchfab helpers, and Hyper3D automation.

The server is designed for FastMCP Hub distribution: pyproject.toml defines the package, the MCP endpoint is hosted via FastMCP, and an optional REST shim is exposed for the Blender add-on.

Requirements

  • Python 3.10+

  • Blender MCP add-on running locally (for the Blender tools)

  • API keys for any LLM providers you plan to route through LiteLLM

Install dependencies via:

pip install -e .

Related MCP server: Blender Open MCP

Configuration

Copy .env.example to .env and fill in the values.

Variable

Purpose

OPENAI_API_KEY

Used by LiteLLM when routing to OpenAI models

XAI_API_KEY

Used for xAI (Grok) requests via LiteLLM

ANTHROPIC_API_KEY

Used for Anthropics models via LiteLLM

OPENAI_MODEL

Optional override for the gpt-5 alias

XAI_MODEL

Optional override for the grok-4-fast alias

ANTHROPIC_MODEL

Optional override for the claude-4 alias

MCP_REST_TOKEN

Shared secret for REST shim (X-Token header)

All LLM-specific environment variables supported by LiteLLM can be passed through here as well (see LiteLLM docs for provider-specific keys).

Running

After configuration, start the server via the script entry point:

blender-mcp-router

The process starts two services:

  • FastMCP HTTP endpoint on 127.0.0.1:8974/mcp

  • REST bridge for the Blender add-on on 127.0.0.1:8975

Both services are started inside server.main() so FastMCP Hub (or pipx run blender-mcp-router) can launch them.

MCP Tools

server.py registers the following FastMCP tools:

  • generate_text: Unified text generation routed through LiteLLM

  • Blender tools: get_scene_info, get_object_info, get_viewport_screenshot, execute_blender_code, PolyHaven/Sketchfab helpers, and Hyper3D automation helpers

Each Blender tool forwards to the Blender MCP add-on using a JSON-over-TCP API. See that add-on for port configuration (default localhost:9876).

REST Shim /tools/call

The REST API exposes a subset of the MCP tools so non-MCP clients (like the Blender add-on) can call them. Requests must include an X-Token header if MCP_REST_TOKEN is set. The response format mirrors MCP content objects (text, json, image).

Health Check

GET /health returns { "ok": true } so deployment targets can monitor the process.

Development

  • Run linting/formatting as desired (none enforced yet).

  • The LiteLLM dependency keeps provider selection abstract; add more aliases in MODEL_MAP as needed.

  • Additional tools can be exposed by adding @mcp.tool() functions and listing them in _HTTP_EXPOSED_TOOL_NAMES when required by the REST shim.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to control a live Blender session, creating, modifying, and deleting objects, applying materials, rendering images, executing code, and pulling PolyHaven assets, while routing prompts through a provider-agnostic LLM backend that can be switched at runtime.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to control a live Blender session for scene and object management, material and render operations, and PolyHaven asset access. It also supports runtime switching between provider-agnostic LLM backends such as Ollama, LM Studio, llama.cpp, and OpenAI-compatible endpoints.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to control a live Blender session, inspect and modify scenes, manage PolyHaven assets, render images, and route prompts through configurable local or OpenAI-compatible LLM backends.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to control a live Blender session over MCP, creating and modifying objects, applying materials, rendering images, and downloading PolyHaven assets. It also routes prompts to a provider-agnostic LLM backend (Ollama, LM Studio, llama.cpp, OpenAI-compatible, Azure) that can be listed and switched at runtime.
      -