--- name: fastening-lab description: Find, parameterize and generate 3D-printable fastening mechanisms, CAD assemblies and fit coupons through Fastening Lab API or MCP. Use for selecting or reusing the library's 33 fasteners; do not use to send print jobs or claim physical strength verification. --- # Fastening Lab Service: https://fastening.home.mivx.ru. MCP endpoint: `/mcp` (Streamable HTTP, modern 2026-07-28 and legacy 2025 initialization). REST documentation: `/api.html`; machine-readable contract: `/openapi.json`. ## Workflow 1. Search with `list_fasteners` or `GET /api/models?q=...`. Inspect the chosen mechanism with `get_fastener` or `GET /api/models/{id}`. Use its returned parameter schema; dimensions are mm and angles degrees. 2. Pass only intended numeric changes to `generate_model` / `POST /api/generate/{id}`. A result may be immediately complete or return `jobId`, `statusUrl` and `status: queued/running`. Poll `get_job` / `GET statusUrl` until completed or failed. Respect `retryAfter` and HTTP 429. Do not equate acceptance with successful CAD generation. 3. For a fit test call `generate_probe` / `POST /api/probe/{id}` with the same parameters. Download the returned 3MF and `assets/probe.stl`. Read the `print` report: `passed` means server slicing succeeded; `project_ready` with `sliced: false` means the 3MF must still be sliced in Bambu Studio. Existing default coupons are already sliced and checked. 4. CAD results provide `assets/demo.step`, `assets/demo.FCStd` and `assets/parameters.json`. Per-part STEP/STL files are listed in the model's manifest. MCP responses omit mesh arrays to keep tool output compact. The bundled `scripts/client.py` is a Python-standard-library client that handles asynchronous jobs and optional downloads. Examples: ```sh python3 scripts/client.py list --query 'крышка' python3 scripts/client.py show cantilever python3 scripts/client.py generate cantilever --parameters '{"beam_length":32,"clearance":0.3}' --output ./cad-sample python3 scripts/client.py probe cantilever --parameters '{"beam_length":32,"clearance":0.3}' --output ./print-sample ``` Use `--base-url` for a different deployment. Download directories must not already contain the output files; the client protects existing files. ## Reuse and limits Python generators are visible on `/models/{id}/index.html#source`. Download `generator.py` and the shared `/models/common.py`. A generator normally expects `common.py` one directory above its folder. `make_parts(parameters)` returns Piece objects with `shape`, `at(t)` and optional `fabrication_shape`; the dovetail retains its `Parameters`, `make_receiver`, `make_slider` API. Only known generators and numeric parameters run on the server. Do not submit arbitrary Python. Keep generated parts in their fabrication state for printing, preserve print-in-place assemblies and distinguish supplied metal hardware from printed parts. CAD validity and sampled collision checks do not establish physical retention, forces, fatigue or print quality. Interference fits and heat-insert contact intentionally overlap in CAD. Y-Zipper is an experimental reconstruction. Some metal hardware is represented by envelopes. Verify a fit coupon before incorporating a connection into a loaded structure. No tool in this service starts a physical print, changes the user's machine configuration or sends messages.