API & MCP

Everything a person can do on Kerfwise CNC G-code Generator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Kerfwise CNC G-code Generator

Turns a part list into a CNC router program: parts (rectangles, L-shapes, corner cuts, quarter rounds) are nested with a gap of one cutter diameter, then every part gets an outside profile with the tool-radius offset already in the path (arcs around corners), multiple depth passes with a ramped entry, holding tabs or an onion skin, and the cut order small parts first. Holes become drilling cycles (G81, or G83 peck for deep holes) for LinuxCNC / Fanuc-style controls, or expanded moves for GRBL. You get the G-code, a toolpath preview, a DXF per sheet and the estimated machining time.

Inputs of Kerfwise CNC G-code Generator
FieldTypeDefaultDescription
parts (required)table—Parts. Finished cut sizes. Length runs along the grain.
holestable—Holes. Part = row number in the parts table; x along the length, y across, from the part’s first corner. Depth ≥ thickness = through.
sheetLengthnumber2800Sheet length
sheetWidthnumber2070Sheet width
thicknessnumber18Material thickness
trimnumber15Margin to the sheet edge
grainedMaterialbooleanfalseMaterial has grain
dialectselect (grbl, linuxcnc, fanuc)"grbl"Controller
originselect (bottom-left, top-left)"bottom-left"Work zero (X/Y)
toolDiameternumber6End mill diameter
feednumber6000Cutting feed
plungenumber1500Plunge feed
rpminteger18000Spindle speed
stepdownnumber6Depth per pass
holdDownselect (tabs, onion, none)"tabs"Hold-down
directionselect (climb, conventional)"climb"Cut direction
safeZnumber15Safe Z
sheetIndexinteger1Sheet to show

Example request

Wardrobe side panels with shelf-pin rows (GRBL)

curl -X POST https://kerfwisecncgcode.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"parts":[{"name":"Side","length":2000,"width":580,"qty":2},{"name":"Shelf","length":764,"width":560,"qty":3}],"holes":[{"part":1,"x":300,"y":37,"diameter":5,"depth":12},{"part":1,"x":332,"y":37,"diameter":5,"depth":12},{"part":1,"x":300,"y":543,"diameter":5,"depth":12},{"part":1,"x":332,"y":543,"diameter":5,"depth":12}],"sheetLength":2800,"sheetWidth":2070,"thickness":18,"dialect":"grbl"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "kerfwise-cnc-gcode": { "type": "http", "url": "https://kerfwisecncgcode.usefulweb.site/mcp" }
  }
}