MCPcopy Index your code
hub / github.com/Miquelsn/bambulab-spoolman

github.com/Miquelsn/bambulab-spoolman @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
80 symbols 294 edges 15 files 14 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Bambulab–Spoolman

Overview

Bambulab–Spoolman is a Python backend application with a Flutter frontend that integrates:

  • Bambu Lab Cloud
  • The Bambu printer local MQTT server
  • Spoolman

It monitors 3D printing tasks, retrieves filament usage data, and generates detailed usage reports linked to your spool inventory.

⚠ This project is currently in alpha stage.
It is functional but still under active development, with ongoing improvements in usability and stability.

Features

  • Retrieves print task details from Bambu Cloud
  • Obtains model weight per filament and filament names from the slicer (Bambu Studio or Orca Slicer)
  • Monitors printer status in real time via MQTT
  • Integrates with Spoolman to fetch spool data and generate usage reports
  • Saves a history of prints
  • Supports multicolor printing with AMS Lite
  • Tracks print progress to estimate filament usage
  • If a print is incomplete, filament usage is scaled according to completion percentage
  • Note: Multicolor accuracy on incomplete prints may vary due to layer imbalance and uneven color distribution

Limitations

  • Tested only with a Bambu A1 + AMS Lite (other printers may work but are not guaranteed)
  • Designed for a single printer setup
  • Requires Bambu Cloud access to retrieve model weight and filament usage
  • Filaments must be properly mapped in the slicer
  • Only works for prints sent from the slicer to the printer
  • Prints started from SD card or local-only connections will not provide weight data (this data is not transmitted via local MQTT)

Installation & Usage

Requirements

  • Python 3.x
  • Required Python libraries:
  • paho-mqtt
  • requests
  • json
  • difflib
  • re
  • configparser

Running the Application

The setup process has been simplified.

Simply run:

python main.py

The application will:

Start the backend

Launch the GUI

Open the web interface at: http://{ip}:2323

First-Time Setup

On first launch: Captura de pantalla 2026-02-15 a las 0 39 06

Open the Settings tab in the GUI.

Enter:

  • Spoolman IP address
  • Spoolman port
  • Printer local IP address
  • Bambu Cloud login (email + password)

Captura de pantalla 2026-02-15 a las 0 39 51

Save the settings.

Note: If required, a verification code may be sent to your email for Bambu Cloud authentication. Captura de pantalla 2026-02-15 a las 0 35 58 Captura de pantalla 2026-02-15 a las 0 36 05

Filament Mapping

After completing the settings:

Go to the Filament Map view.

Map slicer filaments (Bambu Studio / Orca Slicer) to Spoolman spools.

Captura de pantalla 2026-02-15 a las 0 37 52 Captura de pantalla 2026-02-15 a las 0 38 03

An automated matching algorithm suggests matches based on:

  • Material
  • Vendor
  • Name

Manual adjustments can be made directly in the GUI.

GUI Overview

The web interface created with Flutter (Port 2323) provides:

  • List of recent print tasks
  • Real-time terminal output
  • Settings management
  • Filament mapping interface
  • Print history tracking

Running Continuously

main.py must remain running continuously.

For Linux or Raspberry Pi setups, it is recommended to configure it as a system service for automatic startup.

Future Work

  • Advanced GUI metrics and print analytics
  • Graph generation and visualization tools
  • Multi-printer support (filtered by ID)
  • Possible slicer integration to avoid dependency on Bambu Cloud
  • Improved error handling and stability enhancements

License

GNU General Public License v3.0 29 June 2007

Contributions

Contributions are welcome. Feel free to submit issues and pull requests.

Core symbols most depended-on inside this repo

Shape

Function 39
Method 33
Class 8

Languages

Python100%

Modules by API surface

BambuPrinter/bambu_printer.py11 symbols
helper_logs.py9 symbols
Spoolman/spoolman_filament.py9 symbols
Gui/WebServer/websockets_service.py9 symbols
Local_MQTT/local_mqtt.py6 symbols
Filament/filament.py6 symbols
BambuCloud/slicer_filament.py6 symbols
Gui/WebServer/flutter_web_server.py5 symbols
BambuPrinter/print_task.py5 symbols
tools.py4 symbols
Gui/WebServer/auto_discover.py3 symbols
BambuCloud/login.py3 symbols

For agents

$ claude mcp add bambulab-spoolman \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page