npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@grego33/klipper-config-mcp

v1.1.2

Published

Model Context Protocol server for Klipper 3D printer configuration management

Readme

Klipper Config MCP

npm version

A Model Context Protocol (MCP) server for reading Klipper 3D printer configurations, logs, and documentation through Moonraker API.

📦 Install with: npx @grego33/klipper-config-mcp

Features

  • Configuration File Access: Read and parse Klipper configuration files
  • Log File Access: Retrieve Klipper log files for troubleshooting
  • Documentation Access: Browse Klipper documentation files
  • Real-time Analysis: Parse config syntax and validate parameters
  • System Integration: Get printer status and system information
  • Universal Compatibility: Works with any chat agent that supports the Model Context Protocol

Available Tools

🔧 Configuration Tools

  • get_config_file: Retrieve contents of any Klipper configuration file
  • list_config_files: List all available configuration files with metadata
  • parse_config: Parse configuration files and extract structured data
  • get_config_section: Get specific sections from configuration files

📄 Log & Documentation Tools

  • get_log_file: Retrieve contents of Klipper log files
  • list_log_files: List all available log files with metadata
  • get_doc_file: Retrieve Klipper documentation files
  • list_doc_files: List all available documentation files

📊 System Tools

  • get_printer_status: Get current printer state and status
  • get_system_info: Retrieve system information from the printer host

Prerequisites

  • A running Klipper printer with Moonraker API access
  • Network connectivity to your printer
  • A chat agent that supports Model Context Protocol (MCP)

Agent Configuration

Claude Desktop

Add this to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

Using npx (Recommended)

{
  "mcpServers": {
    "klipper-config": {
      "command": "npx",
      "args": ["@grego33/klipper-config-mcp"],
      "env": {
        "MOONRAKER_HOST": "192.168.1.100",
        "MOONRAKER_PORT": "7125",
        "MOONRAKER_API_KEY": "your_api_key_if_needed"
      }
    }
  }
}

Other MCP-Compatible Agents

This server implements the standard MCP protocol and can be integrated with any chat agent that supports MCP. Refer to your agent's documentation for specific configuration instructions.

Environment Variables

Configure your printer connection using environment variables:

| Variable | Description | Default | Required | |----------|-------------|---------|----------| | MOONRAKER_HOST | Printer hostname or IP | localhost | No | | MOONRAKER_PORT | Moonraker API port | 7125 | No | | MOONRAKER_API_KEY | API key for authentication | None | No |

You can set these in a .env file:

cp .env.example .env
# Edit .env with your printer's details

Usage Examples

Once configured with your chat agent, you can ask it to help with your printer:

Configuration Analysis

"Show me my extruder configuration"

"List all my configuration files"

"Parse my printer.cfg and check for errors"

Log Analysis & Troubleshooting

"Show me the latest Klipper log file"

"List all available log files"

"What's my printer's current status?"

"Check recent error messages in the logs"

Documentation Access

"Show me Klipper documentation files"

"List available documentation"

System Information

"What system is my printer running on?"

"Show me network interface information"

Configuration File Structure

The MCP server can parse and analyze standard Klipper configuration files including:

  • printer.cfg - Main printer configuration
  • macros.cfg - G-code macros
  • moonraker.conf - Moonraker configuration
  • Any included configuration files

Supported Sections

  • Motion System: [stepper_x], [stepper_y], [stepper_z]
  • Extruder: [extruder], [extruder1], etc.
  • Heated Components: [heater_bed], [heater_generic]
  • Sensors: [temperature_sensor], [filament_switch_sensor]
  • Bed Leveling: [bed_mesh], [z_tilt], [quad_gantry_level]
  • And many more Klipper sections

Troubleshooting

Common Issues

  1. Cannot connect to Moonraker

    • Check that your printer is powered on and connected to network
    • Verify the IP address and port
    • Test with: curl http://your-printer-ip:7125/server/info
  2. Configuration files not found

    • Ensure Moonraker has access to the config directory
    • Check file permissions on the printer
  3. Agent not loading the MCP

    • Verify the configuration syntax
    • Check the environment variables
    • Restart your chat agent after configuration changes

Contributing

See DEVELOPER.md for development setup, testing, and contribution guidelines.

License

MIT License - see LICENSE file for details.

Support

If this project helps you, consider supporting its development:

Buy Me A Coffee