LightBurn MCP
Summary: It lets an AI assistant read and modify the LightBurn (or MillMage) project currently open on your machine — inspecting cut settings and applying changes — but it never controls the machine.
Pair & configure – pair with LightBurn via its consent dialog (granting
state,project,upload,project_write), and check product, host, port, pairing state, capabilities and reachability.Read machine state – device name/connection, supports_z, overrides, position (machine and workpiece, mm), display units, jog settings, saved positions, or all of it in one snapshot.
Read the project – filename, modified flag, shape count, workspace size, selected device and laser capabilities; all 32 layer definitions (color, hidden, in use, shape count); cut settings for the 30 cut layers, 2 tool layers, internal entry and image cuts (compact or full detail); the loaded material library.
See through the camera – camera overlay metadata (size, placement, revision) and the overlay itself as a PNG.
Change cut settings – partial updates to one cut entry by index: name, enabled, mode, speed, min/max power, passes, frequency, interval, kerf, z_offset, galvo/gantry blocks, tabs, sub-layers, and image dither mode. Values are validated first and land as a single undo step.
Apply library materials – copy a material library entry onto a cut by GUID or by material name + thickness; it refuses ambiguous matches or mismatched profiles/sub-layer counts.
Import artwork – merge a file or generated content (SVG, DXF, AI, PDF, LBRN, PNG/JPG/BMP) into the current project, optionally anchored at workspace x/y with a chosen origin point and grouping, and wait for LightBurn's import confirmation.
Open a file – replace the current project with a file (LightBurn prompts to save unsaved changes first).
Cannot start, stop, pause, frame, jog or home the laser, edit shapes, assign layers, save or export — and every write reminds you to review settings in LightBurn before running the job.
Connect two ways – stdio for local MCP clients, or token-protected HTTP mode (behind a tunnel) for URL-based clients like ChatGPT.
Provides tools for interacting with a running LightBurn project through its local REST API, allowing reading project data, layers, cut settings, machine state, and camera overlay, as well as updating cut settings and importing generated artwork. It enables AI-assisted sanity checks and edits of laser cutting/engraving settings without machine control.
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., "@LightBurn MCP Set the red layer to 300 mm/s, 20%, and 2 passes."
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.
LightBurn MCP
Talk to your LightBurn project from Claude, Cursor, ChatGPT and any other MCP client.
Read the open project · explain and sanity-check cut settings · change them by sentence · apply materials from your library · drop AI-generated SVGs straight onto the workspace
LightBurn 2.2 ships a local REST API. This project wraps it as a Model Context Protocol server, so an AI assistant can work with the LightBurn window you have open — on your machine, with no account and no cloud in between.
You: Layer C02 is 10 mm/s at 80 %. Is that plausible for 3 mm poplar on my 40 W CO2?
Claude: (reads get_project, get_units, get_cut 2) …that will likely char the edges.
Want me to set 15 mm/s / 65 % and 2 passes? Review it in LightBurn before you run.
You: Yes.
Claude: (update_cut) Done – speed 15, max_power 65, num_passes 2.
Review these settings in LightBurn before running the job.Table of contents
Related MCP server: Obsidian MCP Server
What it can do
Ask things like | |
🧭 Understand a project | "What's in my project, which layers are used, what machine is selected?" |
🔍 Check cut settings | "Do any of my used layers look wrong for 3 mm plywood?" |
✏️ Change settings by sentence | "Set the red layer to 300 mm/s, 20 % and 2 passes." |
📚 Apply library materials | "Use my 3 mm acrylic cut setting on layer blue." |
🎨 Import generated artwork | "Make an 80×50 mm name tag with rounded corners and put it at 100,100." |
📡 Read machine state | position, job state and progress, overrides, jog settings, units |
📷 Look through the camera | the assistant can view the camera overlay LightBurn has loaded |
Works with LightBurn (port 19520) and MillMage (port 19521, untested so far).
What it cannot do
The LightBurn API deliberately has no machine control: no start, stop, pause, frame, jog or home. There is no shape editing, no layer assignment, no save, no export. Changing cut settings edits the project only — you review it in LightBurn and run the job. Every write tool says so in its result. Read SAFETY.md once.
Quick start
You need: LightBurn 2.2.00 or newer running on this computer, and
Node.js 20+ (the LTS installer is fine). The package is published
on npm as lightburn-mcp.
Start LightBurn, open a terminal (PowerShell on Windows, Terminal on macOS) and run:
npx lightburn-mcp setupThat uses the released package from npm. To run the latest commit on main instead:
npx github:DerChris2011/Lightburn_MCP setup.
Setup walks you through four steps:
Application –
lightburn(default) ormillmage.Capabilities – what the assistant may do. Default is all four:
Capability
Grants
stateread machine and job state
projectread project data — includes the camera overlay image
uploadimport files into the project
project_writechange cut settings
Pairing – LightBurn pops up a consent dialog naming LightBurn MCP and the capabilities. Approve it within 30 seconds. The secret is stored in your user profile and never leaves your machine.
Clients – pick the MCP clients to configure. Their config files are updated with a backup kept next to them. Restart the client and you're done.
The first
npxrun downloads the package from npm (a few seconds; the GitHub variant clones and builds it instead, about a minute). After that your clients start the server directly, in well under a second.
Check anytime:
npx lightburn-mcp statusProduct: lightburn
Host: localhost:19520
Reachable: yes
Paired: yes (secret source: file)
Capabilities: state, project, upload, project_writeConnect your client
setup does this for you. To (re)do a single client:
npx lightburn-mcp config <client> --writeClient |
| Notes |
Claude Desktop |
| restart Claude Desktop afterwards |
Claude Code |
| prints the |
Cursor |
| |
Windsurf |
| |
VS Code (Copilot) |
| user-level |
Gemini CLI |
| |
Anything else (stdio) | — |
|
Full JSON for every client, Windows and macOS, is in docs/clients.md.
ChatGPT and other URL-based clients
ChatGPT adds MCP servers as connectors and only accepts a public HTTPS URL — it cannot
start a local process and rejects localhost. For that the server has an HTTP mode that
always requires an access token:
npx lightburn-mcp --http
# LightBurn MCP listening on http://127.0.0.1:3917/mcp
# Token required: header "Authorization: Bearer <token>" or URL http://127.0.0.1:3917/mcp/<token>Clients that can send headers use the bearer header (Claude Code:
claude mcp add --transport http lightburn http://127.0.0.1:3917/mcp --header "Authorization: Bearer <token>").
ChatGPT can't, so put the token in the URL and a tunnel in front:
ngrok http 3917 # or: cloudflared tunnel --url http://127.0.0.1:3917Add https://<your-tunnel-host>/mcp/<token> as a custom connector in ChatGPT
(Settings → Connectors, Developer Mode, eligible plans only). Show the token with
lightburn-mcp token, rotate it with lightburn-mcp token --rotate.
⚠️ The tunnel URL is a secret. Anyone who has it can read your project and change cut settings. Stop the tunnel when you're done. LightBurn Software does not endorse remote machine operation — see SAFETY.md.
Example prompts
"Summarise my current LightBurn project: layers in use and their settings."
"Compare every used layer against my material library and tell me which ones differ."
"Set every layer that is in use to 2 passes."
"Apply the Plywood 3 mm entry from my library to layer 2."
"Create a 60 mm circle with the text Workshop inside as SVG and import it at 50,50, top-left origin, grouped."
"Is the machine connected, and what are the current speed and power overrides?"
"Show me the camera overlay and tell me where the material is."
Tools
Tool | Capability | What it does |
| — | Pair with LightBurn (consent dialog); stores the secret |
| — | Product, host, port, paired?, capabilities, reachable? |
| state | Device name, connected flag, supports_z / overrides |
| state | Machine and workpiece coordinates (mm) |
| state | Display units for speed and distance |
| state | Jog distance / speed settings |
| state | Saved positions from the device profile |
| state | Position, job, overrides, aux, connection in one call |
| project | Filename, shape count, workspace, device and laser capabilities |
| project | Layer definitions (in-use only by default) |
| project | Cut settings (compact, in-use only by default) |
| project | One cut entry with every field |
| project | The loaded material library |
| project | Overlay size, placement, revision |
| project | The camera overlay as a PNG image |
| project_write | Partial update of one cut entry (one undo step in LightBurn) |
| project + project_write | Copy a library entry onto a cut; refuses ambiguous matches |
| upload (+ state) | Import a file or generated content, with placement (x, y, origin, grouping) |
| upload (+ state) | Replace the project with a file |
Values follow LightBurn's display units (get_units). Every write tool ends with
"Review these settings in LightBurn before running the job."
Built-in LightBurn knowledge
Tools alone make an assistant guess. The server therefore also ships what it should know, so answers are grounded in how LightBurn and your laser actually work:
Server instructions every client receives on connect: read units first, use the cuts'
in_use, read a cut before changing it, setoverride_frequencywithfrequency, treat Ruida'sconnected: falseas normal, always end a change with the review reminder.Six knowledge resources (
lightburn://knowledge/…) the assistant can read on demand: API rules and pitfalls · cut settings explained (modes, sub-layers, min/max power, kerf, interval/DPI, dither modes) · laser types (diode, CO2, Q-switched fiber, MOPA fiber with pulse width, UV, dual-source) · galvo specifics (frequency, timing constants, jump settings, wobble, deep engraving, annealing, colour marking) · gantry specifics (power ramping, air assist, PPI, lead-in, cut-through, overcut) · workflows (summarise, review, change, apply material, SVG import with mm units and the colour-to-layer palette).Three prompts your client can offer as one-click actions:
summarize_project,review_cut_settings(with material and goal),prepare_import(description and position).
The knowledge gives orders of magnitude for plausibility checks, not recipes. It tells the assistant to prefer your material library and existing layers over any table, and never to present a value as correct for your machine.
How it works
flowchart LR
subgraph Your computer
Client["MCP client<br/>(Claude Desktop, Cursor, …)"]
Server["lightburn-mcp<br/>stdio or HTTP"]
LB["LightBurn 2.2<br/>REST API :19520"]
Client -- "MCP (stdio)" --> Server
Server -- "HTTP + HMAC bearer token" --> LB
LB -- "consent dialog once" --> You((You))
end
ChatGPT["ChatGPT / URL clients"] -- "HTTPS tunnel + token" --> ServerPairing calls
POST /api/connect; LightBurn shows the consent dialog and returns a secret. The server stores it in%APPDATA%\lightburn-mcp\config.json(Windows) or~/Library/Application Support/lightburn-mcp/config.json(macOS).Every request carries
hex(HMAC-SHA256(secret, floor(unix_time / 60)))as a bearer token, exactly as the API specifies. A rejected token is retried once, then the tool asks you to re-pair.Imports open LightBurn's event stream before sending the file, so the
file_importedresult is reported back instead of a bare "accepted".Nothing is cached: every tool call reads live from LightBurn.
Environment variables override the stored config for advanced setups — for example a
server on another machine using a secret copied from Manage API Security in LightBurn:
LIGHTBURN_SECRET, LIGHTBURN_HOST, LIGHTBURN_PRODUCT, LIGHTBURN_MCP_CONFIG_DIR.
CLI reference
lightburn-mcp Start the MCP server on stdio
lightburn-mcp --http [--port N] [--host H] [--token T]
Start over Streamable HTTP (token always required)
lightburn-mcp setup Interactive: pair + configure clients
lightburn-mcp pair [--capabilities state,project,upload,project_write]
lightburn-mcp status Pairing state, reachability
lightburn-mcp config <client> [--write]
lightburn-mcp token [--rotate] Show or rotate the HTTP access token
lightburn-mcp --version | --help(npx lightburn-mcp <command> works without installing;
npm install -g lightburn-mcp gives you the lightburn-mcp command.)
Troubleshooting
Symptom | What's going on |
LightBurn does not appear to be running | LightBurn must be open. It serves the API on port 19520 (MillMage 19521); the port can't be changed. |
LightBurn rejected the token / 401 | The pairing was revoked, lacks the capability, or belongs to another LightBurn window. Run |
Pairing times out | The consent dialog is in LightBurn's main window and closes after 30 s. Bring LightBurn to the front and run |
The cut settings editor is open | Close the Cut Settings Editor window in LightBurn and retry. |
Server stopped starting after a Node upgrade or | Client configs point at the Node binary and package folder found during setup (GUI apps have no PATH). Re-run |
Running the server on another machine | Pair on the LightBurn machine, enable Settings → Extensions → Allow API Access From Network, copy the secret via Manage API Security → Show Secret…, start the server with |
| Normal on Ruida and similar controllers: the link is opened only during transfers. It is not a fault. |
Safety
Cut settings control laser power, speed and passes. Review every setting the assistant touched in LightBurn before you press Start. The API cannot start or stop a machine, this server adds no such ability, and it is not a safety system. LightBurn Software does not endorse remote or unattended operation. Details in SAFETY.md.
Development
git clone https://github.com/DerChris2011/Lightburn_MCP.git
cd Lightburn_MCP
npm install
npm test # tests against an in-process mock of the LightBurn API
node scripts/mcpcall.mjs '[["get_status"],["get_cut",{"index":0}]]' # call tools of the built server from the shell
npm run build
node dist/index.js --helpTypeScript, @modelcontextprotocol/sdk, zod, express; tests with Vitest. CI runs on
Windows and macOS. The design document and implementation plan live in
docs/superpowers/. Issues and pull requests are welcome.
License
MIT © DerChris2011. The LightBurn / MillMage API is governed by LightBurn Software's API EULA. This project is not affiliated with or endorsed by LightBurn Software.
Available Tools
19 toolsapply_material_to_cutA
Requires capabilities "project" and "project_write". Copies a material library entry (mode and base-layer params, plus sub-layer values for sub-layers the target cut already has) onto a cut entry. Select the entry by entry_guid, or by material name (case-insensitive) and optional thickness. Refuses when several entries match, when the entry has more sub-layers than the target, or when kinds differ. A machine block (galvo/gantry) that does not match the target profile is skipped and reported.
Inputs: index (required), material, thickness, entry_guid.
connection_infoA
Shows how this server is configured: product, host, port, whether it is paired, granted capabilities, and whether LightBurn is reachable right now. Never reveals the secret.
Inputs: no named parameters.
get_camera_overlayA
Requires capability "project". The camera overlay currently drawn on the workspace as a PNG image, plus its metadata. Returns what LightBurn already has in memory; it never triggers a new capture. LightBurn only.
Inputs: no named parameters.
get_camera_overlay_metadataA
Requires capability "project". Size, workspace placement (mm) and a revision token of the camera overlay, without transferring the image. LightBurn only; 404 when no overlay is loaded.
Inputs: no named parameters.
get_cutA
Requires capability "project". One cut entry with every field, by the flat index from get_cuts. For LightBurn normal cuts, params contains exactly one machine block (params.galvo or params.gantry) matching the entry's profile.
Inputs: index (required).
get_cutsA
Requires capability "project". Cut settings of the project. LightBurn returns a fixed list: 30 cut layers, 2 tool layers, 1 internal entry, then 30 image cuts; MillMage returns its operation list. Each entry's index is the value to pass to get_cut / update_cut. Compact mode returns the core fields only (speed, min/max power, passes, mode, profile); use compact=false or get_cut for every field. Values use the user's display units (see get_units).
Inputs: compact, in_use_only.
get_jog_settingsA
Requires capability "state". Current jog distance and speed settings in display units.
Inputs: no named parameters.
get_layersA
Requires capability "project". All 32 layer definitions (index, name, color as #RRGGBB, type, hidden, in_use, shape_count) and the active layer index. By default only layers in use are returned.
Inputs: in_use_only.
get_material_libraryA
Requires capability "project". The currently loaded material library (LightBurn: flat entries with material, thickness, description, guid and a full cut setting; MillMage: operations library trees).
Inputs: no named parameters.
get_positionA
Requires capability "state". Current machine and workpiece coordinates, always in mm. Axes the controller does not report are omitted.
Inputs: no named parameters.
get_projectA
Requires capability "project". Metadata of the open project: filename, modified flag, shape count, display units, workspace size in mm and the selected device including laser source capabilities (device.laser.controller tells which controller is attached).
Inputs: no named parameters.
get_saved_positionsB
Requires capability "state". Saved positions from the device profile.
Inputs: no named parameters.
get_state_snapshotA
Requires capability "state". Latest state snapshot in one call: position, job state and progress, speed/power overrides, aux state, connection and jog settings. On Ruida controllers job.state is always idle and progress is never reported.
Inputs: no named parameters.
get_statusA
Requires capability "state". Connection status and device capabilities of the selected device profile (device_name, connected, supports_z, supports_overrides).
Inputs: no named parameters.
get_unitsA
Requires capability "state". The user's display units: units is the speed unit (mm/s, mm/min, in/s, in/min), distance_units the distance unit (mm, in). They are independent; never infer one from the other.
Inputs: no named parameters.
open_fileA
Requires capability "upload" (plus "state" for confirmation). REPLACES the current project with the file, like File > Open; LightBurn prompts the user to save unsaved changes first. Send a local file via path, or content / content_base64 with a filename. LightBurn confirms success reliably only for native projects (.lbrn, .lbrn2, .mage); for other formats this tool reads the project afterwards and reports it as opened_unconfirmed.
Inputs: path, content, filename, wait_seconds, +1 more.
pairA
Pairs this server with the running LightBurn / MillMage on this machine. LightBurn shows a consent dialog naming the application and the requested capabilities; the user must approve it within 30 seconds. The secret is stored in the per-user config and never returned. Capabilities are fixed for the life of the pairing; call pair again to change them. Note that "project" includes the camera overlay image.
Inputs: capabilities, application_name.
update_cutA
Requires capability "project_write". Partial update of one cut entry (LightBurn layer or MillMage operation) by its flat index from get_cuts. Only the fields in changes are modified; LightBurn validates the whole body first and changes nothing on error. Editable on LightBurn normal cuts: name, enabled, mode (cut|scan|offset), params (any LaserCutParams field such as speed, min_power, max_power, num_passes, frequency, interval, kerf, z_offset), params.galvo or params.gantry (must match the entry's profile), negative, pass_through, enable_cleanup, sort_within_layer, tabs, global_passes (galvo only), and existing sub_layers addressed by index. Image cuts: name, enabled, params.speed, params.max_power, params.dither_mode. MillMage: name, enabled, any settings key. Set params.override_frequency=true together with params.frequency, otherwise the frequency has no effect. Powers are 0-100. Values use the user's display units (see get_units). The change is one undo step in LightBurn; the operator must review before running.
Inputs: index (required), changes (required).
upload_fileA
Requires capability "upload" (plus "state" for import confirmation). Imports a file into the CURRENT project (merge), like File > Import. Supported: .svg, .dxf, .ai, .pdf, .lbrn/.lbrn2, .png/.jpg/.bmp and other formats LightBurn can import. Send a local file via path, or generated content via content (text such as SVG) or content_base64. Optionally anchor the import at workspace coordinates x/y in mm (workpiece origin) with origin naming which point of the bounding box sits at the anchor (default center); without x/y it lands at the current view center. Waits up to wait_seconds for LightBurn's file_imported event and reports the outcome.
Inputs: x, y, path, origin, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Tools target distinct resource+action pairs: get_cuts vs get_cut (list vs single), get_position vs get_jog_settings vs get_saved_positions, and get_camera_overlay vs its metadata variant are clearly delineated. Minor overlap exists between the state readers (get_position, get_units, get_jog_settings are all subsumed by get_state_snapshot) and among get_status/connection_info/get_state_snapshot, but descriptions disambiguate them.
Strong get_/update_/apply_/upload_/open_ verb_noun pattern throughout, with clean noun suffixes distinguishing variants (_metadata, _snapshot, _settings). The bare 'pair' and noun-phrase 'connection_info' are minor deviations but still readable and unambiguous.
19 tools is slightly above the ideal range but each earns its place in a genuinely layered domain (state reads, cut editing, material library, camera overlay, file import, pairing). No obvious redundant bloat; the granular state getters are defensible as lightweight alternatives to the full snapshot.
Cut handling has read and update but no create/delete or add-layer operation, and there is no jog/move command or job control (start/pause/stop) despite get_jog_settings and job-state reporting — notable gaps for a laser-control surface. The read/derive side and file/camera operations are otherwise well covered.
Maintenance
Related MCP Connectors
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Connect your AI assistant to Blender for 3D modeling, Geometry Nodes, materials, lighting, animation, rendering and export. Inspect real scenes and viewport images, refine the result and restore checkpoints. OAuth connects your chat to Blender Bridge Desktop on an online Windows 10/11 x64 computer running Blender 4.2+. The chat can run on another device. Requires an active Blender Bridge account; 7-day trial available. AI model access is separate.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to discover, connect to, and control LightWave3D Modeler and Layout programmatically via the Command Port.4Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI assistants to read, write, and manage Obsidian notes, folders, and periodic notes via the Local REST API, including search and command execution.14MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to read and create geometry in an open Cadwork 3D document via a local bridge, with queued sequential execution, write approvals, undo support, and a live dashboard for monitoring activity.151AGPL 3.0
- AlicenseAqualityCmaintenanceLets an AI agent read and edit the Inkscape document you have open in your own window, with millimetre-exact positioning measured on live visual bounding boxes. A revision guard blocks stale edits and every change is verified as landed, all on Inkscape's normal undo stack.24MIT