Skip to main content
Glama
PrusaSlicer-MCP

PrusaSlicer-MCP

PrusaSlicer-MCP

An unofficial Model Context Protocol server that lets AI assistants (Claude Desktop, Claude Code or any MCP client) drive PrusaSlicer: pick profiles, place models, slice, analyse the G-code and send it to a networked printer.

Not affiliated with Prusa Research. "PrusaSlicer" is a trademark of Prusa Research a.s. This project drives the official, open-source PrusaSlicer (AGPL-3.0).

Version

Engine

Status

v1

Official prusa-slicer-console (command line)

✅ this release — Windows tested

v2

Patched PrusaSlicer with a local bridge: changes appear live in the PrusaSlicer window

planned

What it does

  • Uses your own PrusaSlicer profiles (system profiles of any vendor and your user profiles) by name.

  • Keeps a bed session: add models, rotate/scale, copies, fixed positions or automatic arrangement.

  • Verified slicing: every G-code is checked against the configuration that was asked for (profile ids, every changed setting and critical keys such as bed shape, nozzle, temperatures). If PrusaSlicer silently used something else, the slice fails instead of handing you a wrong file.

  • G-code analytics: time and material per move type (perimeters, infill, bridges, travel…) and print-risk detection (warping, overhangs, long bridges, volumetric flow, machine limits, short layers…), each with its evidence and whether it is a measured violation or a heuristic.

  • Opens results in your PrusaSlicer window or the G-code viewer.

  • Uploads to OctoPrint, Moonraker (Klipper) and PrusaLink printers configured in PrusaSlicer.

Related MCP server: PrusaMCP

Requirements

  • PrusaSlicer 2.9.x installed (tested with 2.9.4 and 2.9.6).

  • uv (or Python ≥ 3.11).

Install

Claude Code:

claude mcp add prusaslicer -- uvx --from git+https://github.com/JorgeAlbareda/PrusaSlicer-MCP prusaslicer-mcp

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "prusaslicer": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/JorgeAlbareda/PrusaSlicer-MCP", "prusaslicer-mcp"]
    }
  }
}

Configuration (environment variables)

Variable

Default

Meaning

PRUSASLICER_PATH

standard install folders

Folder containing prusa-slicer-console

PRUSASLICER_DATADIR

%APPDATA%\PrusaSlicer (Windows)

PrusaSlicer configuration folder with your profiles

PRUSASLICER_MCP_WORKDIR

<temp>/prusaslicer-mcp

Where G-code and intermediate files are written

PRUSASLICER_MCP_ALLOW_PRINT_CONTROL

off

1 enables start / pause / resume / cancel on printers

PRUSASLICER_MCP_ALLOW_POST_PROCESS

off

1 lets profiles run their post_process scripts

Tools

Group

Tools

v1

v2

Info & profiles

get_slicer_info, list_printers, list_compatible_profiles, select_profiles, use_config_file

✓

✓

Settings

get_setting, set_setting, reset_setting, save_profile_as, import_profile_bundle

✓

✓

Bed

add_model, get_plate, remove_object, clear_plate, transform_object, place_instance, arrange_plate

✓

✓

Slicing

slice, export_3mf

✓

✓

Analysis

get_gcode_metrics, analyze_toolpaths, find_print_risks

✓

✓

View

show_in_slicer

✓

✓

View/optimise (live)

preview_layer, set_variable_layer_height, add_height_range_modifier

—

✓

Printers

list_print_hosts, upload_gcode, get_printer_status

✓

✓

Print control

start_print, pause_print, resume_print, cancel_print

✓*

✓*

* Disabled unless the user sets PRUSASLICER_MCP_ALLOW_PRINT_CONTROL=1.

Safety

  • Printer control is off by default. When enabled, every start/pause/resume/cancel asks the human: through MCP elicitation when the client supports it, otherwise with a one-time code (2 minutes, bound to that printer and that job) that the assistant must only use after you say yes. The code-based flow relies on the client/assistant asking you; that is why control is opt-in.

  • External programs are blocked. PrusaSlicer runs the post_process setting after export; the server forces it empty unless you opt in, and strips it from imported bundles.

  • Your profiles are never overwritten without overwrite=true, and a timestamped backup is kept.

  • G-code is always text (not binary .bgcode) so it can be analysed.

Example profiles

examples/profiles/kobra2max/ contains corrected PrusaSlicer 2.9 profiles for the Anycubic Kobra 2 MAX.

Development

uv sync
uv run pytest            # tests marked `slicer` need PrusaSlicer installed (skipped otherwise)

Design and plans: docs/superpowers/specs, docs/superpowers/plans. Spanish usage guide: docs/usage.md.

Roadmap

  • v2 — PrusaSlicer 2.9 built with a small patch set (patches/) that embeds a localhost bridge, so the same tools act on the open PrusaSlicer window in real time (live preview, adaptive layer height, height-range modifiers). Windows first.

  • macOS and Linux support.

License

AGPL-3.0-only. See LICENSE. Test models in tests/models come from the PrusaSlicer repository (AGPL-3.0).

Available Tools

33 tools
add_height_range_modifierC

Different settings for a height range of an object (GUI engine, v2).

Inputs: z_to (required), z_from (required), settings (required), object_id (required).

add_modelB

Add a model file (STL, 3MF, OBJ, STEP, AMF) to the bed; returns its id and size.

Inputs: path (required), copies.

analyze_toolpathsC

Time and material per move type (perimeters, infill, bridges, travel…); optionally the slowest layers.

Inputs: gcode_path (required), max_layers, include_layers.

arrange_plateA

Automatically place every copy that the user has not fixed; returns the positions.

Inputs: no named parameters.

cancel_printB
Destructive

Cancel the current print. Needs the user's explicit confirmation.

Inputs: host (required), confirmation_code.

clear_plateB

Remove every object from the bed.

Inputs: no named parameters.

export_3mfC

Export the bed (objects, positions and configuration) as a 3MF project.

Inputs: output_path (required).

find_print_risksC

Possible print problems (warping, overhangs, long bridges, flow or machine limits…) with evidence.

Inputs: gcode_path (required).

get_gcode_metricsC

Print time, filament (mm, cm³, g), cost, layers and profiles of a PrusaSlicer G-code.

Inputs: gcode_path (required).

get_plateC

Current bed: selected profiles, setting overrides and objects with their instances.

Inputs: no named parameters.

get_printer_statusC

State, progress, current file and temperatures of a networked printer.

Inputs: host (required).

get_settingB

Value of a setting: the session override, else the effective value of the last slice.

Inputs: key (required).

get_slicer_infoA

PrusaSlicer version and paths, data directory, active engine and whether printer control is enabled.

Inputs: no named parameters.

import_profile_bundleC

Import a PrusaSlicer config bundle (.ini with [print:…] sections) as user profiles.

Inputs: path (required), overwrite.

list_compatible_profilesB

Print profiles compatible with a printer, each with its compatible filament profiles.

Inputs: printer (required).

list_printersC

Printer profiles installed in the user's PrusaSlicer (system and user).

Inputs: no named parameters.

list_print_hostsB

Networked printers configured in PrusaSlicer (OctoPrint, Moonraker/Klipper, PrusaLink). No secrets.

Inputs: no named parameters.

pause_printA
Destructive

Pause the current print. Needs the user's explicit confirmation.

Inputs: host (required), confirmation_code.

place_instanceC

Fix the centre (mm) of one copy of an object on the bed.

Inputs: x (required), y (required), instance (required), object_id (required).

preview_layerC

Show a given layer in the live preview (GUI engine, v2).

Inputs: layer (required).

remove_objectC

Remove an object from the bed.

Inputs: object_id (required).

reset_settingB

Remove a session override so the profile value applies again.

Inputs: key (required).

resume_printA
Destructive

Resume a paused print. Needs the user's explicit confirmation.

Inputs: host (required), confirmation_code.

save_profile_asC

Save the session overrides as user profiles named name (one per affected kind), inheriting the selected ones.

Inputs: name (required), keys, overwrite.

select_profilesB

Select the printer, print and filament profiles to slice with (by exact name).

Inputs: printer (required), filaments (required), print_profile (required).

set_settingA

Override a PrusaSlicer setting for this session (e.g. fill_density=20%, layer_height=0.15).

Inputs: key (required), value (required).

set_variable_layer_heightD

Adaptive variable layer height for an object (GUI engine, v2).

Inputs: object_id (required), quality.

show_in_slicerA

Open a model/3MF in the user's PrusaSlicer window, or a G-code in the G-code viewer.

Inputs: path (required).

sliceB

Slice the bed. Returns the G-code path, metrics, warnings, placements and the configuration check.

Inputs: output_path.

start_printB
Destructive

Start printing an already uploaded file. Needs the user's explicit confirmation.

Inputs: host (required), remote (required), confirmation_code.

transform_objectC

Set absolute rotation (degrees), scale (%) and number of copies of an object.

Inputs: object_id (required), copies, rotate_x, rotate_y, +2 more.

upload_gcodeA

Upload a G-code to a networked printer without starting it. Returns the remote path.

Inputs: host (required), gcode_path (required).

use_config_fileA

Slice with a flat PrusaSlicer .ini config instead of named profiles (bundles are rejected).

Inputs: path (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 33 tools

    Disambiguation4/5

    Tools cluster into clearly distinct groups (settings, profiles, plate/model editing, slicing, analysis, printer control) and descriptions give sharp boundaries (e.g. use_config_file explicitly says 'instead of named profiles'). A few near-neighbors remain — get_setting vs get_plate vs get_slicer_info as state readers, and preview_layer vs show_in_slicer as display actions — but an agent can disambiguate from the text.

    Naming Consistency4/5

    All names are snake_case and almost all follow verb_noun (get_setting, list_printers, add_model, cancel_print). Minor deviations: the bare verb 'slice', the trailing preposition in 'save_profile_as', and 'use_config_file' — readable but not perfectly uniform.

    Tool Count3/5

    33 tools is heavy for any one server, though the PrusaSlicer domain is genuinely broad (slicing, profiles, model editing, G-code analysis, GUI manipulation, network printing). The start/pause/resume/cancel quartet and the three GUI-engine v2 tools could plausibly be consolidated, so the surface feels somewhat over-expanded rather than tightly scoped.

    Completeness4/5

    Coverage across the lifecycle is strong: profile selection/import/save, full plate editing, slicing/export, G-code analysis and remote printer control. Gaps are minor — no delete/rename for saved user profiles, and no explicit object-listing or listing of all print/filament profiles outside a printer context.

    Maintenance

    ActivityMaintained
    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
      5,867 npm
      263
      GPL 2.0
    • F
      license
      A
      quality
      D
      maintenance
      An intelligent 3D printing assistant that enables users to analyze meshes, generate optimal print profiles, and automate PrusaSlicer operations through an MCP client. It provides a comprehensive suite of tools for geometric analysis, printability checks, filament recommendations, and post-print diagnostics.
      17
      10
      -
    • 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.
      1
      Apache 2.0