KAMP Adaptive Bed Mesh Klipper Macro Setup 2026

Why Standard Klipper Bed Meshes Waste Your Time

If you run Klipper with a standard BED_MESH_CALIBRATE before each print, you spend 30-90 seconds probing the entire bed regardless of how much of it your part actually uses. A 30mm calibration cube triggers the same 25-point probe pattern as a part that covers the entire build plate. For high-volume printing or quick test prints, that probing time becomes a meaningful fraction of total print time, and the resulting mesh covers areas you do not even print on.

KAMP (Klipper Adaptive Meshing & Purging) solves this by reading the gcode for the print, calculating the actual bounding box of the part on the build plate, and generating a bed mesh that covers only that area at a probe density proportional to the part size. A 30mm part might get a 3×3 mesh in 15 seconds. A 200mm part gets a 7×7 mesh in 45 seconds. The probing scales with what you actually need.

This guide walks through installing KAMP on a Klipper printer in 2026, configuring it correctly for your specific machine, and verifying it works without breaking your existing macros. The procedure is straightforward but has a few gotchas that show up consistently in community support threads.

kamp adaptive bed mesh klipper macro setup 2026 - finished print closeup

Prerequisites Before Starting KAMP Installation

You need a Klipper-based printer with Mainsail or Fluidd as the web interface, a working bed leveling probe (BLTouch, inductive, strain gauge, or piezo), and SSH access to the printer’s controller (Pi, BTT Pad, or similar). The printer must currently be able to run BED_MESH_CALIBRATE successfully end-to-end before KAMP is installed — KAMP is an enhancement on top of existing bed meshing, not a replacement for the underlying probe configuration.

You also need your existing PRINT_START macro accessible and you should understand what it does. KAMP changes how PRINT_START triggers bed meshing, and if your macro has unusual ordering (some users mesh before homing, which is unusual but valid), the KAMP integration must be adjusted accordingly.

Installing KAMP from GitHub

The official KAMP repository is at github.com/kyleisah/Klipper-Adaptive-Meshing-Purging. SSH into your Klipper controller and clone the repository into the printer_data folder:

cd ~/printer_data/config/
git clone https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git KAMP

This creates a KAMP folder in your config directory. Inside is the Adaptive_Meshing.cfg file, which is the macro you include in your main printer.cfg file. Edit printer.cfg and add this line near the top:

[include KAMP/Adaptive_Meshing.cfg]

Restart Klipper from the Mainsail or Fluidd interface. If Klipper restarts cleanly without configuration errors, the install is successful at the config level. The next step is calling KAMP from your PRINT_START macro.

Modifying PRINT_START to Use Adaptive Meshing

Find your PRINT_START macro in printer.cfg or in macros.cfg (depending on how you have things organized). It probably has a line that calls BED_MESH_CALIBRATE. Replace that line with:

BED_MESH_CALIBRATE ADAPTIVE=1

The ADAPTIVE=1 parameter is what triggers KAMP — without it, BED_MESH_CALIBRATE runs as normal. With it, KAMP reads the gcode, computes the bounding box, and shrinks the mesh accordingly.

The slicer also needs to be configured to send the correct gcode metadata so KAMP can read the part size. In OrcaSlicer or SuperSlicer, add this to the start gcode:

; PRINT_BOUNDS = [first_layer_print_min_0],[first_layer_print_min_1],[first_layer_print_max_0],[first_layer_print_max_1]

Or in Cura, use the equivalent expression in the start gcode. The exact variable names differ by slicer; check the KAMP documentation for your slicer.

Probe Count and Mesh Density Tuning

KAMP automatically calculates the number of probe points based on the part size, but you can tune this behavior in the KAMP config. The Adaptive_Meshing.cfg file has variables for minimum probe count, maximum probe count, and probe scaling. Default values are 3 minimum probes per axis, 9 maximum, and a scaling factor that produces roughly one probe point per 30mm of part dimension.

For most printers the defaults are fine. If you have a particularly large bed or a bed with known unevenness in specific areas, you may want to increase the minimum probe count to 5 to ensure good coverage. If your bed is very flat and you prioritize speed, dropping minimum to 3 and maximum to 5 cuts probe time dramatically on small parts.

The probe pattern density is computed live before each print, so you do not need to change the config for each part — only if you want to change the overall behavior for your machine.

Common Failure Modes and How to Diagnose Them

The most common KAMP failure is “no bounding box found” errors. This happens when the slicer is not sending the PRINT_BOUNDS metadata correctly. Open the gcode file in a text editor and search for PRINT_BOUNDS — if it is missing, the slicer start gcode is not configured correctly. Re-check the start gcode in your slicer profile and re-slice.

The second most common failure is mesh size too small for KAMP minimums. If the part is very tiny (10mm or less), the bounding box may produce a mesh smaller than the minimum probe spacing allows. KAMP handles this by expanding the mesh to the minimum size in this case, but on some configurations the expansion may extend off the bed. Check that your probe X/Y offsets are configured correctly in printer.cfg.

The third failure is gcode formatting differences between slicers. PrusaSlicer’s PRINT_BOUNDS uses a different format than SuperSlicer, even though they are derived from the same code base. Check the KAMP docs page for your specific slicer to find the exact start gcode line to use.

Adaptive Purging — The Sister Feature

KAMP also includes adaptive purging — a feature that adjusts the purge line at the start of a print to be proportional to the print itself rather than always purging a fixed 10mm strip. For small prints this saves filament; for large prints it ensures adequate purging before the print starts.

To enable, add this include to printer.cfg:

[include KAMP/Line_Purge.cfg]

Then in your PRINT_START macro, replace your existing purge line code with:

LINE_PURGE

The purge line is now generated at print time based on the part’s bounding box. For most printers this is a quality-of-life improvement; for users running many short test prints, it cuts purge waste meaningfully.

kamp adaptive bed mesh klipper macro setup 2026 - hardware detail

Performance Numbers After Installation

On a Voron 2.4 with a 350×350 build plate, switching from a static 9×9 bed mesh (full bed probing) to KAMP saves 45-60 seconds on prints smaller than 100mm and 15-25 seconds on prints up to 200mm. On prints that cover most of the bed, KAMP and static mesh take roughly the same time, so there is no penalty for large parts.

On a Voron 0.2 with a 120×120 bed, the savings are smaller in absolute terms (10-20 seconds) but a larger percentage of total print time on small parts. The combined effect of adaptive meshing and adaptive purging cuts roughly 20-40 seconds per print on small parts — meaningful over a multi-print day.

Smart Park: The Companion Feature Worth Enabling

Smart Park is part of the KAMP repository and moves the toolhead to a corner near the upcoming print before the hotend reaches printing temperature. Without Smart Park, the standard Klipper start sequence heats the nozzle while the toolhead sits parked over the bed center or at the bed origin — and during heating, residual filament drips from the nozzle onto the bed where the print will start. Smart Park sidesteps the issue by parking the head outside the print bounding box during heating.

To enable, include the Smart_Park.cfg file from the KAMP repository in printer.cfg and add SMART_PARK to your PRINT_START macro before the heating commands. The integration takes two lines of config and one macro change. The benefit is no drip blob on the first-layer perimeter of small prints, which is a quality-of-life improvement particularly noticeable on miniatures and small precision parts.

Compatibility With Existing Macros and Workflows

KAMP is designed to integrate with existing PRINT_START macros rather than replace them. If your printer uses a complex PRINT_START with material-specific bed and nozzle temperatures, chamber preheating sequences, or other custom logic, KAMP can be inserted into that workflow at the bed meshing step without breaking other functionality. The order matters — homing must happen before bed meshing, and bed meshing must happen before Smart Park’s final position move and the first layer.

For users coming from a static bed mesh saved with BED_MESH_PROFILE, you do not need to remove the saved profile. KAMP generates a new mesh per print and stores it ephemerally. Your saved baseline profile remains available if you want to fall back by removing the ADAPTIVE=1 parameter from PRINT_START.

Maintenance and Updates

KAMP is actively maintained, and updates to the GitHub repository should be pulled periodically. SSH into the controller and run:

cd ~/printer_data/config/KAMP
git pull

Then restart Klipper. Updates usually do not change the user-facing config, but reading the KAMP changelog is worth doing if you upgrade — occasionally new features (like the Smart Park feature, which moves the toolhead to the corner of the upcoming print before heating to avoid drips on the bed) add to the start gcode integration.

KAMP has become essentially standard equipment for Klipper users in 2026 — most prebuilt configs (Voron, Trident, V0, RatRig) ship with KAMP integration out of the box. For older configs or DIY printers, installing it manually is the worthwhile 30-minute project.

Similar Posts