execute_code
Execute arbitrary Python code in FreeCAD.
How to use it
execute_code is exposed by the Freecad MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the execute_code tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
FULL FREECAD MCP LISTINGOther tools in Freecad MCP (10)
Create a new document in FreeCAD.
Create a new object in FreeCAD.
Delete an object in FreeCAD.
Edit an object in FreeCAD.
Get an object in a document.
Get all objects in a document.
Get the list of parts in the parts library.
Get a screenshot of the active view.
Insert a part from the parts library.
Run the CalculiX solver on an existing Fem::FemAnalysis and return summary results (max von Mises stress, max displacement, node count, working directory). Auto-creates a SolverCcxTools if the analysis has none. See examples/cantileverfem.py for an end-to-end usage example.