A small, open-source, self-hostable system for sending files to Prusa 3D printers and managing a print queue — generalized from a proven PrusaLink integration so any small makerspace can run it against its own printer fleet, not tied to any specific organization's queue or storage backend.
Three independently-installable Python packages in one repo:
linkyard/
├── core/ → linkyard PrusaLink client, printer registry,
│ job/queue model + SQLite persistence,
│ eligibility policy, optional slicing
│ extra. No web framework.
├── service/ → linkyard-service FastAPI reference app an operator runs:
│ REST API, background poller, embeddable
│ widget, admin queue page.
└── mcp/ → linkyard-mcp Optional MCP adapter exposing the service's
REST API as MCP tools. HTTP-only, zero
coupling to core internals.
Data flow: a job is submitted (POST /jobs) → eligibility gate → (orient +
slice if the [slicing] extra is installed and the file isn't already
gcode) → ready_to_send → the poller uploads it to a capable printer over
PrusaLink → sent (a human presses print) → printing/done only if that
printer's auto_print is on.
To run Linkyard against your printers, start with the service:
→ service/README.md — install, configure
printers.yaml, uvicorn ..., submit a job.
If you want agent/LLM access to the queue, add the optional MCP adapter:
→ mcp/README.md — stdio MCP server wrapping the service's REST API.
If you want to embed the library in your own backend (no FastAPI):
pip install ./corefrom linkyard import PrusaLinkClient
printer = PrusaLinkClient("http://192.168.1.42", api_key="...")
printer.check_version() # reachability + auth
remote = printer.upload_gcode("benchy-001", "benchy.gcode") # upload-only
# printer.start_print(remote) # only if this printer's auto_print is on- Upload-only by default. Landing a file in PrusaLink storage does not start a print — a human still presses print at the machine.
auto_printis per-printer, off by default. Even when on, thestart_printcall it triggers is new code in this project (the deployment it was generalized from was upload-only); it's tested only against a fake PrusaLink server. Verify against your own printer before relying on it.- Secret hygiene. The PrusaLink API key is held in memory and sent only
in the
X-Api-Keyheader. It never appears in logs, exceptions, or error messages (covered bytest_key_never_appears_in_errors_or_logs);Printer.__repr__/.redacted()omit it too. - No LAN traversal solved here. PrusaLink is LAN-only and so is the reference service. Reaching it from the public internet is the operator's job (reverse proxy / VPN / tunnel).
Each package is independently installable and verified:
pip install -e "./core[dev]" -e "./service[dev]" -e "./mcp[dev]"cd core && pytest -q && mypy --strict src/linkyard && ruff check .
cd service && pytest -q && mypy --strict src/linkyard_service && ruff check .
cd mcp && pytest -q && mypy --strict src/linkyard_mcp && ruff check .Integration tests run against a fake PrusaLink HTTP server (service) and
respx (mcp) — no real printer hardware needed for CI.
start_print/auto_printunverified on real hardware — new code, fake-server-tested only. See safety posture above.- Build-volume auto-assignment is inactive.
Queuechecks build-volume fit only when a job carriesmodel_dims; nothing in the pipeline populates that yet (no mesh-bbox step), so assignment currently keys off material fit alone. - Source: https://github.com/Venither/linkyard (public).
MIT — see LICENSE.