AI-Powered Klipper Documentation at Your Fingertips
A Model Context Protocol (MCP) server that transforms how you interact with Klipper 3D printer firmware documentation.
π Quick Start β’ π Documentation β’ π§ Configuration β’ π€ Contributing
Experience seamless Klipper documentation access directly within Claude Desktop. Search configurations, browse documentation, and get instant answers to your 3D printing questions.
Klipper's documentation is comprehensive but scattered across dozens of markdown files. Finding the right configuration option or troubleshooting guide means multiple clicks and searches. This changes everything.
- π Fragmented Documentation: 50+ separate markdown files
- π Configuration Complexity: Hard to find specific option details
- β±οΈ Context Switching: Jump between docs and your config files
- π€ AI Limitations: Claude can't access local Klipper docs
- π Unified Search: Search all documentation instantly
- βοΈ Smart Config Lookup: Get exact configuration sections
- π Intelligent Browsing: Navigate by logical categories
- π€ AI Integration: Claude becomes your Klipper expert
- Node.js >= 20.0.0
- npm or yarn
- Claude Desktop (for MCP integration)
# Install globally
npm install -g mcp-klipper-docs
# Or install locally in your project
npm install mcp-klipper-docs-
Open your Claude Desktop config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
-
Add the MCP server:
{
"mcpServers": {
"klipper-docs": {
"command": "node",
"args": ["C:\\Users\\bpuhnk\\AppData\\Roaming\\npm\\node_modules\\mcp-klipper-docs\\dist\\server.js"]
}
}
}{
"mcpServers": {
"klipper-docs": {
"command": "npx",
"args": ["-y", "mcp-klipper-docs@1.0.1"]
}
}
}{
"mcpServers": {
"klipper-docs": {
"command": "node",
"args": ["C:\\Users\\bpuhnk\\source\\repos\\MCP_Klipper\\dist\\server.js"]
}
}
}- Restart Claude Desktop
That's it! π Claude now has instant access to all Klipper documentation.
- npm Package: mcp-klipper-docs
- Version: 1.0.1
- Repository: GitHub
- License: MIT
- Author: Ben Phillips
After installation, verify everything works:
# Check package installation
npm list -g mcp-klipper-docs
# Test server startup
node C:\Users\bpuhnk\AppData\Roaming\npm\node_modules\mcp-klipper-docs\dist\server.js
# Or using npx
npx -y mcp-klipper-docs@1.0.1"Search for BLTouch configuration"
"Find information about pressure advance"
"Look up extruder tuning guides"
"Get configuration for [extruder]"
"Show me stepper_x settings"
"What are the bed_mesh parameters?"
"Browse calibration documentation"
"Show me hardware configuration sections"
"What's in the troubleshooting section?"
"How many documents are available?"
"What sections exist in the documentation?"
"Show me index statistics"
graph TD
A[Claude Desktop] --> B[MCP Protocol]
B --> C[MCP Server]
C --> D[Search Engine]
C --> E[Document Parser]
C --> F[Git Sync]
D --> G[Lunr.js Index]
E --> H[Markdown Files]
F --> I[Klipper Repository]
| Component | Technology | Purpose |
|---|---|---|
| Runtime | Node.js 20+ | JavaScript execution |
| Language | TypeScript 5.3+ | Type safety & development |
| Protocol | MCP SDK 1.0+ | Claude Desktop integration |
| Search | Lunr.js 2.3+ | Full-text search indexing |
| Git | simple-git 3.22+ | Repository synchronization |
| Parsing | marked 11.1+ | Markdown processing |
| Metadata | gray-matter 4.0+ | Frontmatter extraction |
- Repository Sync: Automatically pulls latest Klipper documentation
- Document Parsing: Extracts content, metadata, and structure
- Index Building: Creates searchable lunr.js index
- MCP Integration: Exposes tools and resources via MCP protocol
- AI Interaction: Claude searches and retrieves documentation
Search across all Klipper documentation with relevance scoring.
Parameters:
query(string): Search termslimit(number, optional): Max results (default: 10)section(string, optional): Filter by section
Example:
{
"query": "BLTouch configuration",
"limit": 5,
"section": "hardware"
}Retrieve specific configuration sections from Config_Reference.
Parameters:
option(string): Configuration option nameinclude_examples(boolean, optional): Include code examples
Example:
{
"option": "extruder",
"include_examples": true
}Browse documentation by section or get overview information.
Parameters:
section(string, optional): Section to browseinclude_stats(boolean, optional): Include statistics
Example:
{
"section": "calibration",
"include_stats": true
}Get documentation index statistics and metadata.
No parameters required.
All documentation files are available as MCP resources:
- URI Scheme:
klipper://docs/{document-id} - Format: Markdown with metadata
- Access: Direct file reading or browsing
Example Resources:
klipper://docs/Config_Referenceklipper://docs/BLTouchklipper://docs/Installationklipper://docs/Troubleshooting
| Variable | Default | Description |
|---|---|---|
GIT_REPOSITORY |
https://github.com/Klipper3d/klipper.git |
Klipper repository URL |
GIT_BRANCH |
master |
Repository branch |
DATA_DIR |
./data |
Local data directory |
LOG_LEVEL |
info |
Logging level (debug, info, warn, error) |
UPDATE_INTERVAL |
3600 |
Auto-update interval in seconds |
# Build the image
docker build -t mcp-klipper-docs .
# Run the container
docker run -d \
--name mcp-klipper-docs \
-v $(pwd)/data:/app/data \
mcp-klipper-docsversion: '3.8'
services:
mcp-klipper-docs:
build: .
container_name: mcp-klipper-docs
volumes:
- ./data:/app/data
environment:
- LOG_LEVEL=info
- UPDATE_INTERVAL=3600
restart: unless-stopped- Documents: 56 Klipper documentation files
- Words: 135,000+ indexed words
- Sections: 11 categorized sections
- Build Time: ~400ms for full index
- Search Speed: <10ms for typical queries
- Base Memory: ~50MB
- Index Memory: ~25MB
- Peak Memory: ~100MB during updates
- Initial Clone: ~50MB (one-time)
- Updates: ~1-5MB (changes only)
- API Calls: Local only (no external dependencies)
# Clone the repository
git clone https://github.com/yourusername/mcp-klipper-docs.git
cd mcp-klipper-docs
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Build for production
npm run buildmcp-klipper-docs/
βββ src/
β βββ server.ts # Main MCP server
β βββ config.ts # Configuration management
β βββ logger.ts # Logging utilities
β βββ git-sync.ts # Git repository operations
β βββ parser.ts # Markdown document parsing
β βββ search.ts # Search engine implementation
β βββ types.ts # TypeScript type definitions
β βββ errors.ts # Error handling
βββ tests/ # Test suite
βββ docs/ # Additional documentation
βββ img/ # Images and assets
βββ data/ # Local Klipper repository
βββ dist/ # Built JavaScript files
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run with coverage
npm run test -- --coverage
# Lint code
npm run lint
# Fix linting issues
npm run lint:fixWe welcome contributions from the Klipper community! Here's how you can help:
- Check existing issues first
- Use the issue templates provided
- Include:
- Steps to reproduce
- Expected vs actual behavior
- Environment details
- Relevant logs
- Open a discussion first for major features
- Provide clear use cases
- Consider implementation complexity
- Think about edge cases
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes:
- Follow existing code style
- Add tests for new functionality
- Update documentation
- Run the test suite:
npm test - Submit a pull request
- Fix typos and improve clarity
- Add examples and use cases
- Update README and guides
- Translate documentation (if you speak other languages)
- Enhanced Search: Fuzzy matching and spell correction
- Cross-references: Link related configuration options
- Version Support: Support multiple Klipper versions
- Performance: Optimized indexing and caching
- Multi-language: Internationalization support
- Community Docs: User-contributed documentation
- AI Features: Smart recommendations and assistance
- Integration: Other AI assistant platforms
- Model Context Protocol - For enabling AI assistant integration
- Klipper - For the excellent 3D printer firmware
- Lunr.js - For powerful search capabilities
- TypeScript - For type-safe development
- Klipper Community - For maintaining comprehensive documentation
- MCP Community - For protocol development and support
- Open Source Contributors - For the tools and libraries we use
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation: Check this README and the
/docsfolder - π Issues: Report bugs on GitHub
- π¬ Discussions: Join GitHub Discussions
- π¦ npm Issues: Report package issues
- Discord: Join the Klipper and MCP communities
- Reddit: r/klipper and r/3Dprinting
- Twitter/X: Follow @bpuhnk @klipper3d and MCP updates
- Registry Entry: Available for MCP server discovery
- Installation:
npm install -g mcp-klipper-docs - Version: 1.0.1 (Latest)
β If this project helps you, consider giving it a star!
Made with β€οΈ by the 3D printing community, for the 3D printing community.