duet-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DUET_HOST | Yes | IP or host name of the Duet | |
| DUET_MACROS | No | Macros allowed for `M98`, comma separated | |
| FFMPEG_PATH | No | Path to `ffmpeg` (RTSP and local webcam) | ffmpeg |
| DUET_CAMERAS | No | Cameras as `name=url,...`; `http(s)://` (photo or MJPEG), `rtsp://`, `dshow:<device>` | |
| DUET_PASSWORD | No | DWC password | reprap |
| DUET_AUDIT_LOG | No | Path of the audit log | duet-mcp-audit.log |
| DUET_READ_ONLY | No | `false` enables the control tools | true |
| DUET_CAMERA_URL | No | Cameras as `name=url,...`; `http(s)://` (photo or MJPEG), `rtsp://`, `dshow:<device>` | |
| DUET_MAX_BED_TEMP | No | Upper limit for bed temperature in `send_gcode` | 100 |
| DUET_MAX_TOOL_TEMP | No | Upper limit for tool temperature in `send_gcode` | 260 |
| DUET_HEAT_IDLE_MINUTES | No | Idle-heater watchdog, 0 = off | 15 |
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
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_statusA | Compact machine state: status, heaters (current/target), axes (position, homed, limits) and the current job (file, layer, progress). For events, supervisor and speed use job_status. |
| get_machine_infoA | Board, firmware version and how far this server has been verified against it (tested / expected / unsupported), plus uptime. Use it first to know what you are talking to. |
| get_sensorsB | Extra sensors and gadgets: probes (e.g. BLTouch), filament monitors, analog temperature sensors and endstops, as the firmware reports them. Read-only. |
| get_machine_profileA | Safety-relevant settings parsed from config.g (axis limits, heater max temps, motor currents). Read this before planning any motion or heating. |
| list_filesB | List files in a directory on the Duet SD card, e.g. 0:/gcodes, 0:/macros, 0:/sys. |
| read_fileA | Read a text file from the SD card (e.g. 0:/sys/config.g, 0:/macros/...). Max 200 kB. |
| get_endstopsA | Current endstop states (triggered or not) per axis, without moving anything. Use it to check wiring by pressing each endstop by hand before homing. |
| get_camera_snapshotA | Fetch a still image from a configured camera to inspect the print or workspace. Cameras: none configured (set DUET_CAMERAS or DUET_CAMERA_URL). |
| list_local_camerasA | List video devices on the PC running this server (DirectShow, Windows). A phone used as webcam (DroidCam, Iriun, Camo, Phone Link) appears here; use its name as DUET_CAMERAS="name=dshow:". |
| preflight_gcodeA | Check a local G-code file against this machine BEFORE uploading it: print area vs axis limits, temperatures vs limits, tool selection (T0), G28 in the start block, heating before extrusion, heaters off at the end, config/firmware commands, estimated line width vs nozzle. Read-only. With fixes (select-tool, strip-g28) it writes a patched copy next to the original (.duet.gcode); the original is never modified. |
| emergency_stopA | Emergency stop (M112): stops everything at once and switches the heaters off. The board must be restarted afterwards (power cycle, or M999 with approval). Always available, never asks for approval. |
| job_statusB | Job and supervision overview: machine status, file, layer, progress, heaters against their targets, whether the server-side supervisor is active, and its most recent events (pauses, warnings, connection problems). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| pre_print_check | Check a local G-code file against the machine and report GO or NO-GO. Starts nothing. |
| start_print_supervised | Start a file that is on the SD card and follow the print with status, camera and the supervisor events. |
| first_layer_profile | Set a speed profile that prints the first layers slowly for better adhesion. |
| bed_leveling_assistant | Guide the user through manual bed leveling. You move the head, the user turns the screws. |
| troubleshoot_connection | Find out why the Duet cannot be reached or rejects the server. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| machine-profile | Axis limits, heater limits, motor currents and kinematics, from config.g and the live firmware values. |
| config-g | The machine's config.g from the SD card, with passwords hidden. |
| server-settings | What is switched on and which limits and thresholds apply (read-only mode, confirmation mode, temperature limits, macros, cameras, supervisor, speed profile). |
| recent-events | The last 50 events the server noticed (job, temperature, connection, speed). |
TDQS
Scored across 12 tools
Most tools target distinct resources (files, sensors, profile, camera, endstops). There is some overlap between get_status (compact machine state) and job_status (job/supervision overview), and between get_endstops and get_sensors which both report endstops, but the descriptions explicitly cross-reference each other to guide selection.
The set follows a mostly predictable verb_noun pattern (get_machine_info, list_files, read_file, get_endstops, get_camera_snapshot). A few entries deviate to noun-only or noun_verb forms (job_status, emergency_stop, preflight_gcode), but all remain readable and clear.
12 tools is well-scoped for a 3D printer controller, covering machine info, status, sensors, files, cameras, preflight, and emergency stop. Each tool earns its place without obvious filler.
The surface is heavily read-only: there is no upload_file, send_gcode/gcode command, or job control (start/pause/resume/cancel), leaving the actuating side thin apart from emergency_stop. Monitoring, diagnostics, and preflight coverage is decent, but agents will hit dead ends for common control workflows.