ReverseCAD MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ReverseCAD MCPconvert turbine-blade.stl to STEP AP242 and features JSON"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
βοΈ ReverseCAD: Industrial-Grade STL β STEP AP242 + CAD Features Engine
High-performance, 100% pure TypeScript reverse-engineering engine and MCP server that deterministically transforms raw .stl polygon meshes into clean, production-grade solid B-Rep models (STEP AP242 / ISO 10303-21) and dense engineering CAD Features JSON in seconds.
π Quick Start β’ β¨ Key Capabilities β’ π Output Artifacts β’ ποΈ Architecture β’ π€ MCP Server β’ π§ͺ Testing β’ π’ Commercial Licensing β’ π¨βπ» Author
β¨ Key Engineering Capabilities
Engineering Feature | Technology & Mathematical Method | Representation in STEP & JSON |
π§ Watertight Solid B-Rep Guarantee | Euler-PoincarΓ© invariant ($\chi = 2 - 2g$), symmetric half-edge pairing, 64-bit quantized topological vertex pool. | STEP: |
βοΈ Exact Gauss-Mirtich Mass & 3D Inertia | Analytical divergence theorem integration with exact | JSON: |
π§Ή Boundary Unification (No Extra Lines) | Coplanar half-edge cancellation, Jordan cycle extraction, RDP collinear vertex reduction ($10^{-5}$ mm). | STEP: Clean unified |
π 2D Gauss Area Angle Sweep Triangulator | Monotonic cyclic angle sweep ( | Guarantees 100% topological band closure between top and bottom loops without butterfly self-intersections. |
π Seamless C0 Profile Fitting | Algebraic least-squares circle fitting (KΓ₯sa/Pratt), seamless tangent line-to-arc transitions without edge duplication, $2\pi$ circle closure. | STEP: Precise |
π© ISO Metric Threads (M2βM24) | Catalog matching, coaxial cylinder RANSAC, pitch $P$ and tap drill diameter extraction. Mode selectable ( | STEP: Optional cosmetic helical geometry or analytical core.JSON: |
π‘οΈ Scale-Invariant & Datum Shielding | Dynamic scale normalization $D_{\text{bbox}}$, Tier E protection for micro-chamfers, strict datum plane locks ( | Prevents decimation erosion on 45Β° entrance chamfers and critical reference datums. |
π³οΈ Internal Cavities & Channels | Signed volume divergence theorem integration per closed manifold shell ($V < 0$). | Internal cooling lines and cavities remain 100% hollow during slicing and CAD import. |
β‘ DWRR Concurrency & Zero-GC Profiling | Deficit Weighted Round-Robin fair-share scheduling, dynamic CPU core/RAM scaling, Structure-of-Arrays (SoA) binary heaps. | Eliminates head-of-line blocking on 16-core systems. Heap delta: 0.00 MB during hot loops. |
π¬ RSVS 5-Gate Reality Simulation | Strict verification: Hausdorff $H_{99} \le 0.05$ mm, $H_{\max}$ via $O(N)$ QuickSelect, RMSE, mass drift, native B-Rep topological validation. | Pre-manufacturing geometric sign-off before sending code to CNC mills or 3D printers. |
Related MCP server: lucad
π Output Artifacts
Running ReverseCAD produces up to 5 synchronized manufacturing artifacts plus a streaming audit manifest:
output_directory/
βββ π§ [1] Model.step <- 3D CAD Solid B-Rep (ISO 10303-21 AP242 / AP214)
βββ β‘ [2] Model.cad_features.summary.json <- High-density AI JSON (<1200 tokens)
βββ π¬ [3] Model.cad_features.topology.json <- Deep B-Rep topological geometry dump
βββ π [4] Model.verification_report.json <- RSVS 5-Gate quality & accuracy report
βββ π [5] Model.heatmap.glb <- 3D interactive color deviation heatmap
βββ π conversion_manifest.ndjson <- Real-time streaming pipeline audit logπ Quick Start & CLI Usage
1. Requirements & Installation
Node.js
>= 20.0.0or Bun>= 1.1.0macOS (Apple Silicon ARM64 / Intel x64), Linux (x86_64 / aarch64), or Windows
# Clone the repository
git clone https://github.com/grizlizora/reverse-cad.git
cd reverse-cad
# Install dependencies and compile
npm install
npm run build
# Make the driver executable
chmod +x ./convert.sh2. Basic Conversions
# Convert STL to production solid STEP AP242 with default outputs
./convert.sh model.stl
# Or using Bun directly
bun run src/cli/index.ts model.stl3. Selective Artifact Emission (--emit)
Control exactly which files are generated to minimize I/O and optimize throughput:
# 1. Solid-Only: Generate ONLY the 3D STEP solid (fastest, zero JSON)
./convert.sh part.stl --emit step # (or: ./convert.sh part.stl --step-only)
# 2. AI Package: STEP solid + compact AI engineering summary JSON
./convert.sh part.stl --emit step,summary
# 3. Full Engineering Audit: All 5 artifacts including GLB 3D deviation heatmap
./convert.sh part.stl --emit all
# 4. JSON-Only: Skip STEP generation entirely, extract CAD features in milliseconds
./convert.sh part.stl --json-only4. Advanced CLI Options
Flag | Values | Description |
|
| Number of parallel worker threads ( |
|
| Processing preset: |
|
| Custom destination directory for generated artifacts (default: |
| β | Launch interactive terminal wizard to select outputs and options. |
| β | Non-interactive mode: accept defaults without prompting (ideal for CI/CD). |
|
| Comma-separated outputs: |
|
| STEP geometry mode: analytical |
|
| Metric thread mode: physical modeled threads, semantic annotation, or auto. |
|
| Assign material density: |
|
| Control 3D GLB deviation heatmap generation. |
| β | Auto-align 6 canonical views (Top/Bottom/Front/Back) for CAD viewers (default). |
| β | Preserve original coordinates without CAD axis reorientation. |
| β | Enable or disable the RSVS 5-Gate reality simulation verification suite. |
| β | Start as a Stdio MCP Server for AI coding assistants. |
| β | Run embedded RSVS regression test suite and mutation tests. |
| β | Enable verbose debugging logs. |
π€ Model Context Protocol (MCP) Server
ReverseCAD implements the official Model Context Protocol (MCP) specification (Stdio transport). AI assistants (Cursor, Claude Desktop, Antigravity) can analyze, query, and convert 3D CAD geometries directly within the chat workflow.
Configuration
Add ReverseCAD to your AI assistant's config file (e.g., claude_desktop_config.json or .gemini/antigravity/mcp/):
{
"mcpServers": {
"reverse-cad": {
"command": "node",
"args": ["/absolute/path/to/reverse-cad/dist/mcp/mcp-server.js"]
}
}
}Or with Bun:
{
"mcpServers": {
"reverse-cad": {
"command": "bun",
"args": ["/absolute/path/to/reverse-cad/src/mcp/mcp-server.ts"]
}
}
}Available MCP Tools
MCP Tool Name | Input Parameters | Output & Purpose |
|
| Analyzes mesh quality, triangle count, watertightness, bounding box, volume, and surface area. |
|
| Detects ISO metric threads (M2βM24), nominal diameters, pitches, and tap drill specifications. |
|
| Runs RSVS 5-Gate reality simulation, returning Hausdorff $H_{99}$, RMSE, and Euler characteristic. |
|
| Converts STL to solid STEP AP242 and emits CAD features JSON artifacts. |
ποΈ Clean Code & Strict Modularity Architecture
ReverseCAD enforces an uncompromising architectural policy:
Strict Line Limit (< 190 lines): Every single module across all 355+ TypeScript files in
src/is strictly under 190 lines of code. There are zero "God-objects".Single Responsibility Principle (SRP): Complex algorithms (e.g. QEM decimation, RANSAC segmentation, B-Rep synthesis) are decoupled into focused, testable micro-modules.
Acyclic Dependency Graph (DAG): Circular dependencies are strictly eliminated through dependency inversion and dedicated coordinator facades.
Zero-Allocation Hot Paths: FPU-heavy geometric loops operate entirely on flat
TypedArraybuffers (Float32Array,Float64Array,Int32Array,Uint8Array) and Structure-of-Arrays (SoA) binary heaps.
Detailed architectural diagrams, mathematical formulations, and concurrency designs are available in docs/ARCHITECTURE.md.
π§ͺ Test Suite & Quality Verification
ReverseCAD features an extensive, multi-tier automated test suite verifying mathematical precision, topological closure, concurrency, and real-world CAD benchmarks.
# Run the complete test suite in Bun
bun run src/test/run-tests.ts
# Or run the compiled test suite in Node.js
npm testEmbedded Test Suites:
Wave 8β10 Math & Concurrency Verification:
Exact Gauss-Mirtich inertia tensor ($120.0$ divisor, $I_{xy} = 0.0$ on unit cube).
2D Gauss polygon area loop winding direction (Shoelace formula).
Seamless line-to-arc profile continuity without edge duplication.
Strict CLI enum argument validation.
Decoupled spatial grid and deterministic PRNG sampling.
Boundary Unifier & Feature Protection (
test-boundary-unifier.ts):8/8 tests verifying coplanar face unification, collinear vertex reduction, and hole loop extraction.
Crease Preservation (
test-crease-preservation.ts):In-memory decimation test preserving 90Β° sharp edges and 45Β° chamfers with $H_{\max} = 0.0000$ mm.
Watertight Solid B-Rep Hole (
test-watertight-solid-hole.ts):Verifies 100% closed solid cube with cylindrical hole (Faces = 18, OpenEdges = 0, NonManifold = 0).
RSVS Reality Simulation Benchmarks (Gates G0βG4):
benchmark_prismatic_m6.stl(M6 metric thread detection).benchmark_internal_labyrinth.stl(Zero-voxel internal cavity detection).benchmark_pip_hinge.stl(Print-in-Place clearance detection).benchmark_organic_saddle.stl(Hyperbolic paraboloid freeform reconstruction).Combinatorial Matrix Scanner & Zero-GC Memory Leak Audit.
π Licensing & Commercial Options
ReverseCAD uses a transparent Dual-Licensing Model:
π’ Community Edition (PolyForm Noncommercial 1.0.0):
100% Free for individuals, students, makers, hobbyists, and non-commercial educational/academic research.π’ Commercial & Enterprise Edition ($10,000 USD / year):
Required for all for-profit enterprises, manufacturing bureaus, 3D print farms, CNC machine shops, closed-source SaaS products, and commercial applications. Includes legal indemnification, enterprise support, and SLA. See COMMERCIAL.md.
π¨βπ» Author & Collaboration
Designed and engineered with passion by Roman (@grizlizora) β Specialist in High-Performance Computational Geometry, B-Rep CAD Kernels, Multithreaded Systems, and AI Agent Integrations.
π¬ Telegram: @grizlizora
π GitHub: @grizlizora
π§ Email: roma.vaida66@gmail.com
πΌ LinkedIn: Roman Vaida
This server cannot be deployed
Maintenance
Related MCP Connectors
- OwlCADOAuthcom.owlcad
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
AI Hub for AEC β 50+ 3D formats, clash detection, ACC integration via Autodesk Platform Services.
Convert Revit files to XKT, IFC, or DWG and query BIM data via natural language.
Real 3D-print slicing, quoting, DFM, orientation & material/settings advisors. Free personal tier.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceGive your AI assistant the ability to inspect, measure, and compare 3D CAD models by dropping in a STEP file and asking engineering questions. Runs entirely on your machine with no cloud, no CAD license, and no setup.119 npm5MIT
- AlicenseNot gradedqualityBmaintenanceEnables agent-assisted CAD engineering, allowing users to create, validate, and export CAD designs through natural language, with a deterministic engine that has zero LLM runtime dependency.Academic Free v1.1
- AlicenseBqualityBmaintenanceEnables LLMs to reconstruct parametric Fusion 360 models from mesh (STL/3MF) or photo inputs by analyzing geometry and creating editable features via a Fusion 360 add-in bridge.34MIT
- FlicenseAqualityBmaintenanceEnables AI assistants to perform high-performance 3D CAD design, ultra-fast multi-view rendering, immutable versioned project management, and geometry/mesh verification for 3D printing on Windows.17-