9 easy steps for llama.cpp, a local model, Freecad (and pi coding agent) to generate solid objects that sound mechanically good and can be also be 3D printed/milled
Quick setup on linux: STEP 0: install/download llama.cpp, Freecad, your favourite gguf model - possibly with multimedia image reading capabilities (I've used Qwen3.8-27B-UD-Q4_K_M and relative mmproj-F16 quantized by Unsloth), uv (, pi.dev) STEP 1: $ cd /your/path/to/ (i.e. where to install) STEP 2: $ git clone github.com/neka-nat/freecad-mcp.git STEP 3: $ cp -r freecad-mcp/addon/FreeCADMCP ~/.local/share/FreeCAD/v1-1/Mod/ STEP 4.1: if using pi coding agent as modelling assistant, write into the file ~/.pi/agent/mcp.json : AND/OR STEP 4.2: if using llama-server as modelling assistant, write into a file called freecad_mcp.json : { "mcpServers": { "freecad": { "command": "uv", "args": [ "--directory", "/your/path/to/freecad-mcp", "run", "freecad-mcp" ] } } } STEP 5.1 (pi as modelling agent): $ pi update; pi install npm:pi-mcp-extension run pi then into pi issue the command: /mcp:start freecad AND/OR STEP 5.2 (llama server as modelling agent): start llama-server as usual adding the option --mcp-servers-config /your/path/to/freecad_mcp.json Verify that freecad_* tools are available under llama-server webui > Settings > Tools > Server, eventually allowing them to run without asking permission; also under webui > Settings > Agentic > Agentic turns increase the value to something like 99 STEP 6: start llama-server as usual also adding, if the model has multimedia capabilities, the option to load the visual add-on using: --mmproj name_of_the_mmproj.gguf in order for the local model to read screenshots from freecad and to verify the correctness of performed geometric operations STEP 7: start Freecad, select the "MCP Add-on" workbench, click on "Start RPC Server" and/or "Auto-Start Server" STEP 7.1: In Freecad create a new document STEP 8: into llama server webui or into pi write something like the following prompt: in freecad generate a cube with a 5 spokes star shaped hole going through it from top to bottom OR as a start of the posted image: In freecad create a new project called "double smooth gears". Into this project design 2 equal gears with 20 spokes each that could be put in close contact with those of the other gear to rotate and counter-rotate one gear against the other one. The spokes "hills" have to be rounded and so the corresponding spokes "valleys" should be analogously; sort of a sinusoidal curve on a circular path. STEP 9: have fun, the future has just started