E
emirmrkaljevic/mesh2cad
mesh2cad converts an STL mesh of a simple mechanical part into editable parametric CAD: STEP, CadQuery, OpenSCAD, and FreeCAD scripts.
★ 83·updated 2026-11-19
View on GitHub ↗Direct link · no redirect page
We have no copy-paste install command and no public remote endpoint, so we do not print a config. The step above is reference only, not a command we can vouch for. A made-up one is worse than none. How each client wires MCP up →
- Star count
- 83 ★ · emirmrkaljevic/mesh2cad · read from the GitHub search API · (checked 2026-11-19 20:00:48)
- Source
- collected from the punkpeye/awesome-mcp-servers list · type: MCP server
- Harvest history
- first seen 2026-11-18 · last seen 2026-11-20 · seen 3× · listed by 3 sources
- Score
- score 300 · 83 ★ · 3 sources · mcp
FAQ (answers come from our records)
Who is it for?
We filed it under these tags: MCP servers. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository
emirmrkaljevic/mesh2cad;first catalogued 2026-11-18;last seen 2026-11-20。There is no official certification or quality rating here — we record sources and dates only.README excerpt (English, untranslated) · Read the full README on GitHub →
# mesh2cad
Excerpted from the repository README (abridged)
mesh2cad converts an STL mesh of a simple mechanical part into editable parametric CAD: STEP, CadQuery, OpenSCAD, and FreeCAD scripts. It is also an MCP server.
If you find this useful, you can support me by getting a SkinToScan pack, my other project. It's a one-time purchase that directly funds my open-source work.
OBJ and PLY meshes work the same way. The fit runs on your machine. Nothing is uploaded.
A STEP file is the solid. When the fit is exact, a hole is one cylindrical face, not a ring of triangles. A script is for changing a dimension and rebuilding. CadQuery is Python. OpenSCAD is the text the Customizer on Thingiverse and Printables edits. The FreeCAD file is a macro. All three use the same names, so hole_1_d is the same hole in each of them.
Left: a 21k-triangle mesh with 0.1 mm noise. Right: the STEP file mesh2cad writes, 10 planes and 2 cylinders, max deviation 0.05 mm from the true part.
Four printer parts, with the STEP files and the generated scripts, are in the example gallery.
## Install
pip install mesh2cad
Python 3.10 or newer. That install is the command line tool and STEP export. OpenCascade comes in with the package (cadquery-ocp).
pip install "mesh2cad[mcp]" adds the server. pip install "mesh2cad[cadquery]" lets mesh2cad run a generated .py and check it before the file is written. OpenSCAD and FreeCAD are separate programs, not pip packages. Without openscad on PATH, a .scad file is still written and the command says it was not verified. A .FCMacro is written only when a check passes. What happens when freecadcmd is missing is in Install.
## Quick start
mesh2cad convert bracket.stl --cadquery bracket.py
mesh2cad edit bracket.py --set hole_1_d=8 --in-place -o bracket.step
The first command writes bracket.py. Diameters, thicknesses, and positions are names at the top of the file. The second sets hole_1_d to 8 mm, rewrites the script, and writes bracket.step. Every other byte of the file stays as it was.
mesh2cad edit bracket.py --set base_x=+2 adds 2 mm to the current length. A leading + or - is a change from the current number, not how you set a negative value. mesh2cad params bracket.py prints each name, its value, and the unit when there is one.
A STEP file on its own is mesh2cad convert part.stl -o part.step. Add --report report.md for the numbers: Hausdorff and RMS deviation, volume error, face types, and the method (exact, faceted-hybrid, or faceted). Open that STEP file in FreeCAD, Fusion, Onshape, or another CAD tool and select a face.
If the part is outside what a script can express, or the rebuilt solid misses the check, the script is not written and the command exits with code 2. The reason is printed. The same convert can write .scad and .FCMacro. Flags are in the CLI reference. What the scripts contain is in CadQuery, OpenSCAD, and FreeCAD. The edit rules are in Parameters.
## What it handles
It is meant for simple mechanical parts: plates, brackets, and boxes with holes, bolt circles, slots, bosses (including on an extruded outline), countersunk and counterbored holes on that outline, and fillets. It fits planes, cylinders, spheres, cones, and constant-radius rounds, and writes those as faces you can select.
If you find this useful, you can support me by getting a SkinToScan pack, my other project. It's a one-time purchase that directly funds my open-source work.
OBJ and PLY meshes work the same way. The fit runs on your machine. Nothing is uploaded.
A STEP file is the solid. When the fit is exact, a hole is one cylindrical face, not a ring of triangles. A script is for changing a dimension and rebuilding. CadQuery is Python. OpenSCAD is the text the Customizer on Thingiverse and Printables edits. The FreeCAD file is a macro. All three use the same names, so hole_1_d is the same hole in each of them.
Left: a 21k-triangle mesh with 0.1 mm noise. Right: the STEP file mesh2cad writes, 10 planes and 2 cylinders, max deviation 0.05 mm from the true part.
Four printer parts, with the STEP files and the generated scripts, are in the example gallery.
## Install
pip install mesh2cad
Python 3.10 or newer. That install is the command line tool and STEP export. OpenCascade comes in with the package (cadquery-ocp).
pip install "mesh2cad[mcp]" adds the server. pip install "mesh2cad[cadquery]" lets mesh2cad run a generated .py and check it before the file is written. OpenSCAD and FreeCAD are separate programs, not pip packages. Without openscad on PATH, a .scad file is still written and the command says it was not verified. A .FCMacro is written only when a check passes. What happens when freecadcmd is missing is in Install.
## Quick start
mesh2cad convert bracket.stl --cadquery bracket.py
mesh2cad edit bracket.py --set hole_1_d=8 --in-place -o bracket.step
The first command writes bracket.py. Diameters, thicknesses, and positions are names at the top of the file. The second sets hole_1_d to 8 mm, rewrites the script, and writes bracket.step. Every other byte of the file stays as it was.
mesh2cad edit bracket.py --set base_x=+2 adds 2 mm to the current length. A leading + or - is a change from the current number, not how you set a negative value. mesh2cad params bracket.py prints each name, its value, and the unit when there is one.
A STEP file on its own is mesh2cad convert part.stl -o part.step. Add --report report.md for the numbers: Hausdorff and RMS deviation, volume error, face types, and the method (exact, faceted-hybrid, or faceted). Open that STEP file in FreeCAD, Fusion, Onshape, or another CAD tool and select a face.
If the part is outside what a script can express, or the rebuilt solid misses the check, the script is not written and the command exits with code 2. The reason is printed. The same convert can write .scad and .FCMacro. Flags are in the CLI reference. What the scripts contain is in CadQuery, OpenSCAD, and FreeCAD. The edit rules are in Parameters.
## What it handles
It is meant for simple mechanical parts: plates, brackets, and boxes with holes, bolt circles, slots, bosses (including on an extruded outline), countersunk and counterbored holes on that outline, and fillets. It fits planes, cylinders, spheres, cones, and constant-radius rounds, and writes those as faces you can select.
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/emirmrkaljevic-mesh2cad/)
- Source
- awesome · https://github.com/emirmrkaljevic/mesh2cad
- Browse by field
- MCP servers
- Traction
- 83 ★
- Listed by
- 3 independent sources
- added
- today
More MCP servers
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.