Skip to content
Conduit

mcp server

forma-dsl

A declarative DSL for parametric CAD and 3D modeling, with an MCP server, browser editor, and live WebGL previews. JavaScript monorepo published to npm.

kalpak44/forma-dslcommunitylistedunreviewednot running here yet

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • Node.js 20 or newer
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "kalpak44-forma-dsl": {
      "command": "npx",
      "args": [
        "-y",
        "forma-dsl-mcp"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 14, 2026

forma-dsl

Release forma-dsl on npm forma-dsl-cli on npm forma-dsl-mcp on npm M8ven Verified

A declarative DSL for 3D modeling and scene composition, reusable components, and live previews. This is the monorepo: the library, the command line and the MCP server that consume it, the editor, and the reference manual.

The site · Try the editor · Read the reference

npx forma-dsl-cli render riser.forma -p height=32 -o riser.stl

The live demo types each document out and solves it as it goes, then re-solves as a parameter moves - in the browser, with the same kernel.

param height { type = number  default = 20  min = 8  max = 40 }

model "riser" {
  part "body" {
    color = "#6f7d8c"
    difference {
      extrude {
        height = var.height
        rounded_rect { size = [40, 20]  radius = 4  center = true }
      }
      translate { offset = [0, 0, 3]  cylinder { radius = 5  height = var.height } }
    }
  }
}

Workspaces

PackagePublishedWhat it is
packages/forma-dslforma-dslThe language, its evaluator and the geometry kernel binding. One runtime dependency
packages/forma-dsl-cliforma-dsl-cliThe forma command: solve a document to STL in a build, with no browser. One runtime dependency, the library
packages/forma-dsl-mcpforma-dsl-mcpAn MCP server over stdio: it knows the language, solves what it writes, and produces .forma files
apps/landingnoThe landing page: a live WebGL hero, a demo that types the language and solves it, and the privacy and terms sheets
apps/editornoThe browser editor: CodeMirror, three.js, Vite
apps/docsnoThe reference manual, and the builder that renders it

How the pieces are kept honest

Every workspace here depends on the published entry point, not on the library's sources: the editor imports forma-dsl, never ../../packages/forma-dsl/src. An export one of them needs and the package does not have therefore fails in this repository rather than in someone's install.

The same rule governs what each workspace may claim about the language. None of them restates the vocabulary - each reads it from the library's own registries, and a test holds them to it:

  • Syntax highlighting is generated, not transcribed. The editor's (language.js), the landing page's (highlight.js) and the manual's (build.mjs) all colour from BLOCKS and FUNCTIONS, so a block added to the language is highlighted without anyone updating a list.
  • Every example on the site renders. The editor's four documents (examples.test.js) and the landing page's demos (demos.test.js) are solved by tests, so nothing shown being typed is a document the library can no longer build.
  • The MCP server's catalogue cannot drift. It merges the registries into its own prose at load time and exposes any disagreement as catalogueDrift, which catalogue.test.js asserts is empty. Its worked examples are rendered at both ends of every parameter's range.
  • The editor's completion offers the whole language. It is built from BLOCKS, FUNCTIONS, CONSTANTS and TYPE_NAMES, and completion.test.js asserts that no name in a registry is missing from what the editor offers - so a block added to the language is suggested without anyone updating a list.
  • The manual has no dead cross-references. npm run build resolves all 237 internal links and fails rather than publishing a broken one.

Working on it

Node 22.13 or newer - the floor the published packages declare.

npm ci
npm run check   # lint, typecheck, tests, build, package contents: the whole gate, same as CI
CommandWhat it does
npm run devthe landing page, with hot reload
npm run dev:editorthe editor
npm run mcpthe MCP server, on stdio
npm run clithe forma command, from the source tree
npm testevery workspace's tests
npm run test:coveragethe same, against the thresholds CI enforces
npm run buildthe whole site into dist/

CONTRIBUTING.md has the house style, the stability policy and how a release is cut. CHANGELOG.md records what changed in each one.

Found something exploitable? SECURITY.md says where to send it - please not a public issue. PRIVACY.md covers the published packages: neither makes a network request, and the MCP server writes only inside the directories your client declares.

License

MIT - see LICENSE.

↑↓ navigate openesc close