{
  "markdown": "# kernelCAD - CAD runtime for agents\n\n**kernelCAD** turns mechanical intent into editable `.kcad.ts` source,\ndeterministic review evidence, and exportable manufacturing artifacts.\n\nThe core loop is source-first: design brief -> editable `.kcad.ts` ->\nevaluated model -> deterministic validation -> guided revision -> export package.\n\nkernelCAD is not trying to be a browser clone of Fusion, Onshape, or SolidWorks.\nReplicad/OpenCASCADE are the kernel layer. kernelCAD is the agent-first workflow\nlayer above the kernel: deterministic CAD source, feature history, diagnostics,\nvalidation, variants, and human review.\n\n## Philosophy\n\n1.  **Agent-First**: The primary interface is `.kcad.ts`, CLI, and MCP. The UI reviews and steers generated designs.\n2.  **Editable Source**: Geometry is deterministic source code with explicit feature history, params, assemblies, and diagnostics.\n3.  **Validation-Centered**: Useful CAD output needs deterministic review for constraints, hardware fit, clearances, and exportability.\n4.  **Workflow Over Primitives**: Product progress is measured by intent-level workflows, not by copying every traditional CAD button.\n\n## Agent workflow\n\nFor agents and contributors, `.kcad.ts` source is the design source of truth.\nRendered PNG/MP4 files, STEP/STL exports, score JSON, and capture-run metadata\nare generated evidence or deliverables. Prompt briefs, source files, and\nprovenance metadata remain source. Change source first, regenerate explicit\ntargets, and avoid broad artifact refreshes unless you are intentionally\nrebuilding a demo or release bundle.\n\nUse deterministic checks before visual judgment:\n\n```bash\nkernelcad evaluate model.kcad.ts\n# then run review_cad from an MCP client connected through `kernelcad mcp`\nkernelcad export step model.kcad.ts -o model.step\nkernelcad export stl model.kcad.ts -o model.stl\n```\n\nWhen a rendered artifact is produced, inspect the image/video itself and report\nwhat is visible: proportions, interfaces, floating geometry, occlusion, camera\nframing, and whether required features are legible. Passing tests are not a\nsubstitute for visual evidence.\n\nWhen visual evidence matters, keep a deterministic inspection bundle:\n\n```bash\nkernelcad render inspect model.kcad.ts model.inspect\n```\n\nThe v1 bundle writes a manifest and canonical RGB views. It can also emit\nmachine-readable `mask`, `depth`, and `normals` channels:\n\n```bash\nkernelcad render inspect model.kcad.ts model.inspect --channels rgb,mask,depth,normals\n```\n\nUse `--focus <names>` or `--hide <names>` when a specific feature id or\nassembly part needs isolated review. Keep richer channels in the same manifest\npacket; do not replace the canonical RGB views.\n\nFor real hardware, prefer catalog/vendor geometry via `lib.fromSTEP(...)`\ninstead of fake placeholder boxes or cylinders. This keeps mounts, clearances,\nand mechanism checks tied to physical components.\n\n## Features\n\n-   **Headless Core**: Run CAD operations in Node.js or Web Workers without a DOM.\n-   **Agent API**: kernelCAD APIs for params, assemblies, NURBS, SDF bodies, sheet metal workflows, introspection, and feedback loops.\n-   **Review Cockpit**: Browser-based 3D preview for inspecting generated designs and validation results.\n-   **Standard Exports**: STEP/STL generation.\n-   **Robust Kernel**: Built on OpenCASCADE, with Replicad kept as a kernel implementation detail where it is still used.\n  \n## Get Started\n\n```bash\nnpm install -g kernelcad\n```\n\nDrop this in `bracket.kcad.ts`:\n\n```typescript\nconst w = param('Width', 60, { unit: 'mm' });\nconst h = param('Height', 40, { unit: 'mm' });\nconst t = param('Thickness', 5, { unit: 'mm' });\n\nconst base = box(w, h, t);\nconst hole = cylinder(t + 2, 4).translate(w / 2, h / 2, -1);\nreturn base.subtract(hole).fillet(1);\n```\n\nRun it:\n\n```bash\nkernelcad evaluate bracket.kcad.ts\nkernelcad export stl bracket.kcad.ts -o bracket.stl\n```\n\nThat's it. For agents: `kernelcad mcp` runs an MCP server with dynamic model\nintrospection tools. See `SKILL.md` (bundled with the install) for the full API\nsurface and authoring guide.\n\n## Use with Claude Desktop\n\nkernelCAD runs as an MCP server, so Claude Desktop can drive it locally. After\n`npm install -g kernelcad`, add an entry to your Claude Desktop config file:\n\n- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n- **Linux:** `~/.config/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"kernelcad\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"kernelcad\", \"mcp\"]\n    }\n  }\n}\n```\n\nRestart Claude Desktop. The kernelCAD MCP tools (`review_cad`, model\nintrospection, export helpers, etc.) appear in the tools list.\n\nFor prompt-driven authoring against the hosted gateway, sign in at\n[app.kernelcad.com/connect](https://app.kernelcad.com/connect) and use the\ngenerated `kernelcad mcp --cloud --token <…>` snippet. The hosted surface adds\n`generate_kcad_from_prompt` (turn a natural-language brief into a `.kcad.ts`\nsource) on top of the introspection and review tools, and serves the\n`kernelcad-authoring` skill as an MCP resource so Claude Desktop loads it\nautomatically on connect. Free tier: 3 LLM-generated parts per month;\nintrospection and review tools are unlimited.\n\n> A one-shot `kernelcad install --claude-desktop` command that edits this\n> config for you is on the next slice — until then the snippet above is the\n> interim path.\n\n## Contributing\n\nWeb app + dev workflow (clone the repo, `npm install`, `npm run dev`) for contributors who want to hack on the kernel or the visual debugger:\n\n```bash\ngit clone https://github.com/w1ne/kernelCAD-web.git\ncd kernelCAD-web\nnpm install\nnpm run dev          # web visual debugger at localhost:5173\nnpm run build:cli    # build the CLI bundle into dist/cli/\nnpm run test         # full vitest suite\nnpm run qc           # quick quality gate (lint + typecheck + tests)\n```\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 5977,
  "sha": "34b7eb710c6454ddc73ebac292d323837d7ec275c5deb0d0c606d96601f9809d",
  "repo_slug": "w1ne/kernelcad-web",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_kernelcad_kernelcad_fd2a37d1/readme"
}