Skip to main content
Glama
mcp-server-qidi

mcp-server-qidi

by borgels

mcp-server-qidi

MCP server for a QIDI X-Plus5 (Klipper + Moonraker) 3D printer: status, chamber webcam, QIDI Box, G-code files and job history, plus gated control (light, heater targets, pause/resume/cancel, emergency stop, start print).

Moonraker on the Plus5 trusts every LAN client and has no credentials. The printer's privacy therefore rests on the network path (in our deployment a WireGuard tunnel scoped to the printer's single address) and on the Entra-authenticated gateway in front of this server.

Tools

Tool

Tier

qidi_server_status

read

Printer reachable? Which tiers are on, temperature limits.

qidi_printer_status

read

State, file, progress, layer, time left, nozzle/bed/chamber temps, loaded Box slot.

qidi_snapshot

read

Chamber webcam picture (light=true switches the light on first; needs control).

qidi_box_status

read

QIDI Box slots: material, colour, inserted, humidity, drying.

qidi_list_files / qidi_file_metadata

read

G-code on the printer; slicer estimate, filament, temps.

qidi_job_history

read

Recent jobs with result, duration and filament.

qidi_console

read

Last console lines — read this when a start failed.

qidi_set_light

control

Chamber light on/off.

qidi_set_temperature

control

Nozzle/bed/chamber target, capped by QIDI_MAX_*_TEMP.

qidi_pause_print / qidi_resume_print

control

qidi_cancel_print

control

Must name the running file, so a stale conversation cannot cancel the wrong job.

qidi_emergency_stop / qidi_firmware_restart

control

M112 and recovery. Restart is refused while printing.

qidi_start_print

print

Start a file already on the printer. See the plate check below.

There is deliberately no raw G-code tool: every command sent to the printer is built from enumerated input.

Plate check

Nobody is standing next to the printer when a print is started from Claude. qidi_start_print refuses unless:

  1. the printer is idle (standby, complete, cancelled or error),

  2. a qidi_snapshot was taken in the last QIDI_PLATE_CHECK_MAX_AGE_MIN minutes (default 15) and after the previous job ended — so whoever starts a print has been shown the plate after the last part came off it,

  3. the caller passes plateIsEmpty: true, and

  4. the file exists on the printer.

A snapshot is good for one start.

Related MCP server: PrusaLink MCP

Configuration

Env var

Default

QIDI_MOONRAKER_URL

http://localhost:7125

Moonraker base URL.

QIDI_SNAPSHOT_URL

<host>/webcam/?action=snapshot

mjpeg-streamer snapshot.

QIDI_MOONRAKER_API_KEY

—

Sent as X-Api-Key. Set it and remove the server's address range from Moonraker's trusted_clients, so only this container can drive the printer.

QIDI_ENABLE_CONTROL

false

Light, temperatures, pause/resume/cancel, e-stop, restart.

QIDI_ENABLE_PRINT_START

false

qidi_start_print.

QIDI_MAX_NOZZLE_TEMP / _BED_TEMP / _CHAMBER_TEMP

300 / 110 / 65

Remote target caps (°C).

QIDI_PLATE_CHECK_MAX_AGE_MIN

15

Snapshot freshness for a start.

QIDI_TIMEOUT_MS

10000

Per-request timeout.

QIDI_AUDIT_LOG

—

JSONL audit log (who did what; Moonraker logs everything as _TRUSTED_USER_).

QIDI_TRUST_FORWARDED_USER

false

Trust X-MCP-User from the gateway. Requires MCP_HTTP_TOKEN.

MCP_HTTP_TOKEN

—

Bearer the gateway must present (HTTP transport).

Develop

npm install
npm run typecheck && npm test && npm run build
QIDI_MOONRAKER_URL=http://<printer>:7125 npm run dev        # stdio

License

Apache-2.0

Available Tools

16 tools
qidi_box_statusQIDI Box statusB
Read-onlyIdempotent

Filament in each QIDI Box slot (vendor, material, colour, whether filament is inserted), which slot is loaded, box humidity, temperature and drying state.

Inputs: no named parameters.

qidi_cancel_printCancel printA
Destructive

Cancel the running or paused print. Cannot be undone: the job is lost. Pass the file name of the running job to confirm which job you mean.

Inputs: filename (required).

qidi_consoleConsole logA
Read-onlyIdempotent

The last lines of the printer console (G-code responses and errors). Read this when a print failed to start or stopped unexpectedly.

Inputs: count.

qidi_emergency_stopEmergency stopA
Destructive

Immediately halt the printer (M112): heaters and motors stop and the job is lost. Only for a real problem (spaghetti over the hotend, crash, smoke). Afterwards the printer needs qidi_firmware_restart.

Inputs: reason (required).

qidi_file_metadataG-code metadataB
Read-onlyIdempotent

Slicer metadata for one file: estimated print time, filament type/name/weight, temperatures, layer height, object height.

Inputs: filename (required).

qidi_firmware_restartFirmware restartA
Destructive

Restart Klipper firmware after an emergency stop or an error/shutdown state. Refused while a job is printing or paused.

Inputs: no named parameters.

qidi_job_historyJob historyB
Read-onlyIdempotent

Recent print jobs, newest first: file, result, start/end time, print duration and filament used.

Inputs: limit.

qidi_list_filesList G-code filesB
Read-onlyIdempotent

G-code files on the printer, newest first. Optional case-insensitive name filter.

Inputs: limit, filter.

qidi_pause_printPause printA
Idempotent

Pause the running print (the printer parks the nozzle). Resume with qidi_resume_print.

Inputs: no named parameters.

qidi_printer_statusPrinter statusA
Read-onlyIdempotent

Current state of the QIDI X-Plus5: job state, file, progress, layer, elapsed and estimated remaining time, nozzle/bed/chamber temperatures and targets, loaded QIDI Box slot, light.

Inputs: no named parameters.

qidi_resume_printResume printA
Idempotent

Resume a paused print.

Inputs: no named parameters.

qidi_server_statusServer statusA
Read-onlyIdempotent

Which printer this server talks to, which tool tiers are switched on, and whether the printer answers.

Inputs: no named parameters.

qidi_set_lightChamber lightC
Idempotent

Switch the chamber light on or off.

Inputs: on (required).

qidi_set_temperatureSet heater targetA
Idempotent

Set the target temperature of the nozzle, bed or chamber heater (0 = off). Targets above the server limits are refused. Typical use: switch heaters off, or restore a chamber target that something else reset during a print.

Inputs: heater (required), target (required).

qidi_snapshotWebcam snapshotA
Read-onlyIdempotent

Take a picture with the chamber webcam. Use it to check that the build plate is empty before starting a print, or to look at a running print. Set light=true to switch the chamber light on first (needs the control tier); the picture is dark without it.

Inputs: light.

qidi_start_printStart printA
Destructive

Start printing a G-code file that is already on the printer. Before calling: take qidi_snapshot (light=true) and LOOK at the picture — the plate must be empty. The server refuses unless a snapshot was taken in the last few minutes and after the previous job ended, and the printer is idle. After starting, check qidi_printer_status again after ~4 minutes (heating + probing) before reporting that the print is running.

Inputs: filename (required), plateIsEmpty (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 16 tools

    Disambiguation5/5

    The tools split cleanly by purpose: server/tier status vs. live printer state, box filament info, file listing/metadata, history, console diagnostics, and distinct control actions. A minor overlap exists because qidi_snapshot can switch the light on, but the description makes qidi_set_light the dedicated light-control tool.

    Naming Consistency5/5

    All tools use the same qidi_ prefix and snake_case convention, with predictable verb_noun or noun_status forms such as qidi_set_light, qidi_list_files, and qidi_printer_status. A few noun-only names like qidi_snapshot and qidi_console are still clear and consistent with the overall pattern.

    Tool Count4/5

    At 16 tools this is slightly above the typical 3-15 well-scoped range, but each tool maps to a distinct printer monitoring or control function and there is little obvious filler. The count is reasonable for a printer control server, though a few tools could be consolidated if simplicity were prioritized.

    Completeness3/5

    The surface covers monitoring and job lifecycle well: status, snapshot, files, metadata, history, console, temperature, light, start, pause, resume, cancel, emergency stop, and firmware restart. However, notable gaps remain around file lifecycle management (upload/delete) and hardware operations such as filament load/unload or motion/jog/calibration.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      C
      maintenance
      Enables MCP clients to monitor a Creality K2 printer via live Moonraker state, camera snapshots, and print history, while also inspecting local G-code, 3MF projects, and installed Creality Print profiles to review or create slice plans.
      15
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to control and monitor Prusa 3D printers via local HTTP API, supporting status, job info, file operations, print start/pause/resume/stop, snapshots, and upload-and-print.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables LAN-based monitoring and control of Bambu Lab P2S/P1S printers, including confirm-gated print, pause, resume, stop, file upload, and slicing workflows.
      10
      27 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an agent to inspect, slice, upload, start, and monitor jobs on a Moonraker/Klipper 3D printer end to end, using one JSON profile for machine-specific configuration. Built-in safety checks block unsafe starts such as incomplete G-code, nozzle mismatches, hot beds, or running jobs.
      MIT