home / mcp / klipper mcp server

Klipper MCP Server

Provides a programmable API to control Klipper printers via Moonraker, exposing 100+ tools for status, gcode execution, toolchanging, diagnostics, files, camera, and maintenance.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "charleslotto-klipper-mcp": {
      "url": "http://localhost:8000/mcp",
      "headers": {
        "ARMED": "false",
        "API_KEY": "your-secret-key",
        "MCP_HOST": "0.0.0.0",
        "MCP_PORT": "8000",
        "ADMIN_PIN": "1234",
        "TOOL_COUNT": "4",
        "PRINTER_NAME": "Voron",
        "MCP_TRANSPORT": "http",
        "MOONRAKER_URL": "http://localhost:7125",
        "SPOOLMAN_ENABLED": "True",
        "CAMERA_STREAM_URL": "http://localhost/webcam/?action=stream",
        "CAMERA_SNAPSHOT_URL": "http://localhost/webcam/?action=snapshot"
      }
    }
  }
}

Available tools

get_printer_status

Fetch complete printer status including temperatures, position, and current state.

run_gcode

Execute any G-code command on the printer.

start_print

Begin a print job from a selected G-code file.

pause_print

Pause the current print job.

resume_print

Resume a paused print job.

cancel_print

Cancel the active print job.

home_axes

Home X, Y, Z axes or all axes.

emergency_stop

Immediately halt all printer activity.

restart_klipper

Restart the Klipper firmware.

quad_gantry_level

Run the QGL procedure for gantry leveling.

set_heater_temperature

Set target temperatures for hotend and bed.

get_active_tool

Query the currently active tool in the toolchanger.

select_tool

Attach a specific tool (T0-Tn) to the head.

drop_tool

Return the active tool to its dock.

initialize_toolchanger

Run the toolchanger initialization sequence.

get_tool_offsets

Retrieve tool offset values.

start_tool_alignment

Begin tool alignment workflow.

test_dock_undock

Test docking and undocking operations.

disable_crash_detection

Disable crash detection during testing.

get_tmc_status

Fetch TMC driver status, currents, and temperatures.

set_tmc_current

Adjust TMC run and hold currents.

dump_tmc_registers

Dump TMC registers for diagnostics.

get_tmc_field

Read a specific TMC register field.

set_tmc_field

Write a value to a TMC register field.

get_autotune_status

Show TMC Autotune configuration.

list_tmc_steppers

List all steppers with TMC drivers.

list_led_effects

List available LED effects.

set_led_effect

Activate a specific LED effect.

stop_led_effect

Stop a running LED effect.

stop_all_effects

Stop all LED effects.

set_led_color

Directly control LED color (RGB/RGBW).

list_led_scenes

List preset LED scenes.

activate_led_scene

Apply a preset LED scene.

list_gcode_files

Browse available G-code files.

get_file_metadata

Read metadata for a G-code file.

read_gcode_file

Read contents of a G-code file.

upload_gcode_file

Upload new G-code files to the printer.

delete_gcode_file

Remove a G-code file from storage.

search_in_file

Search within a G-code file.

read_config_file

Read a Klipper config file like printer.cfg.

list_config_files

List Klipper config files.

get_camera_snapshot

Capture a current camera frame.

get_camera_stream_url

Provide MJPEG stream URL for cameras.

get_timelapse_settings

Fetch current timelapse configuration.

set_timelapse_enabled

Enable or disable timelapse capture.

capture_timelapse_frame

Capture a manual timelapse frame.

render_timelapse

Trigger timelapse video render.

configure_timelapse

Adjust timelapse settings.

get_print_history

Retrieve past prints with optional filtering.

get_print_stats

Return cumulative print statistics.

get_filament_usage_by_material

Show filament usage by material.

get_recent_prints

Provide a summary of recent prints.

get_average_print_stats

Return average metrics across prints.

export_printer_data

Export all printer data to JSON.

parse_klippy_log

Analyze Klippy log for issues.

get_recent_errors

Show recent errors with context.

get_log_summary

Provide a summary of logs.

check_common_issues

Detect configuration problems.

get_mcu_status

Report MCU status and timing.

get_gcode_history

Show recently executed G-code commands.

get_troubleshooting_guide

Provide problem-specific guidance.

analyze_print_failure

Diagnose print failures.

check_config_issues

Validate configuration integrity.

get_system_performance

Provide CPU, memory, and disk statistics.

get_temperatures

Fetch temperatures for all heaters.

get_temperature_history

Retrieve historical temperature data.

analyze_temperature_data

Detect anomalies in temperature data.

set_temperature_alert

Set alerts for temperature thresholds.

run_bed_mesh_calibrate

Run bed mesh calibration.

get_bed_mesh_profiles

List saved bed mesh profiles.

load_bed_mesh

Load a bed mesh profile.

save_bed_mesh

Save the current bed mesh.

clear_bed_mesh

Remove the active bed mesh.

list_spools

List all tracked spools.

get_active_spool

Show the currently loaded spool.

set_active_spool

Set the active spool for the toolhead.

get_spool_details

Provide full details for a spool.

check_low_filament

Warn about low filament conditions.

get_filament_usage_by_material

Show material-based filament usage.

list_vendors

List filament vendors.

list_filaments

Query the filament database.

send_notification

Send multi-channel notifications.

send_discord_notification

Send a Discord webhook notification.

send_slack_notification

Send a Slack webhook notification.

send_pushover_notification

Send a Pushover notification.

announce_tts

Convert text to speech for announcements.

test_notifications

Test all notification channels.

get_notification_settings

Query current notification settings.

backup_config

Backup all configuration files.

list_backups

List available backups.

restore_config

Restore configuration from a backup.

check_maintenance_due

Check upcoming maintenance intervals.

log_maintenance

Record maintenance events.

get_maintenance_history

Show maintenance history.

get_audit_log

Access security audit log.

export_printer_data

Export all data to JSON.

analyze_gcode_file

Provide a full analysis of a G-code file.

validate_gcode

Check G-code for issues.

extract_gcode_comments

Extract comments from G-code.

get_gcode_moves

Provide movement statistics from G-code.

extract_layer

Get data for a specific layer.

compare_gcode_files

Diff two G-code files.