Skip to main content
Glama

An MCP server that draws game gun models in Blender from a few parameters. Each build has real parts at real proportions, one bone a moving part, its clips, and the facts a game needs. Every build checks itself, and a second check measures its outline against a photo of the real gun.

An AR-15 with a holographic sight, a magnifier, a light and a vertical grip

Ask for "an M4A1 with a red dot and a light on the right rail" and Model Lab writes a rigged FBX, an FBX for each attachment, a .blend, a sheet of pictures and a facts.json with every mark in gun space. It tells you which checks failed, if any. It makes game models only: outside shapes and moving parts. It draws no working internals and writes no fabrication data.

What a build gives you

You get

What it is

SK_<name>_Rig.fbx

the gun on its rig: Bolt, ChargingHandle, DustCover, BoltCatch, MagRelease, Selector, Trigger, ForwardAssist, Magazine, MagRound, Stock, each with its real pivot and travel

SM_<name>_Magazine.fbx

the magazine alone, its origin on the feed lips, for the hand

one FBX an attachment

its origin on its recoil lug; SK_ when it has moving parts (folding sights, flip caps, a flip magnifier)

<name>.blend

everything, with the moving parts' cycle as an action

facts.json

the marks (chamber, port, magazine well, feed lips, grip, support hand, muzzle, sights), the rails and their slots, the attachments and their sockets, the parts table, every check

sheet.png

labelled views: both sides, the top, the front, close views, the open action, the sight picture

Gun space: centimetres, +X the gun's left, +Y forward, +Z up. The origin is the bolt face at rest on the bore.

An M4A1 from its right side

Related MCP server: Roxy Blender MCP

Install

Model Lab needs Python 3.10 or later and Blender 4.2 or later.

uvx modellab-mcp

or

pip install modellab-mcp

Add it to your MCP client (Claude Code, Claude Desktop, or any client that runs stdio servers):

{
  "mcpServers": {
    "modellab": {
      "command": "uvx",
      "args": ["modellab-mcp"],
      "env": { "MODELLAB_BLENDER": "C:/Program Files/Blender Foundation/Blender 4.2/blender.exe" }
    }
  }
}

Setting

What it does

MODELLAB_BLENDER

Blender's executable. Leave it out when Blender is on the PATH or in its usual install folder.

MODELLAB_OUT

The only folder Model Lab writes to. Defaults to ~/.modellab.

MODELLAB_WAIT_FOR

Optional process names that hold the machine, such as UnrealEditor.exe,blender.exe. A build refuses to start while one runs. Off by default.

MODELLAB_IDLE_OK

With MODELLAB_WAIT_FOR: parts of a command line that mark a long-lived worker (default poselab_mcp). Such a worker counts only while it is busy.

The tools

Tool

What it does

list_presets

The ready guns: M4A1, M16A2, AR15, M4A1_Kitted, AR15_Optic.

list_platforms, describe_params

The gun families and every parameter: its range or choices, its unit, its meaning, and the sources of the real numbers.

list_attachments

Nine attachment classes for the rails and M-LOK slots.

build_gun

Builds a gun from a preset or a platform, with any parameter changed. motion=true adds GIFs of the cycle.

build_gun_clips

The gun's own clips on a build's rig, measured, one FBX and one GIF each.

list_references, compare_to_reference

The real-gun check: a build's outline against a photo.

list_builds, read_build

The builds so far and their facts.

The same calls run from a shell: modellab presets, modellab build M4A1 stock_pos=2 name=MyM4, modellab clips <build>, modellab compare. Run modellab help for the list.

Every build checks itself

A build reports each check with its value. The checks:

  • the length against the published figure (the M4A1 at 29.75 and 33 in, the M16A2 at 39.63 in);

  • the chamber on the bore;

  • the dust cover: closed over the whole port, hinged on its bottom edge, and open against the lower, not through it (the build swings it a degree at a time and stops it where it first touches);

  • the magazine clear of its well's walls and seated;

  • the bolt's travel past the top round;

  • the sight line: the rear aperture and the front post at one height;

  • each attachment on a rail it fits, clear of the gun in every state, and its optic on the iron sight line;

  • every visible part with its real features (parts_complete). The parts table lists each part a person sees on the real gun and the features that make it read as that part: the charging handle's swept wings, finger hooks, latch and roll pin; the bolt catch's serrations; the castle nut's notches; the front sight base's bayonet lug, swivel and taper pins; and so on. A missing feature fails the build. Marks such as rail numbers are listed as texture, not shape.

Close views: the charging handle

The real-gun check

compare_to_reference draws the build's side outline at a reference photo's own scale. It lines the build up on the muzzle and the bore, measures both outlines column by column, and names the parts where they differ. The overlay shows the model in see-through red over the photo: dark photo showing through is real gun the model misses.

The M4A1's outline over the reference photo

This check found the faults the self-checks could not: the lower 1.55 cm too far back, the front sight base 2.4 cm back and the wrong shape, the stock's outline, the magazine's curve, and the rail's height. Now no stretch of the gun's outline over 1.75 cm long is more than 1 cm off. Attachments are classes, not the photo's exact models, so the check keeps their outline apart.

The reference ships with the package: a photo of an M4A1 carbine from PEO Soldier, File:M4A1-flattop.jpg on Wikimedia Commons, in the public domain as a work of the US Federal Government. The check reads its scale from the rail's teeth, 0.394 in apart.

Attachments on sockets

Each rail reports its slots at the Picatinny pitch (MIL-STD-1913), slot 0 at the rear. M-LOK handguards report their slots too (32 by 7 mm, 40 mm apart). Pass attachments by name, or as {item, rail, slot, state, options}:

{"preset": "M4A1", "params": {"attachments": [{"item": "flip_rear", "state": "down"}, "red_dot", "weapon_light"]}}

The nine classes: folding rear and front sights, the M4's carry handle, a 30 mm red dot with flip caps, a holographic sight, a 3x magnifier on a flip mount, a 4x32 prism sight, a vertical grip, a weapon light. A build checks that each fits its rail, clears the gun in every state, and clears the others as shown. When one blocks another's move, the build lists it: behind a magnifier, the rear sight goes up only after the magnifier swings aside.

The sight picture through a red dot, the A2 post in its middle

Motion and clips

Every .blend holds the cycle as an action. motion=true renders it as GIFs: the charging handle drawn back, the cover springing open, the carrier flying home, the magazine out and in, then the attachments' own moves.

The cycle on an AR-15 with a magnifier and a holographic sight

build_gun_clips keys the gun's clips at 60 frames a second from real timings: charge, chamber check, fire (a 75 ms cycle), the last shot (the bolt held on its catch), reload, empty reload, and the stock's positions. Each clip is measured: every part on its own axis, the full stroke, the cover open before the carrier has moved 1 cm, the magazine out of the well and seated, the bolt held until the magazine is in.

An empty reload: the bolt held open until the new magazine is seated

Next: soft edges where a hand holds

The owner, 2026-10-21: "the grip is no sharp edge, this will be the next improvement for Model Lab when read on the manual or images, make the corner round a bit, especially the places that human grab and hold, most of the time they will no sharp edge because sharp edges will hurt the hand/human, make them softer so hand can hold it".

  • Every part a hand grabs or holds gets rounded edges: the grip, the pistol grip's panels, the handguard, the magazine, the charging handle, the stock's cheek and butt.

  • Each radius is read from the manual, drawing or photo when it shows one. Otherwise it comes from a named human-engineering source, recorded with the part.

  • The real-gun check compares these edges too.

Why it matters, measured: on a digitized M1911A1 the grip safety was a square extrusion. A hand placed on the grip had the safety's edge 0.42 cm in its palm (the palm gives 0.27 cm). Rounding the grip parts by 0.75 mm, the least MIL-STD-1472G 5.7.7.6 allows, cut that to 0.09 cm past the give. Red: before (sharp). Blue: after (rounded). Below, close-ups of the spot before and after.

The palm's clip against the grip safety, sharp and rounded

Limits

  • One platform so far: the AR-15 family. Others will follow.

  • One reference photo: the M4A1 from its right side.

  • The clips are the gun's side only. A hand's clips need an arms rig.

  • No selector clip yet: the lever's direction at SAFE is not yet checked against a source.

  • Many numbers are estimates sized from photographs. describe_params lists every source and every estimate.

Trademarks

M-LOK is a trademark of Magpul Industries. Model Lab draws M-LOK slots to their published dimensions and is not connected with Magpul. AR-15 is a trademark of Colt's Manufacturing; here it names the rifle family in its common sense. Military designations (M4A1, M16A2, M68) name the guns and parts Model Lab copies. No product is endorsed.

License

MIT. See LICENSE.

Available Tools

10 tools
build_gunA

Builds a gun in Blender (15 to 30 s): the rig FBX, the hand magazine FBX, one FBX an attachment, the .blend (with the cycle as an action), facts.json and a sheet of labelled dev views; with motion, GIFs of the cycle. Returns the checks that failed (none when all_pass), the size and the files.

Inputs: name, scale, motion, params, +2 more.

build_gun_clipsB

The gun's own clips on a build's rig, from real beats and timings at 60 frames a second: each measured (parts on their axes, the bolt's stroke, the cover open before the carrier, the magazine out of the well and seated, the bolt held on its catch), exported alone as FBX (A__.fbx) and shown as a GIF.

Inputs: build (required), clips, render.

compare_to_referenceA

The real-gun check: draws the build's side outline at the reference photo's scale and alignment, measures both outlines column by column, and returns the stretches that differ by more than 0.4 cm, each with the parts there and its zone (the gun, or an attachment over the rail), and an overlay picture (the model in red over the photo).

Inputs: build, reference.

describe_paramsC

A platform's parameters (type, range or choices, unit, meaning) and the sources its real numbers come from.

Inputs: platform.

list_attachmentsA

The attachments a build can mount on the rails and M-LOK slots (optics, backup sights, the carry handle, a vertical grip, a light): what each is, the rails it fits, its states and moving parts. Pass them to build_gun as params.attachments.

Inputs: no named parameters.

list_buildsA

The latest builds, newest first: name, whether every check passed, size.

Inputs: no named parameters.

list_platformsB

The gun families Model Lab can draw, with their parameter names.

Inputs: no named parameters.

list_presetsB

The ready guns (M4A1, M16A2, AR15, M4A1_Kitted, AR15_Optic): their parameters and the published lengths each build is checked against.

Inputs: no named parameters.

list_referencesC

The real-gun photos compare_to_reference measures against: each photo's source, licence, scale and the build that matches it.

Inputs: no named parameters.

read_buildC

A build's facts: parameters, marks, moving parts, rails, attachments, the parts table, every check, files.

Inputs: build (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools target clearly distinct resources/actions: list_platforms, list_presets, list_attachments, list_references, list_builds each return different data, and build_gun vs build_gun_clips vs compare_to_reference are distinct operations. The only mild overlap is between list_platforms (parameter names) and describe_params (parameter details), and list_presets also surfaces parameters, so boundaries are mostly but not perfectly crisp.

    Naming Consistency5/5

    All ten tools follow a consistent snake_case verb_noun pattern (list_*, describe_params, build_gun, build_gun_clips, compare_to_reference, read_build). Verbs are used coherently across the set with no style mixing.

    Tool Count5/5

    Ten tools is well-scoped for a gun build-and-verify pipeline: discovery (platforms, params, presets, attachments, references), generation (build_gun, build_gun_clips), verification (compare_to_reference), and inspection (list_builds, read_build). Each tool earns its place.

    Completeness4/5

    The surface covers the full build workflow: parameter discovery, building, animation clips, real-reference verification, and build inspection. Minor gaps exist, such as no tool to delete/manage builds or to list/inspect individual clips, but these are workable.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables LLMs such as Claude to drive Blender through high-level tools for real-world-scale modeling, PBR texturing, lighting, rendering, rigging/animation, and UE5 game-asset baking and export. It also provides asset-library search, reference comparison, quality inspection, and import/export of common 3D file formats.
      58
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables models to pose and measure first-person arms and a rifle in Blender, reporting positions in named frames, clearances, visibility, screen placement, and solving rifle moves against goals.
      17
      1
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables game gun models to be given physically based surface finishes across material slots and wear levels, with wear baked once into vertex-colour masks for edges, handling, rubbing parts and dirt. It also validates finishes and wear against physical rules, renders look-dev variant sheets, and exports per-slot engine material parameters.
      13
      1
      MIT