Skip to main content
Glama
Creality K2 MCP

Creality K2 MCP

by sabnck

Creality K2 MCP

Connect an MCP client to a Creality K2 and the local tools around a print. The server exposes live Moonraker state, camera snapshots, installed Creality Print profiles, G-code metadata, and Creality 3MF project settings so Claude, Codex, ChatGPT, or another MCP client can inspect a job, help choose and review slicing settings, and monitor the printer using real local data instead of guesses.

How Creality K2 MCP connects the printer and MCP clients

What this is

Creality K2 MCP is the tool layer, not the agent. The MCP client does the reasoning and decides which tools to call. This server gives it access to the printer, camera, project data, and the profiles that actually exist on the computer.

A typical assisted workflow looks like this:

model or project -> inspect -> choose/review settings -> build slice plan -> monitor

The owner stays in control. Read-only access is the default, slice plans are reviewable, and physical printer controls are opt-in and bounded.

The verified target is a Creality K2 with Moonraker on the local network. Other printers are not claimed as compatible. The adapter guide explains how to test and add another Moonraker-based machine honestly.

Related MCP server: bambu-p1s-mcp

What it gives an MCP client

  • Current print state, progress, elapsed and estimated remaining time.

  • K2 layer data from virtual_sdcard, plus model and side fan values from the K2-specific fan0 and fan2 output pins.

  • Nozzle and bed temperatures, a camera snapshot, print history, and recent Klipper messages.

  • Read-only inspection of a local G-code file or Creality 3MF project.

  • The actual profiles installed on the computer, not an invented list.

  • A reviewable local Creality Print slice plan built from those installed profiles.

  • Optional, bounded printer actions only after the owner explicitly enables them. There is no G-code upload or raw G-code execution tool.

Start here if you are not a developer

You only need your printer model and its local network address. Install the project from the repository, then paste this into Claude, Codex, or another MCP client that can help with local setup:

I want to connect my 3D printer to this Creality K2 MCP project.

Printer model: Creality K2
Printer local address: YOUR_PRINTER_HOST
Printer port: 7125
Operating system: Windows
MCP client: Claude Desktop or Codex

Guide me one step at a time. Keep printer control read-only at first. Explain
what every setting does, create the right local client configuration, ask me to
restart the client, and test only printer status. Do not enable any command
that changes the printer unless I explicitly ask for it after the read-only
test works.

Use YOUR_PRINTER_HOST as a placeholder only. Replace it with the address you see for your own printer on your own network.

Manual installation

Requirements: Python 3.10 or newer, the project files, and local network access to the K2. Creality Print is optional unless you want profile-guided slice planning.

git clone https://github.com/sabnck/creality-k2-mcp.git
cd creality-k2-mcp
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .

Then choose the configuration example for your MCP client:

Set K2_HOST to the local address of the printer. Leave K2_ALLOW_WRITE at 0 for the first connection. Restart the MCP client and ask: “What is the current printer status?”

Read-only first

The normal setup is read-only. It can answer questions such as:

  • “How far through is the current print, and what is the estimated time left?”

  • “Show a current camera snapshot and flag anything unusual.”

  • “Read this 3MF and explain its layer height, walls, infill, supports, and printer profile.”

  • “Compare these two G-code files by estimated time, filament weight, and layer count.”

  • “Which K2 profiles are actually installed for a 0.4 nozzle?”

  • “Prepare a slice plan for this model with my installed Hyper PLA profile and show me which settings you changed.”

  • “Compare a faster and a higher-detail setup before I choose which one to use.”

Optional printer control

Set K2_ALLOW_WRITE=1 only when you want the client to be able to change a real printer. Even then, every action is limited to a named operation with fixed bounds:

Operation

Guardrail

Pause or resume

Requires write access to be enabled.

Cancel

Requires confirm='CONFIRM'.

Nozzle temperature

0 to K2_MAX_NOZZLE, default ceiling 280 C.

Bed temperature

0 to K2_MAX_BED, default ceiling 110 C.

Print speed

30 to 150 percent.

Model fan

0 to 100 percent.

There is deliberately no G-code upload or general “run this G-code” tool.

Compatibility

Target

Status

Notes

Creality K2 with local Moonraker

Verified

This project's runtime target.

Another Creality printer

Not verified

Follow the adapter guide and test its actual objects.

Generic Moonraker or Klipper printer

Not verified

Similar transport, different object names and safety limits may apply.

Troubleshooting

Symptom

What to check

Status cannot connect

Confirm the printer is powered on, reachable locally, and K2_HOST and K2_PORT are correct.

Layers show as unknown

Confirm the printer exposes virtual_sdcard; this is the K2 source used by the adapter.

Camera is unavailable

Check K2_CAM_PORT, then try the K2 camera in a browser on the same network.

Profiles are empty

Point K2_PROFILES at Creality Print's resources/profiles/Creality directory.

Slice planning says Creality Print is missing

Set K2_CLI to the local CrealityPrint executable.

Read Safety before enabling printer control. For a different machine, read the adapter guide.

Portuguese: README.pt-BR.md

Contributing and license

Please report compatibility results with the printer model, firmware context, sanitized object response, and what was actually tested. Do not include local addresses, screenshots, G-code, models, or credentials.

Created and maintained by Fernandes. Released under the MIT License.

Available Tools

15 tools
cancel_printD

Inputs: confirm. Returns: result

catalogD

Inputs: nozzle (required). Returns: object

gcode_infoD

Inputs: path (required). Returns: object

job_historyD

Inputs: limit. Returns: result

model_infoD

Inputs: path (required). Returns: object

pause_printD

Inputs: no named parameters. Returns: result

printer_statusD

Inputs: no named parameters. Returns: object

recent_logsD

Inputs: count. Returns: result

resume_printD

Inputs: no named parameters. Returns: result

search_settingsD

Inputs: path (required), query (required). Returns: object

set_fanD

Inputs: percent (required). Returns: result

set_speed_factorD

Inputs: percent (required). Returns: result

set_temperatureD

Inputs: heater (required), celsius (required). Returns: result

slice_planA

Create a local, reviewable Creality Print command without running it.

Inputs: model (required), nozzle (required), process (required), material (required), +1 more. Returns: object

snapshotD

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.1/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools are clearly separated by domain: status monitoring, job history, file/model/gcode info, slicing, and live printer controls. A couple of pairs such as job_history/recent_logs and printer_status/snapshot could require careful descriptions to avoid misselection, but the names are mostly distinct.

    Naming Consistency5/5

    All tool names use lowercase snake_case and follow a predictable split: noun-style names for queries and data lookups, and verb_noun names for actions like pause_print or set_temperature. This is a consistent and readable convention, even though it is not strictly verb_noun throughout.

    Tool Count5/5

    Fifteen tools is at the high end of the ideal range but is well-justified for a 3D printer MCP covering monitoring, file inspection, slicing, print control, and temperature/fan adjustments. Each tool appears to cover a distinct function without redundant duplication.

    Completeness3/5

    The server covers monitoring, slicing preparation, and print lifecycle controls like pause/resume/cancel, but there is no obvious start_print or execute_slice_plan tool, leaving slice_plan as a dead end for automation. Catalog and model info are present, but upload/delete or direct print-from-catalog workflows are missing.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables interaction with 3D printer management systems through an MCP server, supporting STL file manipulation, slicing, and control of printers like OctoPrint, Klipper, Duet, and more.
      30
      3,386 npm
      268
      GPL 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP clients to monitor and control a Bambu Lab P1S printer over the local network, including status, file management, slicing, and print operations.
      11
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes MCP tools that slice models with headless OrcaSlicer, stage gcode on Moonraker-based Klipper printers, gate job starts behind explicit operator authorization, and report status, telemetry-derived events, snapshots, and alerts. It also manages spools and lets AI agents query job estimates, blockers, and start-precondition checks.
      2
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP clients to inspect FreeCAD documents and export named solids to STL, find and derive OrcaSlicer presets, preview and run slices with recorded manifests, and then read G-code metadata, query a Moonraker printer, upload G-code, and start an uploaded print as a separate confirmed step.
      15
      MIT