Skip to main content
Glama

VisForge

Source: https://github.com/digitizables/VisForge

VisForge is an open-source Python toolkit that gives an MCP host a stable way to model in Plasticity. The host plans in skills and relations. VisForge executes those skills, reads the document when Plasticity is open, and checks the result with geometry and a viewport capture.

The Plasticity server in this repository is new. It does not import or wrap another MCP server.

The problem

Agents that drive CAD through a large, low-level tool list tend to fail in the same ways:

  • A bridge that calls private application internals works on one build and breaks on the next.

  • The model is asked for absolute coordinates, so a small numeric mistake lands a feature in the wrong place.

  • The model rarely sees the viewport, and it rarely checks whether the solid is closed, has the expected volume, or collides with another part.

Research on agentic 3D systems points at a different split of work. LL3M uses specialized agents and visual critique instead of one-shot generation. Embodied CAD keeps the model on a skill library and gives fragile bookkeeping to a resolver and the CAD solver. aDSL expresses layout with relational operators such as "on" and "align" so the same relation can be executed and checked. VisForge uses that Planner, Actor, Critic shape for Plasticity.

Related MCP server: nexus3d

Architecture

MCP host
  Planner  -> skills, named parts, relations, checks
  Actor    -> VisForge tools
  Critic   -> mesh report, solid overlap, optional screenshot

VisForge Plasticity session
  write channel  JSON connector, port 9741
  read channel   Plasticity live link, port 8980
  offline mirror analytic solids when neither channel is up

Two channels talk to Plasticity:

Channel

Who speaks it

Role

VisForge connector

This project

Semantic writes: primitives, booleans, place_on

Live link

VisForge client of Plasticity's public bridge

Read the open document: handshake, scene list, summaries

The reference connector stores commands and updates an analytic scene. It does not attach to Plasticity's private API. An add-on that implements the same JSON methods can run the native command and return executed_in_plasticity: true. Until that add-on is installed, the session reports that the write stayed on the mirror or the connector scene.

The live-link client is ours. It implements the little-endian handshake and list frames used by Plasticity's bridge server (Preferences, Server, commonly localhost:8980). Tool results keep identity, counts, and bounding boxes. They do not dump raw vertex buffers into the model context.

Blender is a later, secondary bridge. This release does not ship one.

The design notes, skill levels, and paper references are in docs/architecture.md.

Skills

Levels follow the Embodied CAD split. Level 4 is relational, in the aDSL sense.

Level

Family

Examples

In this starter

0

Primitives

box, sphere, cylinder

Executed on the mirror and the connector

1

Curves

rectangle, circle

Catalog only

2

Booleans

union, subtract, intersect

Analytic when the volumes are known

3

Features

fillet, shell, hole pattern

Catalog only

4

Relations

place_on, align, offset

place_on is executed

list_skills returns the full catalog, including skills that the critic will flag as deferred.

Requirements

  • Python 3.11 or newer

  • uv or pip

  • Plasticity, only when you want a live document. The server and the tests run without it.

Optional extras:

  • vision installs OpenCV for PNG and JPEG captures

  • geometry installs trimesh

  • open3d installs Open3D

Binary P5 PPM images and the built-in mesh samples work with no extras.

Setup

From this directory:

uv sync --extra dev --extra vision --extra geometry

Or, with pip:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev,vision,geometry]"

Run the tests:

uv run pytest

Grok Build

Grok Build loads .grok/config.toml when the session is inside this repository. That file starts the server with uv run --offline visforge. Run uv sync once before the first session so the environment exists.

On this machine the user config also registers visforge, so Grok can start it from any folder:

[mcp_servers.visforge]
command = 'C:\Users\Paul Beck\Desktop\VisForge\.venv\Scripts\visforge.exe'
enabled = true
startup_timeout_sec = 60

After either file changes, a new Grok session picks the server up. grok mcp doctor visforge checks that the process starts. Tools are named visforge__<tool>, for example visforge__validate_mesh.

Run the server

The MCP server uses stdio. Logs go to stderr.

uv run visforge

The same entry point is python -m visforge inside the virtual environment.

A host configuration is in examples/mcp.json. Point --directory at this checkout. An equivalent pip-based entry is:

{
  "mcpServers": {
    "visforge": {
      "command": "C:\\Users\\Paul Beck\\Desktop\\VisForge\\.venv\\Scripts\\visforge.exe"
    }
  }
}

Connect to Plasticity

  1. In Plasticity, enable the bridge server. The usual location is Preferences, Server, on localhost port 8980.

  2. Start the VisForge connector in a second terminal when you want the write channel:

uv run visforge-connector

The connector listens on 127.0.0.1:9741.

  1. Start the MCP server and call plasticity_connect.

plasticity_connect tries the connector first and the live link second. If both are down, the backend is offline-mirror and modeling tools still return a scene. plasticity_refresh fills remote from the live link when that socket is open.

Environment variables:

Variable

Default

Meaning

VISFORGE_PLASTICITY_BRIDGE

ws://127.0.0.1:8980

Plasticity live-link URL

VISFORGE_PLASTICITY_CONNECTOR

ws://127.0.0.1:9741

VisForge connector URL

VISFORGE_CONNECT_TIMEOUT

2.0

Seconds to wait for each socket

VISFORGE_DEPTH_WEIGHTS

empty

Optional weight-file path recorded by the depth tool

Example

Ask the host to create a housing, or call the tools directly.

import asyncio

from visforge.agents.loop import run_loop
from visforge.plasticity.session import PlasticitySession

session = PlasticitySession()
result = asyncio.run(run_loop("a box with a cylindrical hole", session=session))
print(result["passed"], result["backend"])

Tool calls a host can make:

{"name": "plasticity_create_primitive", "arguments": {"kind": "box", "name": "body", "size_x": 40, "size_y": 24, "size_z": 12}}
{"name": "plasticity_create_primitive", "arguments": {"kind": "cylinder", "name": "cutter", "size_x": 4, "size_z": 12}}
{"name": "plasticity_boolean", "arguments": {"operation": "subtract", "target": "body", "tool": "cutter"}}
{"name": "check_scene", "arguments": {}}
{"name": "validate_mesh", "arguments": {"sample": "unit_cube"}}
{"name": "analyze_screenshot", "arguments": {"synthetic": "centered_block"}}

analyze_screenshot returns luminance, edge fraction, symmetry, an 8 by 8 grid, and a relative depth summary. validate_mesh returns manifold and watertight flags, volume, and proportions. Pass path to either vision tool when you have a viewport capture. PNG and JPEG use OpenCV when it is installed.

estimate_depth exposes the same relative-depth fields a Depth Anything V2 runner would fill. This starter uses a luminance proxy and sets model_loaded to false.

Tools

Tool

Purpose

plasticity_connect

Open the connector and the live link

plasticity_status

Backend, URLs, and the mirror

plasticity_refresh

Scene summaries from the live link

plasticity_new_scene

Clear the mirror and the connector

plasticity_create_primitive

Box, sphere, or cylinder, by volume center

plasticity_center_box

Manual Center Box, from the base center

plasticity_corner_box

Manual Corner Box

plasticity_sphere

Manual Sphere. The Radius field is the radius

plasticity_cylinder

Manual Cylinder, from the base circle

plasticity_place_on

Seat one named solid on another

plasticity_boolean

Union, Difference, or Intersect. Slice and Region are refused

plasticity_move

Move dialog XYZ offset

plasticity_scale

Scale dialog XYZ factors about the bounding box

plasticity_duplicate

Duplicate, then offset

plasticity_mirror

Mirror across a world plane

plasticity_rectangular_array

Spacing or extent array

plasticity_hollow

Closed hollow of a box

plasticity_measure

Center distance and AABB gap

list_commands

Plasticity manual command list

describe_command

One command, its shortcut, and recorded dialog fields

list_skills

Skill catalog used by the planner

plan_model

Deterministic baseline plan

run_agent_loop

One Planner, Actor, Critic pass

check_scene

Volume and overlap critique

check_intersections

Pairwise solid overlaps

analyze_screenshot

Edges, symmetry, coarse grid

estimate_depth

Relative monocular depth summary

validate_mesh

Manifold, volume, proportions

reset_model

New in-memory session, no network

Development

uv run pytest
uv run visforge-connector --host 127.0.0.1 --port 9741

The package layout:

src/visforge/
  server.py            MCP entry point
  plasticity/          connector protocol, live-link codec, session, skills
  perception/          screenshots and relative depth
  geometry/            mesh validation and solid overlap
  agents/              planner, actor, critic
  tools/               semantic tool functions
tests/
docs/architecture.md
connectors are the `visforge-connector` console script

License

MIT. Copyright (c) 2026 Paul Beck. See LICENSE.

Available Tools

29 tools
analyze_screenshotB

Measure edges, symmetry, and a coarse grid for a viewport capture.

PNG and JPEG are read with OpenCV when the vision extra is installed. Binary P5 PPM is read by VisForge itself. With no path, a built-in pattern is analyzed.

Inputs: path, synthetic. Returns: object

check_intersectionsB

Report analytic overlaps among the active solids in the session.

Inputs: no named parameters. Returns: object

check_sceneA

Critique the current analytic scene for volume and unexplained overlap.

Inputs: no named parameters. Returns: object

describe_commandB

Describe one Plasticity manual command, including the dialog fields VisForge has recorded.

Inputs: name (required). Returns: object

estimate_depthA

Return a relative monocular depth summary for a capture or built-in pattern.

The fields match a Depth Anything V2 style result. This starter fills them with a luminance proxy and does not load the network.

Inputs: path, synthetic. Returns: object

list_commandsC

List Plasticity manual commands. family can be tool, sketch, solid, common, document, or selection.

Inputs: family. Returns: object

list_skillsA

List the Plasticity skill catalog, including skills that are specified but not executed.

Inputs: no named parameters. Returns: object

plan_modelA

Decompose a modeling request into parts, relations, and checks.

This baseline planner is deterministic. A host model may ignore it and call the skill tools directly.

Inputs: intent (required). Returns: object

plasticity_booleanB

Boolean the tool solid into the target.

operation is union, difference, or intersect. subtract is accepted as the
older name for difference. Slice and Region are documented and not executed.
keep_tools leaves the tool solid in the scene, matching Keep Tools.

Inputs: tool (required), target (required), operation (required), keep_tools. Returns: object

plasticity_center_boxB

Create a Center Box. The point is the center of the base, and height grows along +Z.

Inputs: name, width, base_x, base_y, +3 more. Returns: object

plasticity_connectA

Connect to the VisForge connector and to Plasticity's live-link server.

A closed application is a normal result. The session then uses the analytic mirror. Writes reach Plasticity only when a connector reports that it executed them.

Inputs: no named parameters. Returns: object

plasticity_corner_boxC

Create a Corner Box from two diagonal base corners and a height along +Z.

Inputs: name, base_z, height, corner_ax, +3 more. Returns: object

plasticity_create_primitiveB

Create a box, sphere, or cylinder on the Plasticity session.

Units are millimeters and Z is up. For a sphere, size_x is the radius.
For a cylinder, size_x is the radius and size_z is the height.

Inputs: kind (required), name, size_x, size_y, +4 more. Returns: object

plasticity_cylinderC

Create a vertical Cylinder. The point is the center of the base circle.

Inputs: name, base_x, base_y, base_z, +2 more. Returns: object

plasticity_duplicateC

Duplicate a named solid and offset the copy by the Duplicate dialog XYZ amounts.

Inputs: name (required), x, y, z, +1 more. Returns: object

plasticity_hollowC

Hollow a box by a uniform wall thickness. local face hollowing is not executed.

Inputs: name (required), thickness (required), local. Returns: object

plasticity_measureB

Measure the center distance and AABB gap between two named solids.

Inputs: first (required), second (required). Returns: object

plasticity_mirrorC

Mirror a named solid across a world plane perpendicular to axis.

axis is x, y, or z. origin is the plane position on that axis. cut asks for Cut down mirror plane and is not executed.

Inputs: axis (required), name (required), cut, origin, +2 more. Returns: object

plasticity_moveC

Move a named solid by the Move dialog XYZ amounts, in world millimeters.

Inputs: name (required), x, y, z, +1 more. Returns: object

plasticity_new_sceneC

Clear the analytic scene mirror and ask the connector to clear its copy.

Inputs: no named parameters. Returns: object

plasticity_place_onC

Seat a named solid on the +Z face of another, sharing its XY center.

Inputs: subject (required), support (required), gap. Returns: object

plasticity_rectangular_arrayB

Array a named solid. number is the total count along axis, including the source.

mode is spacing or extent. axis2 and number2 add the second direction.

Inputs: axis (required), name (required), mode, axis2, +4 more. Returns: object

plasticity_refreshC

Read object summaries from Plasticity's live link and return the local scene.

Inputs: visible_only. Returns: object

plasticity_scaleB

Scale a named solid by the Scale dialog XYZ factors about its bounding-box center.

Inputs: name (required), x, y, z. Returns: object

plasticity_sphereC

Create a Sphere. The manual's Radius field is used as the radius, in millimeters.

Inputs: name, radius, center_x, center_y, +1 more. Returns: object

plasticity_statusA

Report the active backend, channel URLs, and the analytic scene.

Inputs: no named parameters. Returns: object

reset_modelA

Replace the process session with an empty offline mirror.

This does not contact Plasticity. Use plasticity_new_scene when a
connector is already connected and should be cleared too.

Inputs: no named parameters. Returns: object

run_agent_loopC

Run one planner, actor, and critic pass on the current session.

Set screenshot to a file path to attach perception. Set it to "synthetic" to attach the built-in centered block instead of a capture.

Inputs: intent (required), screenshot. Returns: object

validate_meshB

Check manifold edges, watertightness, volume, and proportions.

Use sample "unit_cube" or "open_corner", or pass mesh_json as
{"vertices": [[x, y, z], ...], "faces": [[i, j, k], ...]}.
trimesh and Open3D contribute extra fields when they are installed.

Inputs: sample, mesh_json. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 29 tools

    Disambiguation3/5

    Most tools target a distinct resource plus action, but there is real overlap between the generic plasticity_create_primitive and the role-specific plasticity_sphere / plasticity_cylinder / plasticity_center_box / plasticity_corner_box, and between plasticity_new_scene and reset_model (only the description disambiguates them). The cluster of checking tools (check_scene, check_intersections, plasticity_measure, validate_mesh) is separable but requires careful reading, and plan_model vs run_agent_loop border on the same workflow.

    Naming Consistency3/5

    All names are snake_case, which is good, but two conventions are mixed: a plasticity_ prefix for live-link operations and bare names for local analytics, and within the prefixed group some names are verb-first (plasticity_create_primitive, plasticity_move) while others are noun-only (plasticity_sphere, plasticity_cylinder, plasticity_mirror). Readable, but not a single predictable verb_noun pattern.

    Tool Count2/5

    29 tools exceeds the 25+ threshold and the surface spans four loosely related areas (Plasticity live link, manual/skill introspection, agent loop, and vision/mesh validation). Several tools look like thin wrappers (plasticity_sphere, plasticity_cylinder) that could fold into the generic primitive creator.

    Completeness4/5

    Creation, transforms, booleans, arrays, measurement, scene reset, and mesh/overlap validation are all present, which covers the core modeling loop. The notable gap is that there is no delete/remove-solid or undo tool, and no export/save path, so agents can build and inspect but cannot clean up or persist results.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI clients to execute editable-3D design programs, inspect their geometry, and replay or revise native project files through MCP tools.
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to build and edit native CAD parts and assemblies, inspect saved geometry and measurements, retain revisions, run mechanism and interference checks, and export STEP/STL/GLB artifacts through MCP tools.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI assistants to drive a browser-based vector sketch board and parametric 3D modeller over MCP, including drawing, editing, 3D feature operations, mates, simulation, checks, and exports.
      24
      MIT