Flash Studio preview of a model the agent prepared: AD5X 0.4 nozzle, PETG, tree supports, brim, 2h 10m.
Languages: English · Русский · 中文 · Español · Deutsch · Français · Português · 日本語 · हिन्दी · Bahasa Indonesia · বাংলা · اردو · 한국어 · فارسی
FlashForge MCP is a Model Context Protocol server that lets an AI agent prepare and slice 3D models for FlashForge printers — choose orientation, supports, brim, material and temperatures, then produce a ready-to-print .gcode file. It drives the Flash Studio CLI (the OrcaSlicer fork bundled with FlashForge printers), so slicing stays local, deterministic and identical to the desktop app.
Ask your agent "slice this bracket for my AD5X in PETG, supports auto, and check it fits" — and get a sliced file with a print summary instead of a dozen GUI clicks.
At a glance
- What it is: MCP server (stdio, JSON-RPC 2.0), zero npm dependencies, Node.js 18+.
- What it does: STL / 3MF / OBJ → G-code with geometry-aware orientation, supports and adhesion.
- Learns: remembers your printers, materials, habits and failed prints, then applies them next time.
- Printers: FlashForge AD5X, Adventurer 5M / 5M Pro / A5 / 3, Creator 5 / 5 Pro, Guider 2s / 3 Ultra / 4 / 4 Pro (incl. HF hotends).
- Clients: Claude Desktop, Claude Code, ChatGPT/Codex, Cursor, OpenCode, Cline, Windsurf — any MCP-capable agent.
- Not included: sending jobs to the printer. This tool slices only.
- Why this exists
- Features
- Supported printers
- Requirements
- Install
- Connect your AI agent
- Tools
- Quick start
- How the agent decides
- Memory and personalization
- Materials and temperatures
- 3MF and Bambu/Orca projects
- Troubleshooting
- FAQ
- Contributing
- License
Slicing for a 3D printer is a chain of small decisions: does the model fit, which side goes down, do overhangs need supports, will the first layer hold, is the filament dry. A GUI hides all of that behind previews and dropdowns, and an AI agent cannot click through it.
The Flash Studio CLI looks like an easy answer, but it has sharp edges that silently ruin prints:
- It does not resolve
inheritsin process and filament profiles. Pass a profile as-is and speeds fall back to Orca defaults — walls at 60 mm/s instead of 200, prints twice as long. - It rejects some bundled profiles that lack
"from": "system"/"instantiation": "true"with a crypticfrom unsupported. - It refuses Bambu/Orca
.3mfcontainers newer than the bundled CLI (File Version 2.5.x not supported). - It gives no feedback on whether the settings you asked for were actually applied.
This server fixes those problems, adds a geometry analysis step, and exposes the whole workflow as seven MCP tools an agent can reason about.
- Geometry analysis before slicing — bounding box, volume, surface area, bed contact and overhang area, plus five alternative orientations with a fit check for the selected printer.
- Automatic orientation — rotates the model only when it clearly removes overhangs or makes it fit (
--orient 1). - Automatic supports — tree/organic supports are enabled only when the analyzed overhang is real, with material-aware gaps (0.26 mm for PETG, 0.18 mm for PLA).
- Automatic brim — outer brim for tall narrow parts and small contact areas.
- Material presets —
pla,petg,abs,asa,tpuset the right profile, nozzle/bed temperatures and support gap. - Fine-grained overrides — support style, angle, interface layers, XY clearance, base pattern, raft, fuzzy skin, fan, first-layer speed.
- Verification after slicing — the server compares requested settings with the generated G-code and warns when the slicer changed something.
- Learns your setup — remembers the machine, material, quality and override habits you actually use, records failed prints and corrections, and applies them to the next slice. Local JSON, no cloud, opt-out.
- Personalized advice —
flash_adviseprints a ready-to-pasteflash_slicecall with orientation, supports, brim and risks based on the model and your history. - Portable profile resolution — machines, processes and filaments are matched by
compatible_printers, not by filename guesses, so the whole FlashForge lineup works with short names like"Creator 5"or"Guider4 HF". - Multi-material — up to 4 filaments on AD5X/Guider 4 (IFS), 4 hotends on Creator 5, 2 on Guider 3 Ultra.
- 3MF fallback — if the CLI rejects a newer 3MF, the server extracts the mesh itself and slices an STL.
| Family | Build volume, mm | Nozzles | Notes |
|---|---|---|---|
| FlashForge AD5X (default) | 220 × 220 × 220 | 0.25 / 0.4 / 0.6 / 0.8 | IFS, 4 spools, open frame, PEI |
| Adventurer 5M / 5M Pro | 220 × 220 × 220 | 0.25 / 0.4 / 0.6 / 0.8 | single material |
| Adventurer A5 | 220 × 220 × 220 | 0.25 / 0.4 / 0.6 / 0.8 | single material |
| Adventurer 3 Series | 150 × 150 × 150 | 0.4 / 0.6 | compact bed |
| Creator 5 / 5 Pro | 256 × 256 × 256 | 0.25 / 0.4 / 0.6 / 0.8 | 4 independent hotends |
| Guider 2s | 280 × 250 × 300 | 0.4 | enclosed, PLA-oriented profiles |
| Guider 3 Ultra | 300 × 330 × 600 | 0.4 / 0.6 / 0.8 | 2 hotends, tall chamber |
| Guider 4 / 4 Pro | 300 × 300 × 300 | 0.4 / 0.6 / 0.8 + HF | IFS, high-flow hotends |
Machine names are resolved by family: machine: "AD5X", "AD5X 0.6 nozzle", "Creator 5", "Guider 3 Ultra", "Guider4 0.4 HF". If no nozzle is given, 0.4 mm is used. flash_profiles lists every concrete profile with its build volume.
- Node.js 18+ (no npm packages to install).
- Flash Studio (the Orca-Flashforge desktop app) installed — it ships the CLI and all printer profiles.
- Windows default:
C:\Program Files\Flashforge\Flash Studio Desktop\flash studio.exe - Override with
FLASHSTUDIO_BINand, if needed,FLASHSTUDIO_PROFILES.
- Windows default:
- A MCP-capable agent: Claude Desktop, Claude Code, Cursor, OpenCode, Cline, Windsurf, ChatGPT/Codex via an MCP bridge, etc.
Flash Studio is a Windows desktop application. On Linux/macOS, point
FLASHSTUDIO_BINat a compatible Flash Studio/Orca-Flashforge build.
git clone https://github.com/ildargiv/flashforge-mcp.git
cd flashforge-mcp
node --version # 18 or newer
node smoke.mjs flash_profiles # verifies the install and lists printer profilesNothing to npm install — the server uses only the Node standard library.
Edit claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"flashforge": {
"command": "node",
"args": ["C:\\path\\to\\flashforge-mcp\\server.mjs"]
}
}
}~/.cursor/mcp.json uses the same shape:
{
"mcpServers": {
"flashforge": {
"command": "node",
"args": ["C:\\path\\to\\flashforge-mcp\\server.mjs"]
}
}
}opencode.json:
{
"mcp": {
"flashforge": {
"type": "local",
"command": ["node", "C:\\path\\to\\flashforge-mcp\\server.mjs"],
"enabled": true
}
}
}Restart the client and ask: "What FlashForge printers can you slice for?" — the agent should call flash_profiles.
| Tool | Purpose |
|---|---|
flash_profiles |
List machines (with build volumes), processes and filaments from the installed Flash Studio. filter narrows the list, e.g. "AD5X", "PETG", "Creator". |
flash_printer |
Inspect one printer or the whole lineup: build volume, nozzle, layer range, multi-material capacity, enclosure, compatible processes and filaments, temperature envelope, plus learned usage and notes. |
flash_analyze |
Geometry report without slicing: size, volume, bed contact, overhang area, five rotated orientations, fit check, recommendations. Works with STL, OBJ and 3MF. |
flash_advise |
Personalized plan before slicing: machine/material/quality from memory, orientation, supports, brim, risks, similar past prints and a ready-to-paste flash_slice call. |
flash_slice |
Slice a mesh to .gcode. Returns time, layers, filament usage, supports/brim weight, temperatures, applied settings and warnings. Records the job in memory. |
flash_info |
Parse an existing .gcode: printer, time, layers, filament, supports, infill, temperatures, file size. |
flash_memory |
Show, set or clear learned preferences; attach facts to a printer/material; report a print outcome and corrections; export/import the profile. |
Model and output
| Parameter | Description |
|---|---|
stl |
Path to .stl, .3mf or .obj (absolute or relative to the current directory). |
out |
Output .gcode path. Defaults to <mesh name>.gcode. |
allowOversize |
Slice even if the model exceeds the build volume (rejected by default). |
Printer and quality
| Parameter | Description |
|---|---|
machine |
Machine name or family: "AD5X", "AD5X 0.6 nozzle", "Creator 5", "Guider 3 Ultra", "Guider4 0.4 HF", "Adventurer 3". Default: Flashforge AD5X 0.4 nozzle. |
quality |
fine (smallest layer), standard (closest to 0.20 mm), draft (largest). Families without the label (Guider 2s uses Detail/Optimal/Standard) get the nearest layer height. |
Material
| Parameter | Description |
|---|---|
material |
pla, petg, abs, asa, tpu — selects the profile, temperatures and support gap. |
filament |
Explicit profile name (partial match), overrides material. Nozzle-specific variant is chosen automatically. |
filaments |
Array of up to 4 names for multi-material jobs. |
nozzleTemp, bedTemp |
Temperature overrides for third-party filament. |
color |
G-code metadata colour for all filaments (name or #RRGGBB). The physical colour comes from the spool in the IFS slot. |
colors |
Per-filament colours in filaments order, up to 4 (names or #RRGGBB). Overrides color. |
bedType |
Build plate type, default "High Temp Plate". |
Geometry and supports
| Parameter | Description |
|---|---|
orient |
"auto" (default), true/"always", false. Auto rotates only when overhang drops sharply or the model starts fitting. |
supports |
"auto" (default), "none", "tree", "normal", or a number = tree support angle. |
supportAngle |
Overhang threshold in degrees from vertical. |
supportStyle |
organic / tree_slim / tree_hybrid for tree; grid / snug for normal. |
supportOnBuildPlateOnly |
Supports may start only on the build plate. |
supportTopZDistance, supportBottomZDistance |
Gap between support and part, mm. |
supportObjectXyDistance |
Horizontal clearance, mm. |
supportBasePattern, supportBasePatternSpacing |
Support base pattern and spacing. |
supportInterfaceTopLayers, supportInterfaceBottomLayers, supportInterfacePattern, supportInterfaceSpacing |
Dense interface layers under/over overhangs. |
Adhesion
| Parameter | Description |
|---|---|
brim |
"auto", "none", "outer", "ears". Auto adds an outer brim for tall/narrow parts and small contact. |
brimWidth, brimGap |
Brim width and gap, mm. |
raft |
true (3 layers) or number of layers. |
firstLayerSpeed, closeFanLayers |
First-layer speed and fan-off layer count. |
Other
| Parameter | Description |
|---|---|
infill |
Sparse infill density, %. |
fuzzySkin |
none / external / all, with fuzzySkinThickness and fuzzySkinPointDistance. |
flash_analyze { stl: "bracket.3mf", machine: "AD5X" }
flash_slice { stl: "bracket.3mf", material: "petg", supports: "auto", brim: "auto" }
flash_slice { stl: "part.stl", machine: "Creator 5", quality: "fine" }
flash_slice { stl: "figure.3mf", filaments: ["PLA Basic", "PLA Matte", "PETG Pro", "PLA Silk"] }
flash_info { file: "bracket.gcode" }
More agent-ready prompts in examples/prompts.md.
The intended order is fit → orientation → supports → brim → material:
- Does it fit?
flash_analyzechecks every orientation against the build volume. If none fits, scale or cut the model; if a 90° Z rotation helps, rotate the mesh (the CLI cannot rotate around Z). - Orientation. Auto-rotate when overhangs exceed 80 mm² and drop by at least 65%, or when the model stops overflowing the bed. Example: a T-shaped part goes from 1600 mm² overhang and 53 min to 64 mm² and 15 min.
- Supports. Auto-enables tree/organic when overhang area exceeds
max(40 mm², 0.2% of surface area). Grids, lattices and vases are usually printed without supports. - Adhesion. Auto-brim when height / smallest side > 4, contact area < 30% of the footprint, or contact < 30 mm².
- Material. PLA 215/60, PETG 250/80, ABS/ASA 260/100, TPU 225/45, with support gaps tuned so supports don't fuse to the part.
The server keeps a small local profile so the agent does not start from zero every time. It lives in ~/.flashforge-mcp/memory.json (override with FLASHFORGE_MCP_HOME), contains no telemetry, and can be turned off with FLASHFORGE_MCP_NO_MEMORY=1.
What it learns:
- Your defaults — machine, material, quality, supports, brim, infill, bed type. Explicit values always win; omitted arguments are filled from memory and the summary lists what was applied (e.g.
material=petg, brim=auto). - Habits per printer — which quality/support/brim settings you actually choose, and repeated overrides such as
supportTopZDistance=0.3after supports fused. A learned override is applied automatically after 2+ matching choices at 60%+ share; afeedbackcorrection is weighted as three votes and applies on the next slice. - Material temperatures — when you pass
nozzleTemp/bedTempfor a material three times with the same value, that becomes the remembered temperature for it. - Print history — every successful slice is logged (mesh, machine, material, time, grams, supports, brim, orientation, warnings).
flash_memory action=feedbackmarks itsuccess/failed/partial, adds a rating and notes, and records corrections for next time. - Facts —
flash_memory action=learnattaches free-form notes to a printer or material ("supports fused at 0.26 mm", "dry PETG 4 h").
Typical loop:
flash_printer { machine: "AD5X" }
flash_advise { stl: "bracket.3mf" }
flash_slice { stl: "bracket.3mf" }
# after the print:
flash_memory { action: "feedback", outcome: "failed",
notes: ["supports fused"], corrections: { supportTopZDistance: 0.3 } }
flash_advise combines the geometry report with memory: it states the plan, the risks, what it already knows about you, similar past prints and the exact flash_slice arguments. If nothing is learned yet it says so and the first slice becomes the start of the profile.
Memory is plain JSON — you can edit it, export/import it, or forget a printer, material, print list, corrections, preferences, or everything (section: "all", confirm: true).
material |
Nozzle / bed, °C | Support gap, mm | Base profile |
|---|---|---|---|
pla |
215 / 60 | 0.18 | Flashforge PLA Basic |
petg |
250 / 80 | 0.26 | Flashforge HS PETG |
abs |
260 / 100 | 0.20 | Flashforge ABS Basic |
asa |
260 / 100 | 0.20 | Flashforge ASA Basic |
tpu |
225 / 45 | 0.22 | Flashforge TPU 95A |
For third-party PETG, material: "petg" plus nozzleTemp: 245 is a safe start. Dry PETG for 4–6 hours at 65 °C if you hear popping or see stringing.
Bambu Studio and OrcaSlicer save meshes in 3D/Objects/*.model and reference them from 3D/3dmodel.model with a transform. The server parses both the container and the transforms, so analysis works on those files even when the CLI refuses the container version.
If the bundled CLI rejects a newer project (File Version 2.5.x not supported by current cli version 2.4.2), flash_slice extracts the mesh, writes a temporary STL and slices it. Multi-object projects are merged in that fallback — check the preview.
| Symptom | Fix |
|---|---|
from unsupported |
A vendor profile is missing "from": "system" / "instantiation": "true". The server patches its own copies; make sure you run the latest version. |
File Version 2.5.0.66 not supported |
Newer 3MF container. The server falls back to mesh extraction automatically. |
| Prints take twice as long as in the GUI | Profiles were loaded without flattening inherits. Always slice through this MCP server, not the raw CLI. |
Generic PETG picks the wrong printer |
It is not compatible with AD5X in the bundled profiles. Use material: "petg" (HS PETG base). |
| Supports fuse to PETG | Increase supportTopZDistance to 0.28–0.30 mm and keep the part cool. |
| Model rejected as oversize | Rotate/scale it, or pass allowOversize: true if you know what you are doing. |
| Nothing to be sliced | The model is outside the printable volume (often after scaling or a transform). Check flash_analyze. |
More detail in docs/troubleshooting.md.
Can an AI agent slice a 3D model? Yes. The agent needs a deterministic tool that turns a mesh into G-code. This MCP server wraps the Flash Studio/OrcaSlicer CLI and adds the geometry checks an agent needs to make sensible choices, so the result is reproducible.
Does this work with OrcaSlicer or Bambu Studio?
It drives Flash Studio, the Orca-Flashforge fork installed with FlashForge printers. Profiles are OrcaSlicer-compatible. Bambu/Orca .3mf projects are read for analysis and can be sliced via the mesh-extraction fallback.
Which printers are supported? FlashForge AD5X, Adventurer 3 / 5M / 5M Pro / A5, Creator 5 / 5 Pro, Guider 2s / 3 Ultra / 4 / 4 Pro. Any printer profile bundled with Flash Studio is resolved automatically, including HF hotends.
Do I need a 3D printer to use it? No. You need Flash Studio installed (for its CLI and profiles). Slicing works offline; only actual printing needs hardware.
Can it choose supports and orientation automatically?
Yes. flash_analyze measures overhangs and bed contact, orient: "auto" rotates only on a real win, and supports: "auto" enables tree supports only when overhangs justify them.
Does it work with ChatGPT, Claude, Cursor or OpenCode? Yes — it is a standard stdio MCP server, so any MCP client can use it. Configuration examples are above.
Does it send the file to the printer?
No. It slices locally and returns a .gcode file. Uploading/printing is left to Flash Studio, the printer's LAN API or your own automation.
Does the agent remember my printer and preferences?
Yes. It stores them locally in ~/.flashforge-mcp/memory.json: default machine/material/quality, per-printer habits, repeated overrides, material temperatures and print history. Later slices use them automatically, and flash_advise explains what it took from memory. Nothing is sent anywhere.
Can I reset or move the learned profile?
Yes. flash_memory { action: "forget", section: "all", confirm: true } clears it, export/import moves it to another machine, and FLASHFORGE_MCP_NO_MEMORY=1 disables writing entirely.
Is it free? Yes, MIT licensed. No telemetry, no cloud calls.
Does it support multi-color printing? It can slice with up to 4 filaments (IFS on AD5X/Guider 4, four hotends on Creator 5). Slot assignment happens on the printer/Flash Studio side.
Why not just use the slicer GUI? For a human, the GUI is great. For an agent that has to answer "will this print, and how?", a CLI with geometry analysis and verification is faster, scriptable and auditable.
Issues and pull requests are welcome. Please run the checks before opening a PR:
node --check server.mjs
node --test test/mcp.test.mjsSee CONTRIBUTING.md for details.
MIT © 2026 ildargiv
Search topics: MCP server for 3D printing · AI 3D printing agent · Model Context Protocol 3D printer · OrcaSlicer MCP · Flash Studio CLI · FlashForge AD5X MCP · Creator 5 · Guider 4 · automatic supports · STL to G-code automation · Claude 3D printing · ChatGPT 3D printing · Cursor MCP · OpenCode MCP