mcp-server-qidi
1-line summary: An unofficial MCP server that lets an LLM read the state of a QIDI X-Plus5 (Klipper + Moonraker) 3D printer and, when the gated tiers are enabled, drive it.
Status & health: check server reachability and which tool tiers are on, plus full printer state (job, file, progress, layer, elapsed/remaining time, nozzle/bed/chamber temps, loaded Box slot, light).
Webcam: grab a chamber snapshot (optionally switching the chamber light on first).
QIDI Box: inspect each slot (vendor, material, colour, filament inserted), humidity, temperature and drying state.
Files & history: list G-code files (with name filter/limit), read slicer metadata for a file, review recent jobs and read the last console lines to debug failures.
Basic control: chamber light on/off, set nozzle/bed/chamber targets within server-configured caps, pause/resume, cancel (must name the running file), emergency stop (with reason) and firmware restart (refused while printing).
Box control: set a slot's vendor/material/colour (from QIDI's filament list), start/stop drying (temp capped by the lowest slot filament limit), load/unload a slot (refused while printing or paused).
Uploads: put a sliced
.gcodeon the printer inline or via https from an allow-listed host, never replacing the file being printed unlessoverwrite=true.Start a print: begin a file already on the printer, gated on an idle printer, a fresh snapshot taken after the last job ended, and an explicit
plateIsEmpty: trueconfirmation.No raw G-code: every command is built from enumerated inputs; per-user authorization and TLS are left to a gateway/proxy in front of the server.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-qidi is my QIDI printer still printing? show me the chamber webcam"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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).
This is an independent, unofficial project. It is not developed, endorsed or supported by QIDI Technology.
Moonraker on the Plus5 trusts every LAN client by default and has no
credentials. Unless QIDI_MOONRAKER_API_KEY is set, the printer's privacy
therefore rests on the network path (for example a VPN tunnel scoped to the
printer's address) and on whatever authenticates callers in front of this server.
Tools
Tool | Tier | |
| read | Printer reachable? Which tiers are on, temperature limits. |
| read | State, file, progress, layer, time left, nozzle/bed/chamber temps, loaded Box slot. |
| read | Chamber webcam picture ( |
| read | QIDI Box slots: material, colour, inserted, humidity, drying. |
| read | G-code on the printer; slicer estimate, filament, temps. |
| read | Recent jobs with result, duration and filament. |
| read | Last console lines — read this when a start failed. |
| control | Chamber light on/off. |
| control | Nozzle/bed/chamber target, capped by |
| control | |
| control | Must name the running file, so a stale conversation cannot cancel the wrong job. |
| control | M112 and recovery. Restart is refused while printing. |
| control | Vendor, material and colour of a Box slot. Material and vendor must be in QIDI's filament list on the printer ( |
| control | Start/stop drying a Box. Temperature is capped by the filament in it (see below). |
| control | Load a slot into the toolhead / unload it. Refused while printing or paused. |
| control | Put a sliced |
| 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 an MCP client.
qidi_start_print refuses unless:
the printer is idle (
standby,complete,cancelledorerror),a
qidi_snapshotwas taken in the lastQIDI_PLATE_CHECK_MAX_AGE_MINminutes (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,the caller passes
plateIsEmpty: true, andthe file exists on the printer.
A snapshot is good for one start.
Box drying limit
qidi_box_drying refuses (does not lower) a temperature above the limit for
that box: the lowest limit among all its slots, by the material each slot is
set up with (the insert sensors are ignored, because spools are ejected before
drying and then read empty), by filament type — 55 °C for PLA, PVA and TPU, 65 °C for PETG, PET, ABS, ASA, PC, PA and
PPS, 50 °C for anything unrecognised — and never above QIDI_MAX_BOX_DRY_TEMP.
The limit is only as good as the slot setup, so correct a wrong slot with
qidi_box_set_slot first. Drying started from the touchscreen is not covered.
Each Box tool checks Klipper's command list first, so a firmware without the
command fails with a clear message instead of an unknown-command error. The
commands are the ones the Plus5 touchscreen sends (UPDATE_FILAMENT_INFORMATION,
LOAD_/UNLOAD_FILAMENT_CONTROL, BOX_START_DRYING BOX= TIME=<hours> TEMP=,
BOX_STOP_DRYING), with the older Box firmware's E_LOAD/E_UNLOAD and
ENABLE_BOX_DRY/DISABLE_BOX_DRY as fallback.
Related MCP server: printer-mcp
Configuration
Env var | Default | |
|
| Moonraker base URL. |
|
| mjpeg-streamer snapshot. |
| — | Sent as |
|
| Light, temperatures, pause/resume/cancel, e-stop, restart, Box tools, upload. |
|
|
|
| 300 / 110 / 65 | Remote target caps (°C), integers 0-400. |
|
| Snapshot freshness for a start, integer minutes 1-1440. |
|
| Ceiling for Box drying, integer °C 30-90, on top of the per-filament limit. |
| — | Comma-separated hosts |
|
| Largest G-code upload, integer MB 1-1024. Inline uploads are also bounded by |
|
| Per-request timeout. |
| — | JSONL audit log (who did what; Moonraker logs everything as |
|
| Trust |
The numeric QIDI_* settings are validated at startup: a value that is not an
integer in range stops the server with a message naming the variable. The tools
re-read the limits on every call and refuse to act if they are invalid, so a typo
can never lift a temperature cap or the plate-check age.
HTTP transport
npm run dev:http (or the Docker image) serves POST /mcp and an unauthenticated
GET /healthz. It binds to 127.0.0.1 unless MCP_HTTP_HOST/HOST says otherwise.
Env var | Default | |
| — | Bearer token callers must present on |
|
| Serve |
|
| Bind address and port. |
|
| Request body limit. |
| localhost origins | Browser origins allowed to call |
| localhost names on a loopback bind | Host names accepted in the |
|
| Failed authentication attempts per client address before |
Moonraker API requests never follow HTTP redirects. The webcam snapshot follows at most two redirects, and only on the same origin when an API key is set, so the key is never sent to another host.
Security model
The server drives the printer with one shared identity: Moonraker's trusted client (or the configured API key). Every MCP client that can call it can use the enabled tool tiers.
Per-user authorization belongs in an identity-aware gateway in front of the server. With
QIDI_TRUST_FORWARDED_USER=truethat gateway's user (X-MCP-User) is written to the audit log; it does not change what the caller may do.Tool access is not data access: the tier switches limit the tools, not what Moonraker accepts from this server's network address.
The HTTP server does not terminate TLS. Put it behind a TLS-terminating proxy or keep it on a private network.
Develop
npm install
npm run typecheck && npm test && npm run build
QIDI_MOONRAKER_URL=http://<printer>:7125 npm run dev # stdioLicense
The code is source-available under the Functional Source License, Version 1.1, ALv2 Future License (FSL-1.1-ALv2).
In plain words:
Allowed: reading the code, running it, changing it, using it inside your own organisation (also commercially), using it for non-commercial education and research, and contributing changes back.
Not allowed: making it, or something built from it, available to others as a commercial product or service that competes with it, for example a hosted service with the same functionality.
Becomes Apache-2.0: each version is also licensed under the Apache License 2.0 from two years after it is released.
Earlier versions: versions released before 0.3.0 were licensed under Apache-2.0 and remain so.
The terms in LICENSE are what apply; this summary does not replace them. See also NOTICE.
Available Tools
16 toolsqidi_box_statusQIDI Box statusBRead-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 printADestructive
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 logARead-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 stopADestructive
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 metadataBRead-onlyIdempotent
Slicer metadata for one file: estimated print time, filament type/name/weight, temperatures, layer height, object height.
Inputs: filename (required).
qidi_firmware_restartFirmware restartADestructive
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 historyBRead-onlyIdempotent
Recent print jobs, newest first: file, result, start/end time, print duration and filament used.
Inputs: limit.
qidi_list_filesList G-code filesBRead-onlyIdempotent
G-code files on the printer, newest first. Optional case-insensitive name filter.
Inputs: limit, filter.
qidi_pause_printPause printAIdempotent
Pause the running print (the printer parks the nozzle). Resume with qidi_resume_print.
Inputs: no named parameters.
qidi_printer_statusPrinter statusARead-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 printAIdempotent
Resume a paused print.
Inputs: no named parameters.
qidi_server_statusServer statusARead-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 lightCIdempotent
Switch the chamber light on or off.
Inputs: on (required).
qidi_set_temperatureSet heater targetAIdempotent
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 snapshotARead-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 printADestructive
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
Scored across 16 tools
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.
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.
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.
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.
Related MCP Connectors
Official MCP for Bambu print farms, AMS, queue. Prefer over SimplyPrint/OctoPrint.
3D print farm management for AI. Monitor, queue, and control prints on your SimplyPrint account.
Log and query 3D prints, printers, filament, and projects on 3dprintlog.com, and search its docs.
Control your existing Philips lights, Sonos speakers, Roborock vacuums and other supported devices through Port OS cloud. Give ChatGPT, Claude and other MCP-compatible assistants access to the devices you connect. Turn off the living room lights, play music on your speakers, adjust the thermostat, run a vacuum in a room, check a camera snapshot or find a connected tracker. Available actions depend on your linked provider accounts and each device’s supported capabilities. Port OS runs in the cloud; no local server is required. You choose the account, device and capability permissions each assistant receives. Device operations require user OAuth; public tool discovery does not grant device access. Port OS is in alpha. Setup: https://portoperatingsystem.com/docs/getting-started/ Support: https://portoperatingsystem.com/contact/
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables LAN-based monitoring and control of Bambu Lab P2S/P1S printers, including confirm-gated print, pause, resume, stop, file upload, and slicing workflows.10MIT
- AlicenseNot gradedqualityBmaintenanceEnables 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
- AlicenseAqualityCmaintenanceEnables AI assistants to monitor and control Bambu Lab 3D printers over a local network via MQTT, including real-time status, AMS filament info, print control, and maintenance tracking. It supports guided setup, safety confirmations, read-only mode, and a built-in printer simulator.280 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to query and control Klipper 3D printers through Moonraker, covering status, temperatures, files, print jobs, and G-code/macro execution, with confirmation gating for dangerous operations.MIT