Skip to main content
Glama

u1-mcp

A small MCP server for the Snapmaker U1 (Snapmaker's Klipper/Moonraker firmware). It lets an AI agent check the printer, look at the camera, upload G-code and pause or cancel, while starting a print needs a human approval the model cannot give itself.

Status: v0.1, early. Tested against firmware 1.5.1.2 (Moonraker 1.5.1) for read-only calls via curl; the Node live tests are pending.

Why another one

Existing U1 MCP servers either have a confirm: true parameter the model can pass itself, or no print control at all. Here the start gate is out-of-band: a separate CLI that only a human runs.

Related MCP server: prusactl

Tools

Tool

What it does

u1_status

State, progress, bed and four toolhead temperatures

u1_list_files

G-code files on the printer

u1_camera

Latest camera frame, with its age (the U1 only refreshes it while a viewer is attached)

u1_upload

Upload a local .gcode (does not start it)

u1_pause / u1_resume / u1_cancel

Print control

u1_request_start

Ask for approval to print a file; returns a 6-digit code

u1_start

Start a print using an approved code

Deliberately absent: heater control, raw G-code, config or firmware changes.

The start gate

  1. Agent calls u1_request_start and gets a code.

  2. A human runs u1-approve <code> in a terminal and types yes.

  3. Agent calls u1_start with the code. The code is single use, valid 10 minutes, and bound to that one file. The printer must be idle.

Approvals live in ~/.u1-mcp/approvals (override with U1_APPROVAL_DIR).

Limit: if your agent can also run shell commands, it could run u1-approve itself. Add a deny rule for it in your agent's permissions.

Setup

npm install && npm run build
U1_HOST=192.168.1.50 node build/index.js

Claude Code: claude mcp add u1 -e U1_HOST=192.168.1.50 -- node /path/to/u1-mcp/build/index.js

The Moonraker API on the U1 needs no auth on the LAN, so keep it off the internet. On macOS the process needs Local Network permission.

Tests

npm test                 # approval gate
U1_HOST=... U1_LIVE=1 npm test   # plus read-only calls against a real printer

License

MIT

Available Tools

9 tools
u1_cameraA

Latest camera frame. The U1 only refreshes it while a viewer is attached, so check age_seconds.

Inputs: no named parameters.

u1_cancelA

Cancel the current print. Allowed when a failure is visible (spaghetti, detached part).

Inputs: no named parameters.

u1_list_filesB

List G-code files stored on the U1.

Inputs: no named parameters.

u1_pauseB

Pause the current print.

Inputs: no named parameters.

u1_request_startA

Ask a human to approve printing a file already on the U1. Returns a code; Pim must run u1-approve <code> himself in a terminal. You cannot approve it.

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

u1_resumeB

Resume a paused print.

Inputs: no named parameters.

u1_startB

Start a print using a code Pim approved out-of-band. Single use, 10 minutes.

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

u1_statusA

Print state, progress, bed and four toolhead temperatures.

Inputs: no named parameters.

u1_uploadA

Upload a local .gcode file to the U1. Does not start it.

Inputs: path (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool has a clearly distinct action and resource: status, file listing, camera, upload, pause/resume/cancel, and a two-step approval/start flow. The related u1_request_start and u1_start pair is explicitly disambiguated by the approval-code descriptions.

    Naming Consistency5/5

    All tools consistently use the u1_ prefix followed by snake_case verbs or verb_noun combinations. The pattern is predictable and readable throughout.

    Tool Count5/5

    Nine tools is well-scoped for a 3D printer control server. Each tool maps to a necessary monitoring or print-control operation without obvious redundancy.

    Completeness4/5

    The surface covers the core print lifecycle: monitoring, file listing, upload, approval-gated start, pause, resume, and cancel. Minor gaps include file deletion or detailed job/file management, but core workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables LLM agents to control Bambu Lab 3D printers via the bambu-gateway HTTP API, supporting printer listing, filament management, print session creation, and safe print initiation with user confirmation.
      7
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to monitor and control Prusa 3D printers over PrusaLink or Prusa Connect, including status and camera checks, file upload and print control, G-code execution, queue and history access, and responding to printer dialogs.
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables an AI assistant such as Claude to operate a Duet machine (RepRapFirmware) over LAN/WLAN by reading status, managing files, viewing camera snapshots, homing axes, and starting or supervising prints while enforcing safety approvals and guards.
      12
      1
      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