fdm-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fdm-mcp How much filament, time and cost for an 80×50×30 mm PLA box at 20% infill?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fdm-mcp
An MCP server with six calculators for people who run desktop FDM 3D printers. It answers questions like "how much will this print cost?", "will this bracket hold?" and "is it safe to start this 14-hour job before bed?".
The server only computes. It never talks to a printer, never edits G-code and never calls an LLM, so the same input always gives the same answer.
Built for 24-679 Designing & Prototyping AI Systems (CMU), Homework 5.
The tools
Tool | Question it answers |
| How much filament, time, energy and money will this print take? |
| Will a printed bracket, hook or clip hold its load? |
| Can a printed cup or container hold a liquid? |
| How much do failed prints waste per good part, with and without camera monitoring? |
| If I start this job before bed, how long could a failure go unseen, what would it waste, and is there a better start time? |
| This part came out (or was repaired) off-design. Should I keep it, test it first, or reprint it? |
The first four come from my Homework 4 agent. The two new ones came out of user interviews: people leave long prints running overnight and find failures hours later, and only the designer knows which features of a part can be off.
Related MCP server: fabtally-mcp
Quick start
Requires Python 3.10+.
git clone https://github.com/akshara-ns/fdm-mcp-server && cd fdm-mcp-server
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest -q # 20 tests, all run through an MCP clientTry it in MCP Inspector (needs Node 22+):
npx @modelcontextprotocol/inspector .venv/bin/fdm-mcpOpen the URL it prints (it includes a session token), switch the server's toggle on, then go to Tools.
Use it from an MCP client such as Claude Desktop or Claude Code, by adding this to the client's MCP config:
{ "mcpServers": { "fdm-print-tools": { "command": "/ABSOLUTE/PATH/fdm-mcp-server/.venv/bin/fdm-mcp" } } }Over HTTP instead of stdio: fdm-mcp --http serves http://127.0.0.1:8000/mcp.
Recorded demo: python demo/client_demo.py starts the server, makes five calls (one HW4 tool, both new tools and
two invalid inputs) and saves them to demo/transcript.json and demo/transcript.md. Inspector screenshots are in
demo/screenshots/.
Example
Calling plan_unattended_print for a 14-hour, 300 g job started at 22:30, with nobody around from 23:30 to 08:00,
and asking for the best start time between 08:00 and 23:00:
{ "print_time_h": 14, "filament_g": 300, "start_time": "22:30", "away_from": "23:30", "back_at": "08:00",
"earliest_start": "08:00", "latest_start": "23:00" }returns (shortened):
verdict CAUTION
decision start at 08:00
summary A 14 h job started at 22:30 finishes at 12:30 (+1 d); 61% of it runs unattended. If it fails
(15% chance), on average 1.6 h pass before anyone knows; expected waste for this attempt is
16.9 g and 0.79 printer-hours ($0.78). Best start in your window: 08:00 (expected waste $0.61).
results worst_case_hours_unseen 8.5 h, recommended_mean_hours_until_known 0.5 h, ...
checks First layers watched: OK · Unseen failure time: OK · No automatic stop: CAUTION
defaults failure_probability = 0.15, early_failure_share = 0.5, check_interval_min = 60, ...
human_checks Watch the first layer yourself before leaving, whatever the tool says. ...What every tool returns
All six tools return the same structured record (ToolRecord, published as the tool's outputSchema):
Field | Meaning |
|
|
| new tools only, e.g. |
| one-paragraph answer in plain language |
| each value as |
|
|
| every input actually used, and which ones were defaults |
| what the maths assumes, and anything unusual about this input |
| what a person should verify before acting on the result |
Invalid input never crashes the server. The call returns isError: true with a readable message, at one of two
levels:
Schema. Every input has a type, and numbers have a minimum and maximum. Choices are enums and times must match
HH:MM. The SDK rejects a bad value before the tool runs, naming the field.Tool. Rules a schema cannot express return
Invalid input: …. Examples are a layer height above 80 % of the line width, no load given,away_fromequal toback_at, or a fit feature without a tolerance.
Tool reference
Units and valid ranges for every input. Inputs without a default are required.
estimate_print_job
Filament mass and length, print time, energy and cost for one print. Give a box or cylinder size, or the volume and surface area from your CAD tool.
Input | Unit | Range | Default |
| PLA / PETG / ABS | PLA | |
| box / cylinder / custom | custom | |
| mm (cylinder: x = diameter) | 1–350 | for box or cylinder |
| mm | 0.2–350 | for box or cylinder |
| cm³ | 0.05–20 000 | for custom |
| cm² | 0.5–20 000 | for custom |
| % | 0–100 | 15 |
| count | 1–10 | 2 |
| mm | 0.2–1.2 | 0.42 |
| mm, at most 80 % of line width | 0.04–0.6 | 0.2 |
| mm/s | 5–600 | 150 |
| mm³/s | 1–60 | 21 |
| share of time extruding | 0.1–1 | 0.6 |
| W | 10–2000 | 110 |
| $/kg | 0–500 | 23 |
| $/kWh | 0–2 | 0.17 |
Results: filament (g, m), print time (h), energy (kWh), cost ($).
check_cantilever
Bending stress, safety factor, breaking load and tip deflection of a printed arm loaded at its end.
Input | Unit | Range | Default |
| mm | 5–400, 1–200, 0.8–100 | required |
| N or kg | 0.01–5000 or 0.001–500 | one is required |
| PLA / PETG / ABS | PLA | |
| flat (layers along the arm) / upright (load pulls layers apart) | flat | |
| – | 1–10 | 2 |
| strength across layers ÷ in-plane | 0.1–1 | 0.5 |
Results: stress (MPa), safety factor, breaking load (N), deflection (mm), thickness needed for the target.
check_container
Capacity, wall stress from the liquid, watertightness and heat margin of a printed cup.
Input | Unit | Range | Default |
| mm | 5–300 | required |
| mm | 0.3–20 | required |
| PLA / PETG / ABS | PLA | |
| °C | −20–100 | 20 |
| kg/m³ | 500–2000 | 1000 |
| mm | 0.2–1.2 | 0.42 |
| – | 0.1–1 | 0.5 |
Results: capacity (mL), hoop stress (MPa), wall lines (at least 3 for a watertight wall), margin to the heat deflection temperature (°C).
compare_failure_costs
Expected waste per good part for three strategies: A) unmonitored, B) camera detects and stops, C) camera detects and adapts the print.
Input | Unit | Range | Default |
| h | 0.05–500 | required |
| g | 0.1–10 000 | required |
| chance one attempt fails | 0–0.9 | 0.15 |
| share of the job done when it fails | 0–1 | 0.3 |
| min | 0–600 | 10 |
| share of detected failures fixed in place (a hypothesis) | 0–1 | 0.4 |
| $/kg | 0–500 | 23 |
| $/h | 0–200 | 0.5 |
| good parts to total over | 1–1 000 000 | 100 |
Results: wasted grams, hours and dollars per good part for A, B and C, and the savings over jobs parts.
plan_unattended_print (new)
For a job that runs partly while nobody is watching: when it finishes, how much of it is unattended, how long a failure would go unseen, the expected waste, and optionally the best start time in a window.
Input | Unit | Range | Default |
| h | 0.05–200 | required |
| g | 0.1–10 000 | required |
|
| 00:00–23:59 | required |
| none / auto_stop (printer camera pauses the job) | none | |
| – | 0–0.9 | 0.15 (assumption) |
| share of failures in the first layers | 0–1 | 0.5 (assumption) |
| h | 0.05–5 | 0.5 |
| share of failures auto_stop catches | 0–1 | 0.6 (assumption) |
| min | 0–600 | 10 |
| how often you look while present, min | 1–480 | 60 |
| $/kg | 0–500 | 23 |
| $/h | 0–200 | 0.5 |
|
| no search |
How it works. The failure time is a mix of early failures in the first layers and failures spread evenly over the
job. A failure is noticed at the next look while someone is present (half the check interval on average), at
back_at while nobody is, or after detection_delay_min if auto-stop catches it. A failed job keeps extruding until
it is stopped or the G-code ends. With a search window, start times are tried every 15 minutes, and the one with the
lowest expected waste cost among those whose first layers are watched is recommended.
Results: finish time, unattended share and hours, chance a failure happens unattended, mean and worst-case hours until known, expected wasted g / h / $, and the recommended start with its finish time and expected waste.
check_deviated_part (new)
Decides KEEP, TEST_BEFORE_USE or REPRINT for a part that differs from its design.
Input | Unit | Range | Default |
| list of 1–30 features, each with: | required | |
| text, e.g. "mounting hole" | required | |
| cosmetic / fit / load_bearing | required | |
| mm | 0.1–500 | required |
| mm | 0–500 | required |
| allowed |measured − nominal|, mm | 0.01–10 | required for fit and load_bearing; 1.0 for cosmetic |
| a load-bearing arm to re-check: | as | optional |
| true if layers were changed or restarted where load passes | false | |
| h, g | 0.05–500, 0.1–10 000 | optional, shows what scrapping costs |
| $/kg | 0–500 | 23 |
| $/h | 0–200 | 0.5 |
How it decides. A feature passes if |measured − nominal| ≤ tolerance. With a beam, the cantilever check runs
at both the design and the as-printed thickness (strength scales with thickness²).
REPRINT if a fit or load-bearing feature is out of tolerance, or the arm's safety factor falls below 1.
TEST_BEFORE_USE if a load-bearing feature has no strength check, the safety factor is below the target, or the repair crossed the load path.
KEEP otherwise.
Results: each feature's deviation and share of tolerance used, design vs as-printed safety factor, strength retained, reprint cost, and the decision.
Client and server responsibilities
The client (LLM host, Inspector or a person) | The server (this repo) |
Understands the request and chooses the tool | Validates every input |
Asks the user for missing measurements instead of guessing | Computes deterministically: same input, same output |
Never computes numbers itself, quotes results with units | Reports every default, assumption and warning it used |
Shows | Recommends only, with no access to printers or files |
Decides with the user what to do, and holds API keys and chat history | Holds no state, secrets or network access |
All tools are annotated readOnlyHint, idempotentHint and not openWorldHint.
Before acting on a result
These are screening estimates, not guarantees. No tool models hardware faults, bed adhesion, moisture or how well a repaired region bonds, and those cause most real failures. In particular:
Unattended planner: watch the first layer anyway, check that unattended printing is allowed and that the printer has thermal-runaway protection, and replace the default 15 % failure rate with your own printer's record.
Deviated part: measure the features yourself, since the tool trusts the numbers it gets. Confirm tolerances with whoever designed the part, and load-test any TEST_BEFORE_USE part, or a sacrificial copy, before relying on it.
Repository layout
src/fdm_mcp/server.py MCP server: tool definitions, schemas, ToolRecord, stdio / HTTP entry point
src/fdm_mcp/print_tools.py the four HW4 calculators and material data
src/fdm_mcp/new_tools.py plan_unattended_print and check_deviated_part
tests/test_server.py 20 tests through an in-process MCP client
demo/ client_demo.py, its recorded transcript, Inspector screenshotsLicence and sources
MIT licence. Material values come from the Bambu Lab PLA Basic and PETG Basic technical data sheets (v2.0) and the Stratasys ABS-M30 data sheet.
Available Tools
6 toolscheck_cantileverCheck a printed cantileverARead-onlyIdempotent
Bending stress, safety factor, breaking load and tip deflection of a printed bracket, hook or clip loaded at its end (HW4 tool). Errors: no load given, values outside their ranges.
Inputs: width_mm (required), length_mm (required), thickness_mm (required), load_N, +5 more. Returns: Same shape for every tool, so a client can render or check any of them the same…
check_containerCheck a printed cup or containerBRead-onlyIdempotent
Capacity, wall stress from the liquid, watertightness (wall lines) and heat margin of a printed cylindrical cup (HW4 tool). Errors: values outside their ranges.
Inputs: height_mm (required), inner_diameter_mm (required), wall_thickness_mm (required), material, +4 more. Returns: Same shape for every tool, so a client can render or check any of them the same…
check_deviated_partCheck a deviated or repaired partARead-onlyIdempotent
NEW. Decide KEEP / TEST_BEFORE_USE / REPRINT for a part that came out (or was repaired) different from its design, feature by feature against designer tolerances, and re-check a load-bearing arm's safety factor at its as-printed thickness. Errors: a fit or load_bearing feature without tolerance_mm, bad role, values out of range.
Inputs: features (required), beam, reprint_time_h, machine_cost_per_h, +3 more. Returns: Same shape for every tool, so a client can render or check any of them the same…
compare_failure_costsCompare failure costs with and without monitoringCRead-onlyIdempotent
Expected waste per good part for A) unmonitored, B) detect-and-stop and C) detect-and-adapt (HW4 tool). Errors: values outside their ranges.
Inputs: filament_g (required), print_time_h (required), jobs, recoverable_share, +5 more. Returns: Same shape for every tool, so a client can render or check any of them the same…
estimate_print_jobEstimate a print jobARead-onlyIdempotent
Filament mass and length, print time, energy and cost for one FDM print (HW4 tool). Errors: unknown shape, missing dimensions, impossible volume/area pair, layer height > 80 % of line width.
Inputs: shape, material, size_x_mm, size_y_mm, +13 more. Returns: Same shape for every tool, so a client can render or check any of them the same…
plan_unattended_printPlan an unattended (overnight) printARead-onlyIdempotent
NEW. For a print that runs partly while nobody is watching: finish time, share unattended, expected time until a failure is noticed, expected wasted filament/hours/$, and optionally the best start time in a window so the first layers are watched. Errors: bad clock times, away_from == back_at, only one of the search bounds.
Inputs: back_at (required), away_from (required), filament_g (required), start_time (required), +12 more. Returns: Same shape for every tool, so a client can render or check any of them the same…
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct analysis domain: estimation, cantilever stress, container capacity, failure-cost comparison, unattended scheduling, and deviated-part triage. The only mild overlap is that estimate_print_job and plan_unattended_print both touch time/cost/waste, but the scheduling and monitoring framing keeps them separable. An agent should rarely misselect.
All names are snake_case verb_noun, but the verb choice is inconsistent: estimate_, check_, compare_, plan_ are mostly imperative while check_container and check_cantilever use the same verb for quite different analysis types. Readable, but no single predictable pattern (e.g. analyze_ / check_ applied uniformly).
Six tools is well-scoped for an FDM print-analysis server, each covering a clearly stated engineering question (cost, stress, capacity, failure economics, scheduling, deviation triage). No filler tools and nothing obviously redundant.
The surface covers estimation, structural checks, container/liquid checks, economic comparison, and post-print triage, but has notable gaps: nothing for material/print-profile selection, overhang/support or warping risk, or multi-part assemblies, and no tool linking scheduling decisions back to deviation outcomes. Agents could handle common single-part workflows but will hit dead ends on broader print planning.
Related MCP Connectors
Real 3D-print slicing, quoting, DFM, orientation & material/settings advisors. Free personal tier.
3D printing: printable models, calculators, troubleshooting wiki, build guides, AI 3D + CAD design.
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Instant parametric cost estimates for custom manufacturing: CNC, molding, sheet metal, 3DP, PCB.
Related MCP Servers
- FlicenseAqualityDmaintenanceAn intelligent 3D printing assistant that enables users to analyze meshes, generate optimal print profiles, and automate PrusaSlicer operations through an MCP client. It provides a comprehensive suite of tools for geometric analysis, printability checks, filament recommendations, and post-print diagnostics.1711-
- AlicenseAqualityCmaintenanceMCP server for real FDM 3D-printing slicing, quoting, and design-for-manufacturability analysis via the FabTally API, supporting 12 printer profiles and 12 materials. Includes free discovery/printability tools and paid slice/quote/orientation tools settled via x402 (USDC on Base).6MIT
- AlicenseAqualityDmaintenanceCalculates 3D printing cost, time, material weight and build-plate fit from plain dimensions given in the conversation, with no STL upload and no API key. Covers PLA, PETG, ABS, ASA, TPU, Nylon, PC and PLA-CF, plus build volumes for Bambu Lab, Prusa, Creality, Voron and Elegoo printers.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables plain-English slicing guidance, profile discovery and comparison, 3MF/STL inspection and optimization, headless slicing with cost/time metrics, GUI automation, and live printer/AMS monitoring and control for Bambu Lab 3D printers.MIT