anycubic-slicer-mcp
One-line summary: This MCP server lets AI agents drive Anycubic Slicer Next headlessly — inspecting presets, slicing models, and reviewing the results — without opening the GUI.
Check setup — report the slicer install path/version, active preset folder, and the GUI's current printer/process/filament (
slicer_status).Browse presets — list machine/process/filament presets, filtered to those compatible with a given printer, with substring search (
list_presets).Inspect settings — get a fully resolved (inheritance-merged) preset, filtering keys by name or substring (
get_preset).Analyze models — get size, bounding box, volume, facet count and a manifold check (
model_info).Slice — turn STL/3MF/OBJ/STEP into
.gcode,.gcode.3mfand an editable_project.3mf, with setting overrides, multi-colour filaments, copies, scale/rotation and plate choice; returns print time, filament grams/meters, layer count and warnings (slice_model).Read existing G-code — print-time, filament and layer estimates from a
.gcodefile (gcode_summary).Preview toolpaths — top-down PNG of all layers shaded by height, or a single layer coloured by feature (
preview_gcode).Open in GUI — launch a model/3MF/G-code in the slicer when asked (
open_in_slicer).Save presets — create/overwrite a user preset that appears in the slicer GUI (
save_user_preset).
Drives Anycubic Slicer Next (and its installed Anycubic printer presets) without the GUI: lists machine/process/filament presets, resolves and inspects preset settings, reports model info, slices STL/3MF/OBJ/STEP files into G-code with print time, filament usage, layer counts and warnings, summarizes existing G-code, renders top-down PNG previews of toolpaths, and saves user presets back into the slicer.
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., "@anycubic-slicer-mcp Slice examples/calibration_cube.stl for my Kobra S1 at 15% infill"
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.
anycubic-slicer-mcp
An MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor, …) use Anycubic Slicer Next without its GUI: list presets, slice models, read print time and filament estimates, and look at a rendered preview of the toolpaths.
Unofficial community project. Not affiliated with or endorsed by Anycubic.
You: Slice examples/calibration_cube.stl for my Kobra S1 with 15% infill.
Agent: slice_model → 20m 53s, 3.56 g PLA, 100 layers, first layer 24s
preview_gcode(layer=1) → [PNG of the first layer, colored by feature]examples/calibration_cube.stl is a plain 20 mm cube (regenerate it with python examples/make_cube.py).
Requirements
Windows (the slicer's headless CLI and preset folders are used as installed by Anycubic)
Anycubic Slicer Next installed and opened at least once
Python 3.10+
Tested with Anycubic Slicer Next 2.0.0.3 on Kobra S1, S1 Max, Kobra 3 / 3 Max, Kobra 4, Kobra X, Kobra 2 Neo / 2 Pro and Kobra 1 presets. Presets are read from the slicer itself, so other Anycubic printers should work too.
Related MCP server: cura-mcp
Install
git clone https://github.com/EmreTekir/anycubic-slicer-mcp
cd anycubic-slicer-mcp
py -3 -m venv .venv
.venv\Scripts\python.exe -m pip install .Register it with Claude Code (for all your projects):
claude mcp add --scope user anycubic-slicer -- "$PWD\.venv\Scripts\anycubic-slicer-mcp.exe"Or in any MCP client config:
{
"mcpServers": {
"anycubic-slicer": {
"command": "C:\\path\\to\\anycubic-slicer-mcp\\.venv\\Scripts\\anycubic-slicer-mcp.exe"
}
}
}With uv you can skip the clone:
uvx --from git+https://github.com/EmreTekir/anycubic-slicer-mcp anycubic-slicer-mcp
Environment variables
Variable | Default |
|
|
|
|
| unset; |
| unset; |
Tools
Tool | What it does |
| Install path, version, active preset folder, printer/process/filament selected in the GUI |
| Machine / process / filament presets, filtered to those compatible with a printer |
| Fully resolved preset (inheritance merged); |
| Size, bounding box, volume, facet count, manifold check |
| STL/3MF/OBJ/STEP → |
| The same estimates read from an existing |
| Top-down PNG: all layers shaded by height, or one layer colored by feature |
| Open a file in the slicer GUI (only when you ask for it) |
| Save a user preset that appears in the GUI |
Settings are changed with overrides, e.g.
{"sparse_infill_density": "20%", "enable_support": true, "brim_type": "outer_only", "nozzle_temperature": 215}.
Each key is routed to the process, filament or machine config that owns it. Valid keys that no preset
lists (such as ironing_inset) go to the process config. Keys the slicer doesn't know are rejected,
and the result lists warnings for values the slicer clamped or ignored (for example a bed temperature
key that doesn't match the selected plate type).
Multi-colour prints: give one model file per colour, the filaments, and which filament each model uses. Pass the colours of the loaded spools so the printer maps each filament to the right one:
{"models": ["body.stl", "logo.stl"], "filaments": ["Anycubic PLA", "Anycubic PLA Matte"],
"object_filaments": [1, 2], "filament_colours": ["#FFFFFF", "#1E6FD9"]}Each slice writes three files: <name>.gcode, <name>.gcode.3mf (G-code inside, for sending to the
printer; the GUI shows it as a G-code preview) and <name>_project.3mf (no G-code, opens in the GUI as
a project you can still edit). Overridden settings are recorded so the GUI keeps them instead of
falling back to the preset values.
Notes:
Filament names can be given naturally: with a printer selected,
"Anycubic PLA"meansAnycubic PLA @<that printer>.scaleandrotate_zwork on STL and OBJ files (the model is transformed before slicing).arrange=falsekeeps the coordinates stored in the file, so a model at the origin may land off the bed.Results are written next to the first model unless
output_diris given; existing files with the same name are replaced.
How it works
Presets live as JSON under
%APPDATA%\AnycubicSlicerNext\system\Anycubic\…anduser\<folder>\…. Each mayinheritsa parent; the server merges the chain into the flat config the CLI expects. The active user folder and the GUI's selection come fromAnycubicSlicerNext.conf.The CLI checks
compatible_printersagainst the printer's system parent, so flattened user printers get that parent written back. Using a process or filament made for another printer works, and is reported as a warning.Anycubic filaments carry per-nozzle variants (
nozzle_temperature_HS,_BRASS) that win over the plain key; setting the plain key updates them too.The slicer's own first-layer estimate is far too low, so
first_layer_timeis measured from theM73progress marks when the G-code has them (first_layer_time_sourcesays which was used).The slicer's own
--scaleabove 1 and--rotatecrash it, so models are transformed in Python.Tools run in worker threads: a long slice does not block other requests.
Safety
The server runs locally over stdio with your user's permissions. It is built so a confused or manipulated agent (for example one following instructions hidden in a downloaded file) cannot turn it into more than a slicer:
post_process(programs the slicer runs after slicing) can never be set through the tools. 3MF files are scanned before they are sliced, inspected or opened, and refused if any settings entry carries a post-processing script or cannot be checked reliably.Raw G-code templates (
machine_start_gcode,filament_end_gcode, …) are read-only unless you setANYCUBIC_MCP_ALLOW_GCODE_TEMPLATES=1.Setting values may not contain line breaks or control characters, so a value that a G-code template expands (a filament type, a note) cannot smuggle in extra G-code lines.
Network paths (
\\server\share\…, mapped network drives) are refused before anything touches the filesystem, because merely opening one makes Windows send your credentials to that server.File tools only accept existing files with model or
.gcodeextensions.slice_modelwrites only.gcode/.gcode.3mffiles;save_user_presetwrites only into the slicer's user preset folder and cannot change a preset's name, parent or compatibility fields.Image size, timeout, copies, scale and plate number are bounded.
What it does not protect against:
Your own presets: a user preset that already contains a
post_processscript (set up in the GUI) is used as-is, exactly as the GUI would use it.A 3MF sliced with
use_project_settingsbrings its own start/end G-code, as it would in the GUI.Temperatures and speeds are ordinary settings and are passed through. Check what the agent sliced before you print it.
Development
.venv\Scripts\python.exe -m pip install -e .[test]
.venv\Scripts\python.exe -m pytestThe tests need no slicer install. Changes that touch slicing should also be checked against a real
slicer with examples/calibration_cube.stl.
License
MIT
Available Tools
9 toolsgcode_summaryB
Print-time / filament / layer estimates and key settings read from an existing .gcode file.
Inputs: path (required).
get_presetA
Fully resolved (inheritance-merged) preset values. Name may be a unique substring; printer narrows ambiguous process/filament names. Use search to filter keys by substring (e.g. 'infill', 'support', 'temp', 'speed') or keys for exact ones; with neither, long G-code template values are truncated.
Inputs: kind (required), name (required), keys, search, +1 more.
list_presetsB
List selectable presets. kind: machine | process | filament. For process/filament pass printer to keep only compatible ones (user presets listed first). search is a case-insensitive substring filter (e.g. 'S1', 'PLA', '0.16mm').
Inputs: kind (required), search, printer, include_incompatible.
model_infoC
Size (mm), bounding box, facet count, volume (mm3) and manifold check for a model file.
Inputs: path (required).
open_in_slicerA
Open a model/3MF/G-code in the Anycubic Slicer Next GUI. Only call this when the user asks to see it.
Inputs: path (required). Returns: result
preview_gcodeA
Top-down PNG render of a .gcode. layer=None: all layers shaded by height (footprint/placement check). layer=N (1-based): that layer colored by feature: outer wall orange, inner wall yellow, sparse infill dark red, solid infill magenta, top surface red, bottom surface blue, bridge light blue, overhang wall dark blue, support green, brim/skirt cyan, gap fill white. size: image edge in pixels (200-2000).
Inputs: path (required), size, layer.
save_user_presetB
Create/overwrite a user preset that shows up in the GUI (restart the slicer to see it). inherits: parent preset name; settings: only the keys that differ from the parent.
Inputs: kind (required), name (required), inherits (required), settings (required).
slice_modelA
Slice STL/3MF/OBJ/STEP files to G-code plus a .gcode.3mf project (openable in the GUI / sendable to the printer).
printer/process/filaments: preset names or unique substrings; omitted -> GUI selection for that printer. overrides: setting key -> value, routed automatically to process/filament/machine (per-nozzle variants like nozzle_temperature_HS/_BRASS follow the plain key). output_dir defaults to the first model's folder; existing files with the same name are replaced. plate: 0 = all plates. arrange/orient: auto-place and auto-orient (arrange=false keeps the file's coordinates). scale / rotate_z (degrees): STL and OBJ only. copies: total instances of each model. use_project_settings: slice a 3MF with the settings stored inside it (no presets/overrides). Returns gcode paths with print time, filament grams/meters, layer count, key settings and warnings.
Inputs: models (required), plate, scale, copies, +11 more.
slicer_statusC
Slicer install, version, active user preset folder and the GUI's current printer/process/filament.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have clearly distinct purposes: slicing, summarizing G-code, previewing, opening the GUI, inspecting models, and managing presets. The only potential overlap is between get_preset and list_presets, but their descriptions make the list-vs-resolve distinction clear.
All names use consistent snake_case, which is readable and predictable. However, the set mixes verb_noun names (get_preset, slice_model, preview_gcode) with noun-style names (gcode_summary, slicer_status, model_info), a minor deviation rather than a serious inconsistency.
Nine tools is well-scoped for an Anycubic slicer integration. Each tool covers a distinct workflow step, from model inspection through slicing, G-code review, and preset management, with no obvious padding.
The surface covers the core slicer lifecycle: inspect models, list/get/save presets, slice, summarize and preview G-code, open the GUI, and check slicer status. Minor gaps remain, such as deleting or renaming user presets, but agents can work around these for the main workflows.
Maintenance
Related MCP Connectors
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
3D print farm management for AI. Monitor, queue, and control prints on your SimplyPrint account.
Real 3D-print slicing, quoting, DFM, orientation & material/settings advisors. Free personal tier.
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to interact with OrcaSlicer to manage profiles, adjust printing settings, and perform slicing operations. It allows users to search settings, slice STL/3MF files, and analyze G-code metadata through natural language assistants.7AGPL 3.0
- AlicenseBqualityDmaintenanceEnables AI agents to slice 3D models (STL files) headlessly using UltiMaker Cura's CuraEngine, returning ready-to-print G-code and estimated print time.12AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to work with OrcaSlicer code and perform slicing operations, such as reading files, checking Git status, and slicing 3D models to get print time and filament usage.MIT
- AlicenseNot gradedqualityCmaintenanceWraps the OrcaSlicer CLI to enable AI agents to slice 3D models, run parameter sweeps, and analyze G-code.107 PyPI1MIT