repetier-mcp
Enables AI to monitor, control, and diagnose 3D printers via Repetier-Host/Repetier-Server, supporting temperature readings, job management, and intelligent error diagnosis.
README
repetier-mcp
MCP server for Repetier-Host / Repetier-Server -- monitor, control and diagnose your 3D printer with AI.
Connect Claude (or any MCP-compatible AI) directly to your 3D printer. Get live temperature readings, job progress, intelligent error diagnosis, and printer-specific repair guidance -- including a built-in knowledge base for the Artillery Sidewinder X1.
English README | Espanol
What you can do
| Tell Claude... | What happens |
|---|---|
| "What's the printer temperature?" | Returns hotend + bed temps in real time |
| "My printer has layer shifting problems" | Diagnoses causes, gives step-by-step repair guide |
| "Send M503 to read current settings" | Sends G-code, returns EEPROM values |
| "Check if temps are stable" | Takes 5 readings over 10s, detects instability |
| "Upload and print benchy.gcode" | Uploads file to server and starts printing |
| "Pause the print" | Pauses current job via Repetier-Server |
| "Set bed temperature to 60" | Sets heated bed to 60C |
| "What port is my printer on?" | Scans serial ports and auto-detects printer |
Quick start
Install from GitHub
pip install git+https://github.com/Nstalej/repetier-mcp.git
Or with uv (recommended -- faster, no dependency conflicts):
pip install uv
uv pip install git+https://github.com/Nstalej/repetier-mcp.git
For serial mode (direct USB), also install pyserial:
pip install "repetier-mcp[serial] @ git+https://github.com/Nstalej/repetier-mcp.git"
For development:
git clone https://github.com/Nstalej/repetier-mcp.git
cd repetier-mcp
pip install -e ".[dev]"
pytest
Connection Modes
repetier-mcp supports two connection modes:
Mode 1: Repetier-Server (recommended)
Connects via HTTP REST API to Repetier-Server running on your network. Supports all features including file upload, pause/resume, and job management.
Mode 2: Direct Serial (USB)
Connects directly to the printer via USB/serial port (pyserial).
Classic mode for Repetier-Host users. Requires the serial extra.
Configuration
Repetier-Server mode
| Variable | Default | Description |
|---|---|---|
REPETIER_MODE |
serial |
Set to server |
REPETIER_SERVER_URL |
http://localhost:3344 |
Full URL of Repetier-Server |
REPETIER_SERVER_APIKEY |
(empty) | API key from Repetier-Server |
REPETIER_PRINTER_SLUG |
(empty) | Printer slug/name in server |
PRINTER_MODEL |
sidewinder_x1 |
Printer model for diagnostics |
Direct USB / serial mode
| Variable | Default | Description |
|---|---|---|
REPETIER_MODE |
serial |
Connection mode: serial or server |
REPETIER_PORT |
(auto) | Serial port, e.g. /dev/ttyUSB0 or COM3 |
REPETIER_BAUD |
115200 |
Baud rate -- use 250000 for Sidewinder X1 |
PRINTER_MODEL |
sidewinder_x1 |
Printer model for targeted diagnostics |
Auto-detection: If
REPETIER_SERVER_URLis set andREPETIER_MODEis not, the server mode is auto-selected.
Claude Desktop Setup
Windows
Step 1 -- Find your printer's COM port (serial mode only)
- Connect the printer via USB
- Open Device Manager (
Win + X> Device Manager) - Expand Ports (COM & LPT)
- Look for
USB-SERIAL CH340 (COM3)or similar - Note your port number
Sidewinder X1: uses the CH340 chip. If nothing appears, install the driver from wch-ic.com/downloads/CH341SER_EXE.html
Step 2 -- Configure Claude Desktop
Open (or create) the config file at:
C:\Users\YOUR_USERNAME\AppData\Roaming\Claude\claude_desktop_config.json
Server mode (recommended):
{
"mcpServers": {
"repetier": {
"command": "python",
"args": ["-m", "repetier_mcp.server"],
"env": {
"REPETIER_MODE": "server",
"REPETIER_SERVER_URL": "http://localhost:3344",
"REPETIER_SERVER_APIKEY": "YOUR_API_KEY_HERE",
"REPETIER_PRINTER_SLUG": "SidewinderX1",
"PRINTER_MODEL": "sidewinder_x1"
}
}
}
}
Serial mode:
{
"mcpServers": {
"repetier": {
"command": "python",
"args": ["-m", "repetier_mcp.server"],
"env": {
"REPETIER_MODE": "serial",
"REPETIER_PORT": "COM3",
"REPETIER_BAUD": "250000",
"PRINTER_MODEL": "sidewinder_x1"
}
}
}
}
Restart Claude Desktop.
Linux
pip install "git+https://github.com/Nstalej/repetier-mcp.git"
# For serial mode:
# pip install "repetier-mcp[serial] @ git+https://github.com/Nstalej/repetier-mcp.git"
# sudo usermod -a -G dialout $USER # then log out and back in
Edit ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"repetier": {
"command": "python3",
"args": ["-m", "repetier_mcp.server"],
"env": {
"REPETIER_MODE": "server",
"REPETIER_SERVER_URL": "http://localhost:3344",
"REPETIER_SERVER_APIKEY": "YOUR_API_KEY_HERE",
"REPETIER_PRINTER_SLUG": "SidewinderX1",
"PRINTER_MODEL": "sidewinder_x1"
}
}
}
}
macOS
pip install "git+https://github.com/Nstalej/repetier-mcp.git"
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"repetier": {
"command": "python3",
"args": ["-m", "repetier_mcp.server"],
"env": {
"REPETIER_MODE": "server",
"REPETIER_SERVER_URL": "http://localhost:3344",
"REPETIER_SERVER_APIKEY": "YOUR_API_KEY_HERE",
"REPETIER_PRINTER_SLUG": "SidewinderX1",
"PRINTER_MODEL": "sidewinder_x1"
}
}
}
}
Troubleshooting (Windows)
| Problem | Solution |
|---|---|
| Printer not in Device Manager | Try a different USB cable -- many cables are charge-only |
| CH340 driver missing | Install from wch-ic.com |
| Port busy / access denied | Close Repetier-Host first -- it and this MCP can't share the port |
| Random disconnects during print | Disable USB power management in Device Manager > USB Hubs |
| Cannot connect to server | Verify Repetier-Server is running and the URL/port are correct |
| API key error | Check REPETIER_SERVER_APIKEY matches the key in Repetier-Server settings |
| Printer slug not found | Check REPETIER_PRINTER_SLUG matches the printer name in Repetier-Server |
Available tools
| Tool | Mode | Description |
|---|---|---|
printer_status |
Both | Get temperatures, job progress and position |
send_gcode |
Both | Send any G-code / M-code command |
temperature_check |
Both | Multi-sample temperature stability analysis |
set_temperature |
Both | Set hotend or bed temperature |
list_jobs |
Server | List print queue |
upload_and_print |
Server | Upload .gcode file and start printing |
pause_print |
Server | Pause the current print job |
resume_print |
Server | Resume a paused print job |
cancel_print |
Server | Cancel/stop the current print |
diagnose_error |
Both | AI-powered error diagnosis with repair steps |
knowledge_base_summary |
Both | Show all known error types and their symptoms |
list_serial_ports |
Both | Scan serial ports or show server connection info |
emergency_stop |
Both | Send M112 emergency stop |
Repetier-Server REST API Reference
The server mode uses the Repetier-Server REST API:
GET /printer/api/{slug}?a=stateList&apikey={key} # Full printer state
GET /printer/api/{slug}?a=send&data={"cmd":"G28"}&apikey={key} # Send G-code
GET /printer/api/{slug}?a=listJobs&apikey={key} # List jobs
GET /printer/api/{slug}?a=pause&apikey={key} # Pause print
GET /printer/api/{slug}?a=continueJob&apikey={key} # Resume print
GET /printer/api/{slug}?a=stopJob&apikey={key} # Cancel print
GET /printer/api/{slug}?a=setExtruderTemperature&data={...} # Set hotend temp
GET /printer/api/{slug}?a=setBedTemperature&data={...} # Set bed temp
POST /printer/job/{slug}?a=upload&name=file.gcode&apikey={key} # Upload gcode
Diagnostic knowledge base
Built-in error database for the Artillery Sidewinder X1 -- 11 error types:
| Error type | Key symptoms |
|---|---|
thermal_runaway |
THERMAL RUNAWAY, Heating failed, temp sensor |
layer_shifting |
Layer shift, skipped steps, position lost |
z_offset_drift |
First layer issues, bed leveling problems |
extruder_clicking |
Clicking, grinding, under extrusion |
communication_error |
Printer offline, no response, timeout |
bed_adhesion |
Warping, not sticking, lifting corners |
bltouch_probe_error |
BLTouch alarm, probe deploy/stow failed |
tmc_driver_noise |
Motor noise, TMC2208 whining, stepper vibration |
hotend_ptfe_degradation |
Burning smell, PTFE fumes, heat creep, repeat clogs |
tft_display_error |
Screen frozen, white screen, TFT not responding |
psu_failure |
Random shutdown, printer dies, 24V rail drop |
Plus 4 generic errors (mintemp, maxtemp, filament_runout, sd_card_error).
Each diagnosis includes probable causes, numbered repair steps, and exact G-code commands to run during troubleshooting.
Roadmap
- [ ] OctoPrint compatibility layer
- [ ] Klipper / Moonraker support
- [ ] Webcam snapshot integration
- [ ] Print time prediction analysis
- [ ] Filament usage tracking
- [ ] Sidewinder X1 EEPROM tuning wizard
Contributing
Issues and PRs are welcome. Especially:
- Additional printer models for the diagnostic KB
- Klipper / Moonraker adapter
git clone https://github.com/Nstalej/repetier-mcp
cd repetier-mcp
pip install -e ".[dev]"
pytest
License
MIT -- See LICENSE
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。