three.ws Blender

v0.5.0
io.github.nirholas/blender-mcp Checked 8 hours ago Published 2 months ago

Drive a local Blender headlessly: inspect, convert, render and script 3D files.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

blender_info Inspect the local Blender install

Report the local Blender this server drives: executable path, version, bundled Python, available render engines, and the import/export formats this build actually supports. Call it first when a tool fails, or to check that Blender is installed at all. Read-only: it opens no file and writes nothing.

blender_scene_info Describe a 3D file with Blender

Open a 3D file with Blender and report what is inside it: object list with types, parents, dimensions and modifiers; evaluated triangle and vertex counts; materials; armature bone names; animation actions with their frame ranges; a texture inventory with each image's resolution and byte size plus the total, which is usually what decides whether an asset is deliverable; and world-space bounds. Accepts .blend plus every format this Blender can import (.glb, .gltf, .fbx, .obj, .stl, .ply, .dae, .abc, .usd*, .x3d). Counts describe the file AS LOADED, so a GLB reports more vertices than the .blend…

ParameterTypeDescription
input *stringPath to the 3D file to inspect. Absolute, or relative to the server working directory.
include_objectsbooleanInclude the per-object breakdown. Set false on very large scenes to get totals only. Default true.

blender_convert Convert a 3D file between formats

Convert a 3D file from any format Blender can import to any format it can export, driven entirely by the file extensions: .glb, .gltf, .fbx, .obj, .stl, .ply, .dae, .abc, .usd/.usda/.usdc/.usdz, .x3d, and .blend on both sides. Modifiers are applied on export by default, and an optional uniform scale is baked in. Returns the output path, its size, the resulting geometry counts, and the world-space bounds. The input file is never modified; omit "output" and the result lands in the server workdir.

ParameterTypeDescription
input *stringPath to the source 3D file.
apply_modifiersbooleanApply modifiers (subdivision, decimate, mirror) to the exported geometry. Default true.
outputstringDestination path. Its extension selects the export format. Defaults to a .glb in the server workdir.
scalenumberUniform scale factor baked into the export, e.g. 0.01 to convert centimetre units to metres.

blender_optimize Shrink a 3D model for delivery

Make a model web-ready in one call: decimate every mesh proportionally to hit a triangle budget, scale oversized textures down, purge datablocks nothing references, and compress the mesh streams with meshopt (or Draco) on the way out. Returns before and after triangle counts, texture bytes and file size, plus what each step did, so the trade is visible rather than guessed. The input file is never modified. Decimation is collapse-based and preserves vertex groups, but a heavily decimated skinned mesh should be checked with blender_render before shipping.

ParameterTypeDescription
input *stringPath to the model to optimize.
compressstringMesh compression for a .glb/.gltf output. "meshopt" (default) is what the three.ws runtime and every major web viewer decode. Ignored for other formats.
max_texture_pxintegerLongest edge any texture may keep, e.g. 1024. Omit to leave textures untouched.
max_trianglesintegerTriangle budget for the whole scene. Omit to leave geometry untouched.
outputstringDestination. The extension picks the format. Defaults to a .glb in the server workdir.

blender_render Render a preview image of a 3D file

Render a still PNG of any 3D file Blender can open (.blend, .glb, .fbx, .obj, .usd and the rest). If the scene has no camera, one is created and framed to the model; if it has no light, a key light and a lit world are added, so a bare asset file renders as a usable preview with no setup. A scene that already has its own camera and lighting is rendered as authored. The rendered image is returned INLINE alongside the JSON, so you can actually look at the model in this one call without needing filesystem access, while the full-resolution PNG is written to disk. Ask for several views and it orbits…

ParameterTypeDescription
input *stringPath to the 3D file to render.
enginestringRender engine. "auto" (default) picks CYCLES, which renders on CPU. EEVEE is far faster but needs a GPU context. Call blender_info to see what this build offers.
inline_imagebooleanReturn the image inline so you can see it, downscaled to fit the context. Default true.
outputstringDestination PNG path. Defaults to a .png in the server workdir.
resolutionarrayOutput size as [width, height]. Default [960, 960].
samplesintegerSample count. Default 32: enough for a preview.
transparentbooleanRender with a transparent background instead of the world. Default false.
viewsintegerHow many angles to render, orbiting the model, all in one Blender launch and all returned inline. Default 1. Use 4 to see whether the back of a model is modelled at all. A set always orbits its own ca…

blender_forge_import Generate a 3D model with three.ws and open it in Blender

Generate a 3D model from a text prompt OR a reference image on the public three.ws Forge pipeline, then bring it into Blender. Pass "prompt" to describe it, "image" for a local PNG/JPEG/WebP, or "image_url" for one already public; an image plus a prompt uses the prompt to steer the reconstruction. The default image lane (FLUX to TRELLIS) is free and needs no key, wallet, or account. The GLB is saved locally, and if the output path asks for another format (.blend, .fbx, .obj, .usd) Blender converts it on the way in. Returns the local path, the hosted GLB URL, and the geometry counts. Generation…

ParameterTypeDescription
aspect_ratiostringReference image aspect ratio. Default "1:1".
backendstringPin a specific backend. Omit to let the deployment choose for the tier.
imagestringLocal PNG, JPEG or WebP to reconstruct from. Uploaded straight to storage on a presigned PUT.
image_urlstringA public https image to reconstruct from, instead of uploading one.
lanestringPipeline lane. "image" (default) is free. "geometry" uses Meshy/Tripo and needs THREE_WS_FORGE_PROVIDER_KEY.
outputstringWhere to save it. The extension picks the format (.glb keeps the original bytes). Defaults to a .glb in the workdir.
promptstringWhat to generate. One subject, e.g. "a weathered brass diving helmet". Required unless an image is given.
tierstringGeneration quality. Default "standard".

blender_run_python Run a Python script inside Blender

Execute a Python script inside Blender with the full bpy API available. Optionally open a 3D file first (any format Blender imports) and export the edited scene afterwards, chosen by the output extension. Anything printed is returned as stdout, and assigning a JSON-serializable value to a variable named `result` returns it as structured data. Use this for scene edits the other tools do not cover: decimating meshes, joining or renaming objects, editing armatures, baking animation, cleaning materials. The script runs with the permissions of this server and can read and write the local filesystem…

ParameterTypeDescription
code *stringPython source to execute. `bpy`, `math`, and `Vector` are already imported.
apply_modifiersbooleanApply modifiers when exporting. Default true.
inputstring3D file to open before running the script. Omit to start from an empty scene.
outputstringExport the scene here after the script runs; the extension selects the format. Omit to discard it.