{"_id":"@caliperhq/jscad-mcp","_rev":"3-8a326a778896166ab7022c5afbc0ab1d","name":"@caliperhq/jscad-mcp","dist-tags":{"latest":"0.1.0-beta.4"},"versions":{"0.0.0":{"name":"@caliperhq/jscad-mcp","version":"0.0.0","license":"MIT","_id":"@caliperhq/jscad-mcp@0.0.0","maintainers":[{"name":"msd-hq","email":"dev@caliperhq.dev"}],"homepage":"https://github.com/caliperhq/jscad-mcp#readme","bugs":{"url":"https://github.com/caliperhq/jscad-mcp/issues"},"dist":{"shasum":"41f0ff9ee4c7ff3b1e830f935c8381935f6179bb","tarball":"https://registry.npmjs.org/@caliperhq/jscad-mcp/-/jscad-mcp-0.0.0.tgz","fileCount":2,"integrity":"sha512-mLk1cNv9l/1M0Mg5THGGTHSqnMQi/hHCeTwZG09m4CY8sG5auiURFctQx0HFhpt/xrmm8FlMcNwmCKEOnWUA2w==","signatures":[{"sig":"MEUCIDNXfFC5HbJohFagpqGvaHrGJT0yXoyRk/XvWbOP12fYAiEAzCw7m9ugLQ0Sg4w6Cw3zJpJj965dkMLtSOur8EsblcI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":431},"_npmUser":{"name":"msd-hq","email":"dev@caliperhq.dev"},"repository":{"url":"git+https://github.com/caliperhq/jscad-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Placeholder — see https://github.com/caliperhq/jscad-mcp for the real package","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jscad-mcp_0.0.0_1779846948461_0.18824737804981018","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-beta.1":{"name":"@caliperhq/jscad-mcp","version":"0.1.0-beta.1","keywords":["openjscad","jscad","mcp","model-context-protocol","claude","3d","cad","parametric"],"license":"MIT","_id":"@caliperhq/jscad-mcp@0.1.0-beta.1","maintainers":[{"name":"msd-hq","email":"dev@caliperhq.dev"}],"homepage":"https://github.com/caliperhq/jscad-mcp#readme","bugs":{"url":"https://github.com/caliperhq/jscad-mcp/issues"},"bin":{"jscad-mcp":"src/index.js"},"dist":{"shasum":"25ed5063b665b96a3ce70bddee55399c2014da31","tarball":"https://registry.npmjs.org/@caliperhq/jscad-mcp/-/jscad-mcp-0.1.0-beta.1.tgz","fileCount":27,"integrity":"sha512-G5rBD4fD8CNjUS5QedS3aygWCA+eBwYot2hlvv8PbVrwi+s4ZcPNzxxe9tvzI0zZ5VxFbK2YDvn9m78LzVh7kg==","signatures":[{"sig":"MEUCIGzQYBTcYYqvCQ7uomegZF6oVyJSz3Pok0uXj4Wgt4rwAiEAp8APIFztnljXZ4Bh5BL9Y25srEtchSbxYpHa4Q9wnRQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@caliperhq%2fjscad-mcp@0.1.0-beta.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":192262},"main":"src/index.js","engines":{"node":">=18"},"gitHead":"9b644c2963d5e920784b9d122d4b991a08523025","scripts":{"start":"node src/index.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f7349d2d-e752-4165-93db-1dce54b3eec9"}},"repository":{"url":"git+https://github.com/caliperhq/jscad-mcp.git","type":"git"},"_npmVersion":"11.15.0","description":"MCP server for OpenJSCAD — gives Claude visual and structural awareness of JSCAD models","directories":{},"_nodeVersion":"22.22.3","dependencies":{"gl":"^6.0.2","zod":"^3.23.8","chokidar":"^3.5.3","@jscad/web":"^2.6.13","@jscad/modeling":"^2.13.0","@jscad/img-utils":"^2.0.5","@jscad/array-utils":"^2.1.4","@jscad/regl-renderer":"^2.6.15","@jscad/stl-serializer":"^2.1.23","@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jscad-mcp_0.1.0-beta.1_1779860946275_0.040685056875764625","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-beta.4":{"name":"@caliperhq/jscad-mcp","version":"0.1.0-beta.4","description":"MCP server for OpenJSCAD — gives Claude visual and structural awareness of JSCAD models","main":"src/index.js","bin":{"jscad-mcp":"src/index.js"},"engines":{"node":">=18"},"scripts":{"start":"node src/index.js"},"keywords":["openjscad","jscad","mcp","model-context-protocol","claude","3d","cad","parametric"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/caliperhq/jscad-mcp.git"},"dependencies":{"@jscad/array-utils":"^2.1.4","@jscad/img-utils":"^2.0.5","@jscad/modeling":"^2.13.0","@jscad/regl-renderer":"^2.6.15","@jscad/stl-serializer":"^2.1.23","@jscad/web":"^2.6.13","@modelcontextprotocol/sdk":"^1.12.0","chokidar":"^3.5.3","gl":"^6.0.2","zod":"^3.23.8"},"gitHead":"f41348b5df1ec35c212c2184df88fd30044dadb1","_id":"@caliperhq/jscad-mcp@0.1.0-beta.4","bugs":{"url":"https://github.com/caliperhq/jscad-mcp/issues"},"homepage":"https://github.com/caliperhq/jscad-mcp#readme","_nodeVersion":"22.22.3","_npmVersion":"11.16.0","dist":{"integrity":"sha512-QyIqizWOQGlR6mMh7WM33Fd81un3lVdFBDrRyraaJvcLFIqX1ZxcCRToXvRypAXTpX8URZ410BPT+TjP2cPuXA==","shasum":"b805f38aecb7dfd3241a388a96425b8aba47ec50","tarball":"https://registry.npmjs.org/@caliperhq/jscad-mcp/-/jscad-mcp-0.1.0-beta.4.tgz","fileCount":28,"unpackedSize":213367,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@caliperhq%2fjscad-mcp@0.1.0-beta.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFm2OvkGkTP5JHrX7kSWNW48RkkelvG+fKjhimSqA5vdAiEAh4amJGEphvpwxwIliVy/fwv17CRP5u3r/lioR66DUB0="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f7349d2d-e752-4165-93db-1dce54b3eec9"}},"directories":{},"maintainers":[{"name":"msd-hq","email":"dev@caliperhq.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jscad-mcp_0.1.0-beta.4_1779923474092_0.8007501141833995"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-27T01:55:48.255Z","modified":"2026-05-27T23:11:14.514Z","0.0.0":"2026-05-27T01:55:48.600Z","0.1.0-beta.1":"2026-05-27T05:49:06.448Z","0.1.0-beta.4":"2026-05-27T23:11:14.228Z"},"bugs":{"url":"https://github.com/caliperhq/jscad-mcp/issues"},"license":"MIT","homepage":"https://github.com/caliperhq/jscad-mcp#readme","keywords":["openjscad","jscad","mcp","model-context-protocol","claude","3d","cad","parametric"],"repository":{"type":"git","url":"git+https://github.com/caliperhq/jscad-mcp.git"},"description":"MCP server for OpenJSCAD — gives Claude visual and structural awareness of JSCAD models","maintainers":[{"name":"msd-hq","email":"dev@caliperhq.dev"}],"readme":"# jscad-mcp\n\n[![npm](https://img.shields.io/npm/v/@caliperhq/jscad-mcp?logo=npm)](https://www.npmjs.com/package/@caliperhq/jscad-mcp)\n[![downloads](https://img.shields.io/npm/dm/@caliperhq/jscad-mcp)](https://www.npmjs.com/package/@caliperhq/jscad-mcp)\n[![CI](https://github.com/caliperhq/jscad-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/caliperhq/jscad-mcp/actions/workflows/ci.yml)\n[![provenance](https://img.shields.io/badge/provenance-signed-success?logo=sigstore)](https://www.npmjs.com/package/@caliperhq/jscad-mcp)\n[![Node](https://img.shields.io/node/v/@caliperhq/jscad-mcp)](https://nodejs.org)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n> Part of [**caliperhq**](https://caliperhq.dev) — open-source tools that give Claude senses for the things it builds.\n\nAn MCP server that gives Claude visual and structural awareness of OpenJSCAD models. Renders `.jscad` files to PNG using the OpenJSCAD geometry kernel and returns images directly into Claude's context — closing the perception loop so Claude can see what it builds.\n\nA **live web viewer** runs alongside the server. Every render Claude produces is pushed to the viewer in real-time via SSE, so you always see exactly what Claude sees.\n\n## Gallery\n\n| Cycloidal drive | Engine cutaway | Gyroid lattice |\n|---|---|---|\n| [![cycloidal](https://raw.githubusercontent.com/caliperhq/jscad-mcp/main/docs/gallery/cycloidal_iso.png)](https://github.com/caliperhq/jscad-mcp-example/blob/main/EXAMPLES.md#cycloidal-drive-reducer) | [![engine](https://raw.githubusercontent.com/caliperhq/jscad-mcp/main/docs/gallery/engine_slice_y.png)](https://github.com/caliperhq/jscad-mcp-example/blob/main/EXAMPLES.md#cutaway-4-stroke-engine) | [![gyroid](https://raw.githubusercontent.com/caliperhq/jscad-mcp/main/docs/gallery/gyroid_iso.png)](https://github.com/caliperhq/jscad-mcp-example/blob/main/EXAMPLES.md#gyroid-lattice-cube) |\n\nEngine crank-angle sweep — 12 frames stepping `crankAngle` 0° → 330°:\n\n![engine crank-angle sweep](https://raw.githubusercontent.com/caliperhq/jscad-mcp/main/docs/gallery/crank_sweep.gif)\n\nFull walkthroughs, iteration GIFs, and \"Try in browser\" links to openjscad.xyz live in **[caliperhq/jscad-mcp-example](https://github.com/caliperhq/jscad-mcp-example)** — or browse the rich web gallery at **[caliperhq.dev/projects/jscad-mcp-example/gallery/](https://caliperhq.dev/projects/jscad-mcp-example/gallery/)**.\n\n## Requirements\n\n- **Node 18–22 recommended** (Node 24 requires an extra step — see below)\n- **Native build tools** (for headless-gl — no GPU needed, but native bindings are required):\n\n```bash\n# Debian / Ubuntu\napt install libxi-dev libxmu-dev libgl1-mesa-dev libglu1-mesa-dev build-essential\n\n# Fedora / RHEL\ndnf install libXi-devel libXmu-devel mesa-libGL-devel mesa-libGLU-devel\n\n# Gentoo\nemerge x11-libs/libXi x11-libs/libXmu media-libs/mesa\n\n# macOS (via Homebrew)\nxcode-select --install\n```\n\n## Installation\n\n```bash\nnpm install -g @caliperhq/jscad-mcp\n```\n\nOr run without installing:\n\n```bash\nnpx @caliperhq/jscad-mcp\n```\n\n### Node 24 note\n\nheadless-gl 6.x does not compile on Node 24 with GCC 14+ due to a missing `#include <cstdint>` in the ANGLE library. If you're on Node 24, either use [nvm](https://github.com/nvm-sh/nvm) to switch to Node 20 LTS for the install step, or manually build headless-gl after install:\n\n```bash\nnpm install -g @caliperhq/jscad-mcp\ncd $(npm root -g)/@caliperhq/jscad-mcp\n# patch and rebuild gl:\nsed -i 's/#include <vector>/#include <vector>\\n#include <cstdint>/' node_modules/gl/angle/src/common/angleutils.h\nnpm rebuild gl\n```\n\n## Claude Desktop configuration\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"jscad\": {\n      \"command\": \"jscad-mcp\",\n      \"args\": []\n    }\n  }\n}\n```\n\nIf you installed locally (not globally), use the full path:\n\n```json\n{\n  \"mcpServers\": {\n    \"jscad\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/jscad-mcp/src/index.js\"]\n    }\n  }\n}\n```\n\n## Claude Code CLI configuration\n\n```bash\nclaude mcp add --scope user jscad jscad-mcp\n```\n\nOr with a local clone:\n\n```bash\nclaude mcp add --scope user jscad node /path/to/jscad-mcp/src/index.js\n```\n\n## Skills installation\n\nInstall the Claude Code skills for the best experience — they teach Claude the render-verify loop and full JSCAD API:\n\n```bash\nSKILLS_DIR=\"$HOME/.claude/skills\"\nPKG_DIR=\"$(npm root -g)/@caliperhq/jscad-mcp\"\nmkdir -p \"$SKILLS_DIR\"\ncp -r \"$PKG_DIR/skills/jscad-mcp\"     \"$SKILLS_DIR/\"\ncp -r \"$PKG_DIR/skills/jscad\"         \"$SKILLS_DIR/\"\ncp -r \"$PKG_DIR/skills/jscad-wiki\"    \"$SKILLS_DIR/\"\ncp -r \"$PKG_DIR/skills/jscad-examples\" \"$SKILLS_DIR/\"\n```\n\nIf you cloned the repo directly, run the same commands from the repo root with `PKG_DIR=.` instead.\n\nSee [`skills/README.md`](skills/README.md) for details.\n\n## MCP Tools\n\n| Tool | Description |\n|------|-------------|\n| `take_standard_views` | Render iso, front, side, and top in one call |\n| `take_image` | Render from a specific azimuth, elevation, zoom, and target |\n| `slice` | Cross-section view: cut along x/y/z plane, camera auto-oriented |\n| `list_parts` | List named parts with bounding boxes |\n| `highlight` | Render with one named part lit up, rest faded |\n| `label_parts` | Render with a legend mapping part names to screen positions |\n| `open_viewer` | Open the web viewer in the default browser |\n| `echo` | Verify the MCP connection |\n| `render_test` | Confirm the render pipeline works (no input needed) |\n\nAll tools accept either `file` (absolute path to a `.jscad`) or `code` (inline JSCAD source). `take_image` and `take_standard_views` also accept optional `width` and `height` (pixels, default 800×600).\n\n## Web Viewer\n\nThe server starts a local web viewer on launch. The browser opens automatically on the first render. Features:\n\n- **3D canvas** — interactive view using `@jscad/regl-renderer` with correct per-solid colors. Drag to rotate, scroll to zoom, shift-drag to pan.\n- **File browser** — browse `.jscad` and `.js` files rooted at your project directory\n- **Parts panel** — named parts listed with color dots; click to isolate or show all\n- **Thumbnail strip** — every render Claude makes appears here in real-time\n- **Grid / axis toggles** — toggle in the bottom-left corner; state saved to localStorage\n- **Editor link** — opens the full `@jscad/web` editor in a new tab, pre-loaded with the current file\n\n## File format\n\nFiles must use CommonJS and export a `main()` function:\n\n```js\n'use strict'\nconst { primitives, booleans } = require('@jscad/modeling')\nconst { cuboid, cylinder } = primitives\nconst { subtract } = booleans\n\nconst main = () => subtract(\n  cuboid({ size: [40, 40, 20] }),\n  cylinder({ radius: 10, height: 22 })\n)\n\nmodule.exports = { main }\n```\n\n## Named parts\n\nExport a `parts` map alongside `main` to unlock `list_parts`, `highlight`, the parts panel in the web viewer, and part-aware label overlays:\n\n```js\n'use strict'\nconst { primitives, transforms } = require('@jscad/modeling')\nconst { cuboid } = primitives\nconst { translate } = transforms\n\nconst body = () => cuboid({ size: [40, 30, 20] })\nconst lid  = () => translate([0, 0, 20], cuboid({ size: [40, 30, 5] }))\n\nmodule.exports = {\n  main: () => [body(), lid()],\n  parts: { body: body(), lid: lid() }\n}\n```\n\n## Examples\n\nThe `examples/` directory contains ready-to-open `.jscad` files demonstrating various features: gears, threads, hinges, parametric boxes, and more. Open them in the web viewer file browser or pass them to any render tool.\n\nFor longer walkthroughs — cycloidal drive, cutaway 4-stroke engine, gyroid lattice — with iteration GIFs and commentary, see [caliperhq/jscad-mcp-example](https://github.com/caliperhq/jscad-mcp-example).\n\n## How it works\n\n- Evaluates `.jscad` files in-process using `@jscad/modeling`\n- Renders using `@jscad/regl-renderer` + `headless-gl` (no GPU required — pure software rendering)\n- Returns base64-encoded PNG images as MCP `image` content blocks\n- Geometry JSON is also served to the web viewer's live 3D canvas\n- Renders are cached in `.jscad-cache/` at the project root\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\nThird-party attribution (including BSD-2-Clause headless-gl) — see [NOTICE](NOTICE).\n","readmeFilename":"README.md"}