API & MCP

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

HTTP API

Kerfwise G-code Inspector

Reads a CNC G-code program (GRBL, LinuxCNC, Fanuc-style, most CAM posts) and measures the rapid and cutting path, the machining time with an optional acceleration and cornering model, the X/Y/Z bounds and Z range, statistics per tool and the feeds and spindle speeds used. It warns about missing units, missing feed rates, arcs whose radius does not match, sideways rapids below Z0 and other common mistakes, and draws a top-view toolpath preview.

Inputs of Kerfwise G-code Inspector
FieldTypeDefaultDescription
gcodetextarea—G-code. Paste the program, or upload a file below.
filefile—Or: G-code file
rapidRatenumber10000Rapid rate (G0)
toolChangeSecnumber20Time per tool change (M6)
pauseSecnumber0Time per program stop (M0/M1). For example a manual tool change on GRBL.
accelerationnumber0Acceleration (0 = ignore). With a value, every move speeds up and slows down (trapezoid profile) and corners are taken at the GRBL junction-deviation speed.
junctionDeviationnumber0.01Junction deviation
defaultUnitsselect (mm, inch)"mm"Units when the program sets none
startXnumber0Start X
startYnumber0Start Y
startZnumber0Start Z

Example request

Hand-checkable square with one R10 corner arc (G21, G3 with I/J)

curl -X POST https://kerfwisegcodeinspector.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"gcode":"(40 x 40 mm pocket outline with one R10 corner)\nG21 G90 G17\nG0 Z5\nG0 X0 Y0\nS12000 M3\nG1 Z-1 F300\nG1 X40 F1200\nG1 Y30\nG3 X30 Y40 I-10 J0\nG1 X0\nG1 Y0\nG0 Z5\nM5\nM30"}'

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-gcode-inspector": { "type": "http", "url": "https://kerfwisegcodeinspector.usefulweb.site/mcp" }
  }
}