tscad GitHub
new STEP · STL · 3MF · DXF · MCP for agents

CAD as TSX.

Write solid models as typed JSX components. tscad compiles them to an exact B-rep with a real CAD kernel in WebAssembly. Models are parametric, versionable, and as composable as any React app.

$ bunx tscad init my-part
<BoardCase board={boards.raspberryPi5} />
A Raspberry Pi 5 case generated by tscad from the board's connector data

Parts are components.

Parameters are typed props, holes are components from tscad/parts, and edges are picked by what they are, not by fragile indices.

import { defineParams, edges, type ParamValues } from "tscad"
import { BoltPattern, CounterboreHole, mountPatterns } from "tscad/parts"

export const params = defineParams({
  thickness: { type: "number", default: 6, min: 3, max: 12, unit: "mm" },
  corner: { type: "number", default: 6, min: 0, max: 12, unit: "mm" },
})

export default function MotorMount(p: ParamValues<typeof params>) {
  const { thickness: t, corner } = p
  const motor = mountPatterns.nema17
  return (
    <part name="mount" material="petg">
      <difference>
        <fillet radius={corner} edges={edges.vertical()}>
          <box size={[60, 60, t]} />
        </fillet>
        <cylinder d={motor.pilot + 0.5} h={t} />
        <BoltPattern pattern={motor} z={t}>
          <CounterboreHole size="M3" depth={t} />
        </BoltPattern>
      </difference>
    </part>
  )
}
motor-mount.tsx
The motor mount rendered
NEMA 17 mount · counterbored M3 · 2 paramsEdit in playground →

Everything a part needs.

A real modelling toolkit with friendly defaults: lengths in millimetres, Z up, boxes sitting on the build plate.

Exact B-rep kernel

solidcore runs in WebAssembly (or natively, 2–3× faster): booleans, fillets, chamfers, shells, revolves, lofts and sweeps on exact geometry, with true STEP export.

Just TypeScript

Components, .map, conditionals, npm packages. Every element and prop is typed and documented in your editor.

Parametric by default

defineParams gives typed props and live sliders; the kernel caches unchanged subtrees, so tweaks rebuild fast.

Sketches that make sense

Draw 2D shapes; nested loops become holes. Exact 2D booleans, hulls, offsets, text, SVG paths and constraint-solved sketches.

Instant feedback

tscad dev hot-reloads a viewer; errors point at your TSX line; click an edge to get its selector.

Built for agents

tscad mcp lets Claude write, evaluate, render and export models, with a reference generated from the types.

Gallery

Complete parametric models. Open any of them in the playground.

All examples →

Design with Claude.

tscad ships an MCP server. Add it to Claude Code and ask for a part: it reads the reference, writes the TSX, evaluates it with the kernel, looks at the render, fixes what fails, and exports STEP.

MCP server docs →

claude mcp add tscad -- bunx tscad mcp