Have an STL of a printer part and want to change one hole size? mesh2cad can export the recovered model as OpenSCAD or CadQuery source, with dimensions as named values, so you edit a number instead of sculpting a mesh.
pip install mesh2cad mesh2cad convert part.stl -o part.step
Run mesh2cad convert --help for the CadQuery and OpenSCAD export options. To use it from an MCP client, add the server command mesh2cad mcp (install with pip install "mesh2cad[mcp]").
The generated code is rebuilt and compared with the original mesh before it is written. Parts that do not reproduce within tolerance are refused with a reason.
mesh2cad params part.py lists the named dimensions in a CadQuery, OpenSCAD, or FreeCAD file mesh2cad wrote (name, value, kind, unit). mesh2cad edit part.py --set hole_1_d=8 --in-place -o part.step rewrites that number, leaves the rest of the file unchanged, and rebuilds the solid. --set base_x=+2 adds 2 mm. A leading sign is a delta. OpenSCAD writes STL (-o part.stl). CadQuery runs in-process. OpenSCAD and FreeCAD need openscad or freecadcmd on PATH. If the program is missing, the script can still be rewritten and mesh2cad says it did not render.
This only works on scripts mesh2cad generated. An unknown name is refused, with the list of names that exist. A hole larger than the wall it sits in, or a render that is not one valid solid, is refused and nothing is written. outline is a point list. It is listed, and it is not edited as a single number.
mesh2cad convert bracket.stl --cadquery bracket.pymesh2cad is free and open source (see the GitHub repository for the license). Found an STL it handles badly? Open an issue with the file.