forma-mcp
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Forma
A ~1.7 MB native / ~0.8 MB WASM pure-Rust headless 3D polyhedral modeling engine built for AI agents — CLI, WASM, and MCP server.
Forma replaces headless Blender's 3D mesh modeling, boolean, and studio-preview workflow for AI agents with a single pure-Rust binary—trading the 953 MB desktop stack and brittle bpy scripting for a compact declarative pipe language (Forma-Pipe), semantic edge/face selectors, strict-by-default manifold CSG booleans, transactional snapshots, and a built-in zero-GPU studio renderer.
Metric | Stock Headless Blender 5.3 ( | Forma | Improvement |
Cold-Start Eval + GLB Export | 1,306.8 ms | 15.3 ms 8-model suite ( | ~77×–89× faster |
Completion Tokens (12-model avg) | 294,661 total | 84,551 total | 3.49× fewer (up to 15.5×) |
Pass Rate (12 models / 9 labs) | 79.1% ( | 95.5% – 100% | +16.4 pp |
Binary / Install Footprint | 953 MB | ~1.7–1.8 MB native (~0.8–0.99 MB WASM) | ~530× smaller |
Peak Memory RSS | 223 MB | ~6–14 MB ( | ~16×–36× less RAM |
MCP Tool Schema Budget | — | 900 | Fused 1-turn |
Features
Declarative
Forma-PipeLanguage: Chain primitives and ops cleanly (box | bevel | shell | cut) with semantic selectors (vertical,top_rim,bottom_rim,outer_rim,top,sides)—zero fragile integer vertex indices.Fast, Watertight Pure-Rust Kernel: Double-precision polyhedral mesh kernel (watertight manifold polygons/triangles), BVH-localized booleans with automatic batch chunking & fallback for multi-hole patterns, Link-Condition coplanar mesh simplification, ring-preserving bevels, shell/solidify, crease-aware Catmull-Clark subsurf,
pipe,loft(segs8..128), helicalthread,sweep,text3d, andpattern_linear/pattern_radial.Spatial Constraints, Queries & Deterministic Craftsmanship Lint: Relational placement (
| on(base),| align(axis, min|center|max, val)), BVH-accelerated 3Dclearance(a, b), 2Dsection(part, z)loop/area queries, Euler genus (g) diagnostics, andforma lint/--critique/ MCPinspect({ lint: true })(zero-ML-weight craftsmanship checks + pairwise assembly contact graph:INTERSECTING,CONTACT,NEAR_GAP,DISJOINT; emits 0 extra tokens on clean builds).Zero-GPU Rendering & Blueprints: Built-in 4-view (
quad) or single-view (front|back|right|left|top|iso) studio PNG renderer with branchless SSAO-lite + depth silhouettes + L1-streaming pure-Rust Deflate compression (~20–75 KBPNG in ~2.8 ms), plus dimensioned 1200×900 vector SVG technical blueprints (forma draw).Universal Import, Decimation & Export: Pure-Rust
.glb(glTF 2.0 Y-up),.obj, and.stlimporters (load("item.glb")), topology-preserving QEM mesh decimation (| decimate(0.5)), native.glb(PBR + LSCM/triplanar UVs), faceted ISO 10303-21.step(watertight planar-face solid; no analytic cylinders/NURBS),.3mf,.stl,.obj,.svg,.png, and.blend(via optional Blender bridge). Declare your model unit withunits("mm")(orforma eval --unit mm; default metres) and.3mf/.stepcarry it,.glbis scaled to metres.Optional Headless Server (
forma-server): Separate opt-in HTTP/1.1 worker crate (compact static binary,< 5 MBscratchDockerfile) with zero impact on the coreformaCLI,forma-mcp, orforma-3dnpm/WASM bundle.
Related MCP server: forge3d-mcp
Install
Platform | Download | Run |
Windows x64 | Run installer → launch Forma | |
Linux x64 |
| |
macOS Apple Silicon | Open DMG → drag to Applications |
Usage
forma eval --strict --out flange.glb --render flange.png --draw flange.svg <<'EOF'
flange = box(4, 2, 0.4)
| mat("brushed_steel", color=(0.55, 0.68, 0.85), metallic=0.9, roughness=0.25)
| cut(cyl(0.5, 1))
| cut(cyl(0.25, 1), at=[(-1.4,-0.5,0), (-1.4,0.5,0), (1.4,-0.5,0), (1.4,0.5,0)])
section(flange, 0.0)
EOFFor AI Agents
Forma is designed for drop-in agent use via MCP, CLI, Agent Skills, or GBNF constrained decoding:
LLM Agent Skill:
SKILL.mdMachine-readable index:
llms.txtFull agent integration guide:
AGENTS.mdConstrained-decoding grammar:
grammar/forma_pipe.gbnf(forma spec --gbnf)
MCP Server Setup (forma-mcp)
Add Forma's MCP server (4 tools: eval, inspect, tx, export — 900 o200k tokens total, with fused eval(out=[]), batched export(paths=[]), named view, inspect(part/lint), delta-first observe(), staleness sync:, and opt-in --log JSONL session journaling across native & WASM) to any MCP client:
{
"mcpServers": {
"forma": {
"command": "forma-mcp"
}
}
}Or invoke directly from any shell-capable agent:
forma spec # ~485-token language reference
forma eval --strict --critique --out out.glb script.forma # transactional eval + 0-tok clean critique
forma lint --json script.forma # Layer A geometric lint + contact graph
forma render --out preview.png script.forma # 4-view studio PNG (~2.8 ms, zero GPU)
forma draw --out blueprint.svg script.forma # dimensioned vector engineering blueprintnpm Package (forma-3d)
import { evalPipe, exportMesh, renderPng } from "forma-3d";
const obs = await evalPipe(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, { strict: true });
const glb = await exportMesh(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, "glb");
const png = await renderPng(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, 512);Where Forma Runs (Edge, Cloud, Agent VMs & Air-Gapped Sandboxes)
Because wasm/forma.wasm is a ~0.8 MB zero-import WebAssembly module (zero WASI, zero top-level node:* imports) and the static Linux builds are ~1.3 MB LTO musl binaries (no GPU, ~6–14 MB RAM), Forma runs almost anywhere:
Environment | Providers / Runtimes | How to Run |
Edge & Browsers | Cloudflare Workers, Vercel Edge, Netlify Edge, Deno Deploy, Supabase Edge Functions, Fastly Compute, Chrome/Safari/Firefox | Zero-boilerplate on Cloudflare Workers ( |
Cloudflare Workers / Edge / Browsers
forma-3d has zero top-level node:* imports. On Cloudflare Workers, the workerd export condition automatically selects lib/workerd.mjs (which statically imports ../wasm/forma.wasm for Wrangler's built-in CompiledWasm rule and auto-recovers the cached WASM instance if an isolate ever traps):
// Cloudflare Worker (zero boilerplate, no nodejs_compat required)
import { exportMesh } from "forma-3d";
export default {
async fetch(req) {
const glb = await exportMesh(await req.text(), "glb", { strict: true });
return new Response(glb, { headers: { "content-type": "model/gltf-binary" } });
},
};// Vercel Edge / Netlify Edge / Fastly (import ends in .wasm to match bundler rules)
import formaWasm from "forma-3d/forma.wasm";
import { exportMesh } from "forma-3d";
const glb = await exportMesh("a = box(1, 1, 1)", "glb", { wasm: formaWasm });
// Browser / Web Worker
import { loadForma } from "forma-3d/edge";
const engine = await loadForma(fetch("/forma.wasm"));Benchmarks
All models were evaluated head-to-head on stock headless Blender 5.3.0 (bpy) vs Forma (Forma-Pipe) across 6 cross-category exact-dimension tasks (flange_plate, pipe_tee, beveled_enclosure, hex_nut, subdiv_mug, pedestal_bowl), verified independently with trimesh + scipy (Chamfer distance, Hausdorff-99, Generalized Winding Number Volumetric IoU, watertight/0-non-manifold checks, and 16-layer planar sliceability).
1. Cross-Lab Results — 12 Models Across 9 Labs (low reasoning)
Model |
| Forma Pass (P@1 / P@3) |
| Forma Tokens (API / Comp) |
| Forma Mean IoU | Comp Token Reduction |
| 4/6 · 6/6 | 6/6 · 6/6 | 15,139 / 9,333 | 6,140 / 731 | 0.973 | 0.980 | 12.77× |
| 4/6 · 5/6 | 3/6 · 6/6* | 36,296 / 25,815 | 18,159 / 8,474 | 0.807 | 0.978 | 3.05× |
| 4/6 · 6/6 | 5/6 · 6/6 | 28,447 / 20,867 | 12,938 / 7,388 | 0.970 | 0.974 | 2.82× |
| 3/6 · 5/6 | 5/6 · 6/6 | 27,794 / 18,297 | 10,157 / 5,020 | 0.818 | 0.989 | 3.64× |
| 4/6 · 6/6 | 4/6 · 6/6 | 9,914 / 5,787 | 6,798 / 950 | 0.970 | 0.978 | 6.09× |
| 4/6 · 6/6 | 4/6 · 6/6 | 10,333 / 6,239 | 7,126 / 1,243 | 0.968 | 0.972 | 5.02× |
| 2/6 · 4/6 | 4/6 · 6/6 | 43,265 / 36,827 | 19,161 / 12,133 | 0.651 | 0.965 | 3.04× |
| 5/6 · 6/6 | 3/6 · 6/6 | 9,380 / 6,151 | 11,632 / 2,696 | 0.960 | 0.985 | 2.28× |
| 5/6 · 6/6 | 4/6 · 6/6 | 88,001 / 76,397 | 30,024 / 14,558 | 0.966 | 0.972 | 5.25× |
| 1/6 · 1/6 | 3/6 · 4/6 | 61,812 / 56,599 | 37,825 / 29,120 | 0.167 | 0.661 | 1.94× |
| 1/6 · 1/6 | 3/6 · 5/6 | 52,799 / 22,079 | 10,497 / 1,574 | 0.159 | 0.924 | 14.03× |
| 0/1 · 1/1 | 1/1 · 1/1 | 12,666 / 10,270 | 1,331 / 664 | 1.000 | 1.000 | 15.47× |
Aggregate (67 paired trials) | 55.2% · 79.1% | 67.2% · 95.5% | 395,846 / 294,661 | 171,788 / 84,551 | 0.768 | 0.944 | 3.49× |
*On subsequent v0.2+ ring-preserving bevel fixes, claude-haiku-5.5 improved to 6/6 (100%) Pass@1 (10,920 API tokens) and all 4 re-tested models hit 24/24 (100%) Pass@2 (0.980 Mean IoU).
†Completed 1 paired task (flange_plate: 1-shot Forma vs 3-turn bpy) before upstream provider returned HTTP 400.
2. Reasoning-Effort Scaling (claude-haiku-5.5, gpt-6.2-sol, gemini-4-hydrogen, qwen4-max)
Reasoning Level | Paired Tasks |
| Forma Pass@3 |
| Forma API / Cost |
| Forma IoU | Cost Reduction |
| 12 | 83.3% | 91.7% | 53,812 / $0.100 | 22,453 / $0.012 | 0.792 | 0.925 | 8.57× |
| 24 | 83.3% | 100.0% | 117,688 / $0.402 | 54,603 / $0.132 | 0.811 | 0.976 | 3.05× |
| 24 | 83.3% | 100.0% | 178,275 / $0.693 | 56,488 / $0.202 | 0.834 | 0.975 | 3.44× |
| 24 | 83.3% | 95.8% | 269,423 / $1.285 | 80,107 / $0.326 | 0.864 | 0.941 | 3.95× |
3. Full 12-Task Suite Summary (4 Model Families, 144 Trials)
Metric | Stock Blender 5.3 ( | Forma ( | Gain |
Pass@1 / Pass@3 | 68.8% / 85.4% | 81.2% / 97.9% | +12.5 pp |
Median Code Tokens ( | 644 | 115 | 5.60× shorter |
Mean Volumetric IoU | 0.8421 | 0.9814 | +0.1393 |
All 12 Canonical Meshes (build + | ~15,600 ms | 61.2 ms total ( | 12/12 |
Fuzz & Determinism | — | 11,000 ops in | 0 panics · 0 NaNs · byte-identical |
4. Agent Workflow & 100-Scene Diverse Stress Matrix (Native + WASM + trimesh)
Verified across 100 diverse 3D models & assemblies spanning um/mm/cm/in/m/ft scales, 1–30 parts, 7 export formats, and 7 render views (bench/stress_matrix_100.py):
Metric | Baseline ( | Optimized | Gain |
Pass & Cross-ISA Parity (Native = WASM = | — | 100 / 100 PASS |
|
Median MCP Tool Turns (100 scenes) | 6.0 | 1.0 | 5.0× fewer (fused |
Total MCP Response Tokens (100 scenes) | 172,711 | 82,510 | -52.2% |
Large Scenes ( | 5,531 | 1,922 | -64.9% |
Incremental Edit (delta-first | 609 tok | 166 tok | -77.8% |
Single-Part | 637 tok | 110 tok | -82.4% |
8-Model CSG Kernel Suite ( | 24.11 ms | 15.25 ms | 1.58× faster ( |
512×512 4-View Studio Render ( | 4.67 ms | 2.81 ms | 1.66× faster ( |
Layer A | — | 0% FPR · 100% Recall | 0 extra tokens on clean |
License
GNU General Public License v3.0 or later (GPL-3.0-or-later).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Build, check, and export parametric CAD models in your ForgeCAD Projects from your AI agent.
A browser 3D CAD for your AI: it scripts real-size models, uCAD builds them and returns pictures.
Text-to-CAD: build exact STEP or 3MF/STL on the server, each stated requirement measured.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to design, modify, and verify exact B-rep 3D CAD models by running build123d scripts on an OpenCascade kernel, with live three.js preview, collision and FDM printability checks, text-based spatial perception, user notes/sketch annotations, version history, and one-click export to OrcaSlicer.1MIT
- AlicenseBqualityBmaintenanceEnables AI agents to plan, generate, inspect, validate, repair, preview and hand off 3D models across five interchangeable geometry engines (procedural, OpenSCAD, Blender, CadQuery and hosted text-to-3D). Profile-based validation for print, CAD, game and web purposes keeps outputs correct, while CPU previews and single-file Three.js viewers make results visible and shareable.215MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to build, evaluate, measure, inspect, and export parametric CAD parts written as JavaScript against an exact B-rep kernel, including checks for geometry, volume, wall thickness, and bore intersections. It also provides multi-view renders, cross-sections, and STEP export so agents can verify parts before printing or machining.10AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to create, edit, animate, and export 3D scenes in Blender through a compact Python-powered modeling language, covering primitives, transformations, materials, cameras, lights, and keyframe animation. Also supports object and scene inspection, batch rollback with undo/redo, and exporting STL, OBJ, GLB, or BLEND files plus queued PNG renders.MIT