Skip to main content
Glama
klipper-doctor-mcp

klipper-doctor-mcp

by kd-011

klipper-doctor-mcp

Ask your AI agent why a Klipper print stopped. This server gives it klipper-doctor's rules for klippy.log and printer.cfg, so the answer names the cause and cites the Klipper docs or source it comes from. It is read-only: it never moves, heats or writes anything on the printer.

The picture is a real Claude Code session against this server, recorded by scripts/record-session.mjs and drawn by scripts/render-assets.mjs. The log is test/fixtures/heater-verify.log, a synthetic one built from Klipper's message formats.

Try it

You need Node 18 or newer and an MCP client. This is for Claude Code; other clients are a config snippet.

claude mcp add klipper-doctor -- npx -y github:kd-011/klipper-doctor-mcp
curl -sO https://raw.githubusercontent.com/kd-011/klipper-doctor-mcp/main/test/fixtures/heater-verify.log
claude "My print stopped. The log is heater-verify.log in this folder. Why, and what should I try?"

The package is not on npm yet, which is why the command points at GitHub. npm builds it on the first start, which took about 20 seconds from a cold cache on my machine. If your client gives up before that, run npx -y github:kd-011/klipper-doctor-mcp --version once in a terminal and add it again.

For your own printer, add MOONRAKER_URL and the agent can fetch klippy.log and printer.cfg itself:

claude mcp add klipper-doctor -e MOONRAKER_URL=http://printer.local:7125 -- npx -y github:kd-011/klipper-doctor-mcp

Or run Claude Code on the printer's host and let it read ~/printer_data/logs/klippy.log.

Related MCP server: prusactl

What it gives the agent

Five tools: diagnose_log (why a print or session died, plus a lint of the config Klipper wrote into the log), lint_config, list_rules, explain_rule and printer_status. The log can be pasted text, a file path, or fetched from Moonraker. The reference has the inputs and settings, and an example report shows the text the agent gets back.

The code enforces read-only. The Moonraker client can only send GET to a short list of read endpoints, every tool is marked read-only, and a test fails if any request leaves that list. Logs can contain hostnames, usernames, IP addresses and serial numbers, and whatever the agent reads goes to your AI provider, so check what you share. KLIPPER_DOCTOR_ALLOWED_DIRS limits which files it can open.

Other tools

Searched in November 2026. Most Klipper MCP servers on GitHub are about control. Charleslotto/klipper-mcp exposes over a hundred tools including G-code, print control and TMC drivers. nixkor/moonraker-mcp controls prints with a confirmation step on risky calls. mikehatch/KlipperMCP reads and edits config files. OctoEverywhere runs a hosted MCP server for several printer types. In that search I did not find one that applies rules to klippy.log. I have run none of them, so this is from their READMEs.

They run next to this one. If you want your agent to drive the printer, use one of those. If you want it to work out why Klipper stopped, with sources, use this.

When not to use it

  • You have no Klipper. It knows nothing about Marlin or Bambu printers.

  • The failure left no trace in klippy.log. A wobbly bed or a clogged nozzle will not show up.

  • You just want a report. The klipper-doctor CLI does the same analysis with npx klipper-doctor klippy.log, and hotend.app/klipper-doctor does it in a browser with nothing installed.

  • You cannot send a log to an AI provider. The analysis itself runs locally, but the agent then reads the result and the log.

More limits are in the reference.

Develop

git clone https://github.com/kd-011/klipper-doctor-mcp
cd klipper-doctor-mcp
npm ci && npm test

See CONTRIBUTING.md. A wrong diagnosis is a klipper-doctor issue, since the rules live there. MIT licence, release notes in CHANGELOG.md.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to monitor and control Prusa 3D printers over PrusaLink or Prusa Connect, including status and camera checks, file upload and print control, G-code execution, queue and history access, and responding to printer dialogs.
      1
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Exposes Klipper and Moonraker capabilities to LLM clients through a typed MCP API of tools, resources, and prompts, enabling offline printer.cfg/include validation, AST-based extras development, assisted log and telemetry diagnostics, and controlled G-code execution with safeguards for dangerous commands. It also provides caching, coalescing, circuit breaking, and token-economy optimizations for resilient, observable operation of the printer stack.
      17
      GPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an agent to inspect, slice, upload, start, and monitor jobs on a Moonraker/Klipper 3D printer end to end, using one JSON profile for machine-specific configuration. Built-in safety checks block unsafe starts such as incomplete G-code, nozzle mismatches, hot beds, or running jobs.
      MIT