CNCjs MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CNCJS_URL | No | CNCjs server URL | http://localhost:8000 |
| CNCJS_TOKEN | No | Optional JWT token for CNCjs authentication |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_serial_portsB | List available serial ports |
| get_connection_statusB | Get current CNCjs connection status |
| get_machine_stateA | Get full GRBL machine state (positions, feed, spindle, overrides, buffer) |
| get_machine_positionB | Get current machine and work positions (X, Y, Z) |
| get_work_coordinate_offsetC | Get work coordinate offset (WCO) values |
| get_machine_settingsB | Get all GRBL $$ machine settings with labels |
| get_parser_stateB | Get active G-code parser state (WCS, units, distance mode, etc.) |
| get_loaded_gcodeB | Get currently loaded G-code file name and content |
| get_job_progressB | Get current job progress (lines sent, elapsed time, % complete) |
| get_workflow_stateB | Get workflow state (idle, running, paused) |
| get_feeder_statusB | Get feeder queue depth, hold state, and reason |
| list_macrosB | List all CNCjs macros (name, id, content) |
| list_machinesB | List machine profiles with travel limits |
| get_alarm_infoB | Get current alarm code and human-readable meaning |
| connect_to_portC | Open a serial connection to a CNC controller |
| disconnect_portA | Close the current serial connection |
| emergency_stopA | EMERGENCY STOP — immediately halts all motion via GRBL soft reset (0x18). Use in any dangerous situation. |
| feed_holdA | Feed hold — controlled deceleration to stop. Safer than emergency stop for non-critical situations. |
| send_gcodeA | Send one or more G-code lines to the machine. HIGH RISK — causes physical motion. |
| load_gcodeC | Load G-code content into CNCjs for execution |
| start_jobB | Start executing the loaded G-code program |
| pause_jobA | Pause the current job (feed hold + pause sender) |
| resume_jobB | Resume a paused job |
| stop_jobC | Stop the current job |
| home_machineA | Run GRBL homing cycle ($H). Machine must have homing switches enabled. |
| unlock_machineA | Clear GRBL alarm state ($X). Use after resolving the cause of the alarm. |
| jogA | Jog the machine incrementally. HIGH RISK — causes physical motion. |
| set_feed_overrideC | Adjust feed rate override (10-200%) |
| set_spindle_overrideC | Adjust spindle speed override (10-200%) |
| run_macroA | Execute a CNCjs macro by name or ID. HIGH RISK — macro content may cause motion. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 30 tools
Most tools are clearly distinct (e.g., get_machine_state vs get_machine_position vs get_parser_state), but some overlap exists: get_machine_state, get_workflow_state, and get_connection_status all report status-like information, and get_loaded_gcode vs load_gcode could be confused at a glance. Descriptions help disambiguate, but a few boundaries are fuzzy.
The set predominantly follows a verb_noun pattern (list_, get_, set_, start_, pause_, resume_, stop_, home_, unlock_, jog, send_, load_, connect_, disconnect_). Minor deviations: 'jog' is a bare verb, and 'emergency_stop'/'feed_hold' are noun-ish verbs, but overall the pattern is consistent and predictable.
30 tools is on the heavy side for a CNC control server, but the domain is broad (machine control, G-code management, job lifecycle, macros, serial ports, overrides). Each tool maps to a real operation, though some could be consolidated (e.g., get_machine_state already includes positions, making get_machine_position partially redundant).
The surface covers the core CNC workflow well: connection, machine state, G-code loading, job control, homing, unlocking, overrides, and macros. Minor gaps include no tool for writing/saving macros, no spindle control (only override), and no coolant control, but these are not critical for basic operation.