Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FREECADCMDNoAbsolute path to the headless FreeCAD binary (freecadcmd). Defaults to freecadcmd on PATH.freecadcmd
FREECAD_MCP_LIBRARYNoLocal folder of STEP files used by list_library and insert_library_part../library
FREECAD_MCP_TIMEOUTNoSeconds allowed per FreeCAD call.240
FREECAD_MCP_LAUNCHERNoCommand prefix for each FreeCAD subprocess, e.g. 'systemd-run --user --scope -p MemoryMax=8G' to cap memory on a shared machine.
FREECAD_MCP_WORKSPACENoWhere documents, renders and exports are written. Default ./workspace inside the repo../workspace

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
new_documentA

Create an empty FreeCAD document name (saved as workspace/.FCStd). Every other tool takes this doc name. Units are millimetres, +Z is up, angles are degrees.

list_documentsA

List all documents in the workspace with size and modification time.

document_infoB

Summary of a document: file size, object names, overall bounding box, undo depth and the last 5 modifying operations.

undoA

Undo the last steps modifying operations by restoring the previous saved version of the document (up to 20 versions are kept). The restored version replaces the current file; there is no redo, so check list_history first if unsure.

list_historyC

Journal of modifying operations applied to doc (time, operation, abbreviated arguments), newest last.

object_historyB

All journal entries whose arguments mention object name: how it was created, edited, combined or moved.

list_objectsA

List every solid/shape object in doc with type, validity, volume (mm3), area, bounding box, centre of mass and metadata (material, part number, ...). Use this to inspect state after each modelling step.

add_primitiveA

Add a primitive solid. dimensions keys per shape: box {length(x), width(y), height(z)}; cylinder {radius, height} (axis +Z); sphere {radius}; cone {radius1, radius2, height}; torus {radius1 (ring), radius2 (tube)}. The shape is created with its origin corner/base centre at position [x,y,z] mm (default origin) after rotating rotation_deg about rotation_axis (default Z). Box origin is its min corner; cylinder/cone origin is the centre of the base circle. material: aluminium_6061, steel, stainless_304, pa12, pla, pom. color: [r,g,b] 0..1.

extrude_polygonA

Extrude a closed 2D polygon (list of [a,b] points, no need to repeat the first) by height mm. plane XY: points are (x,y), extrusion along +Z. XZ: points are (x,z), extrusion along +Y. YZ: points are (y,z), extrusion along +X. offset moves the profile along the extrusion axis first. holes is an optional list of polygons cut out of the profile. Example L-bracket profile in XZ: [[0,0],[60,0],[60,5],[5,5],[5,40],[0,40]].

booleanA

Boolean combine objects. cut: base minus all tools; fuse: union of base and tools (coplanar faces merged); common: intersection. The inputs are deleted unless keep_inputs=true; the result object is result_name and keeps the base's material. Avoid exactly coplanar/tangent tool faces: extend cutting tools slightly past the surface.

transformA

Rotate then translate an object (mm, degrees). Rotation is about rotation_axis through rotation_center (default world Z through the origin), applied before the translation. With copy_as a new object is created and the original stays where it is (use for repeated parts).

filletA

Round edges of a solid with radius mm. edges: list of 1-based edge indices (from list_edges) or an edge selector string (see list_edges); default all edges. Modifies the object in place unless result_name is given. Fails with a clear message if the radius is too large for the geometry.

chamferB

Bevel edges of a solid by size mm (equal distance). Same edge selection rules as fillet.

delete_objectC

Delete one object from the document.

set_propertiesB

Set metadata on an object. These feed mass_properties, run_fem, bom and the renders. material is one of aluminium_6061, steel, stainless_304, pa12, pla, pom (see the freecad://materials resource). color is [r,g,b] 0..1 (defaults to the material's colour). quantity is used by the BOM.

list_facesA

List faces of an object with 1-based index, surface type, area, centre, normal (planes) or radius/axis (cylinders). Indices are what run_fem and fillet need; they change after any geometry edit, so list again. selector filters, tokens separated by spaces (all must match): 'normal:+Z' (planar faces with that normal; also -X, +Y ...), 'z:max' / 'x:min' / 'y:12.5' (face centre coordinate at the extreme or value), 'type:cylinder|plane', 'radius:3.3', 'area>50', 'area<10', 'index:1,2'. Example: 'normal:+Z z:max' = the top face.

list_edgesA

List edges with 1-based index, curve type, length, midpoint, direction (lines) or radius (circles). selector tokens (space separated, all must match): 'parallel:X|Y|Z' (straight edges), 'type:line|circle', 'length>10', 'length<5', 'radius:3.3', 'z:max' / 'x:min' / 'y:5' (midpoint coordinate), 'index:3,4'.

import_stepC

Import a STEP file (absolute path) as a new object name.

exportA

Export objects (default all solids) to workspace/exports// as STEP, STL, OBJ, 3MF or a FCStd copy. Returns the absolute path. For DXF (laser cutting) use export_dxf.

mass_propertiesA

Volume, mass (g), centre of mass (mm) per object and for the set, plus the combined inertia tensor (g*mm2, about the combined centre of mass, world axes). Density comes from each object's material (set_properties) unless material or density_kg_m3 overrides it for all objects. Objects without material report volume only.

check_interferenceA

Pairwise interference test: for every pair of solids whose bounding boxes touch, compute the volume of their intersection. Pairs above tolerance_mm3 are returned with the common volume, overlap centre and size. Face contact (zero volume) is not interference. clean: true means no pair overlaps.

run_femA

Linear-static FEM (Gmsh 2nd-order tetrahedra + CalculiX) on ONE solid. Returns max von Mises (MPa), max displacement (mm), yield safety factor, mesh size, and a colour plot of von Mises (returned as an image and saved as PNG). fixed_faces: fully fixed faces (several fixtures allowed): 1-based indices from list_faces, a selector string such as 'normal:-Z z:min' (see list_faces), or a list mixing selectors and index lists, which are united. loads: list of dicts, each with faces (indices or selector) and either force_n (total force in newtons, spread over those faces) + direction [x,y,z], or pressure_mpa (acts normal into the face). Example: loads=[{"faces": "normal:+X x:max", "force_n": 500, "direction": [0,0,-1]}]. material defaults to the object's material. mesh_size is the max element edge in mm: smaller is more accurate and slower (keep >= thickness/2; 3-5 mm is fine for hand-sized parts, runtime seconds to a minute). Stress at the edge of a fixed/loaded face is a numerical singularity, so max_von_mises_mpa (and the safety factor) ignore nodes within exclude_mm (default = mesh_size) of those edges; *_raw values include them. Fillet sharp corners and refine the mesh before trusting stress concentrations.

mate_facesA

Placement-based assembly joint: move object moving so its planar face lies against a planar face of fixed (normals facing each other), centres aligned, separated by offset mm (use a negative value to sink in). Each face spec must match exactly one face (index or selector, see list_faces). Optionally spin the part about the contact normal afterwards.

mate_coaxialA

Make a cylindrical face of moving (e.g. a bolt shank) coaxial with a cylindrical face of fixed (e.g. a hole) and slide it axial_offset mm along the shared axis. flip reverses the moving part's direction. Combine with mate_faces to seat a screw head on a surface, then check_interference / check_clearance.

add_fastenerA

Generate a parametric ISO-style fastener (steel, with part number and description set for the BOM): shcs = ISO 4762 socket head cap screw, hex_bolt = ISO 4017, hex_nut = ISO 4032, washer = ISO 7089. length (mm under the head) is required for bolts. position is the bearing face (underside of the head / one face of the nut or washer); direction is the way the shank points, e.g. [0,0,-1] for a screw going down from a top face. Modelled nominal size (no threads).

list_libraryA

List STEP files (.step/.stp) in the local parts library folder (env FREECAD_MCP_LIBRARY, default ./library), optionally filtered by a case-insensitive substring. Use the returned relative path with insert_library_part.

insert_library_partB

Insert a STEP file from the parts library (see list_library) as object name, then optionally rotate/translate it.

check_clearanceA

Minimum distance between every pair of solids (exact), returning the pairs closer than report_below_mm sorted by distance with the closest point on each. Distance 0 means touching or overlapping (use check_interference for volume).

export_dxfA

Export a 2D DXF outline for laser/waterjet cutting. Either face (one planar face, by index or selector; its boundary and holes in the face's own 2D coordinates) or plane + offset (cross-section of the object by the plane x=, y= or z=offset). Lines and full circles are written as LINE/CIRCLE entities in mm. Saved under workspace/exports//.

create_sketchA

Create a 2D sketch (FreeCAD Sketcher with a real constraint solver). plane XY (x,y; normal +Z), XZ (sketch x,y map to world x,z; normal -Y) or YZ (maps to world y,z; normal +X); offset shifts the plane along its normal. geometry items (sketch coordinates in mm; index = position in the list, starting 0): {"type":"line","p1":[x,y],"p2":[x,y]}, {"type":"circle","center":[x,y],"radius":r}, {"type":"arc","center":[x,y],"radius":r,"start_deg":a,"end_deg":b} (counter- clockwise), {"type":"polyline","points":[[x,y],...]} (closed polygon, expands to one line per side). Add "construction":true for reference geometry. Closed loops become faces; a loop inside another becomes a hole. constraints (optional, reference geometry by index geo/geo2, point ids pos 1=start, 2=end, 3=centre): coincident (geo,pos,geo2,pos2), horizontal, vertical, parallel, perpendicular, equal, tangent, radius/diameter (geo,value), length (geo,value), distance_x/distance_y (geo,value), lock (geo,pos,x,y). Returns closed/open wire counts and solver DOF (0 = fully constrained). Next: pad, pocket, revolve, loft or sweep.

padA

Extrude the closed loops of a sketch by length mm along the sketch normal (XY +Z, XZ -Y, YZ +X; reverse flips it, symmetric splits the length across the sketch plane) into a new solid result_name. Inner loops become holes.

pocketA

Cut the sketch profile out of solid target. Cuts opposite to the sketch normal by default (reverse flips); depth in mm, or through_all. Modifies target unless result_name is given. Place the sketch on or above the surface being cut.

revolveA

Revolve the sketch's closed profile about a world-space axis (point + direction) by angle_deg. The profile must not cross the axis. Example: shaft profile in an XY sketch, axis_dir [1,0,0].

loftA

Loft a solid through two or more closed sketch profiles in order (e.g. sketches on parallel planes with different offset). ruled gives straight transitions instead of smooth ones.

sweepA

Sweep a closed profile sketch along a path (a sketch of connected edges, or a 3D polyline path_points). The profile should sit at the path start, roughly perpendicular to it. Use for pipes, rails and cable runs.

holeA

Drill a hole into solid name (modified in place). position is the point on the surface where the hole starts, direction points INTO the material (e.g. [0,0,-1] to drill down from a top face). depth None = through all. kind counterbore needs cbore_diameter and cbore_depth; countersink needs csink_diameter (90 degree cone). Fails if no material was removed. Find surface points with list_faces.

shellA

Hollow out a solid leaving walls of thickness mm (inward), opening the faces in remove_faces (indices or a face selector, see list_faces). Large thickness relative to features fails; the tool says so.

mirrorA

Mirror an object across a world-aligned plane (XY mirrors Z, XZ mirrors Y, YZ mirrors X) at plane_offset mm along its normal. With fuse=true the result is the union of the original and the mirror image.

linear_patternA

Repeat an object count times (including the original) every spacing mm along direction. fuse=false creates objects result_name_1.. for the copies only (the original stays); fuse=true returns one solid with all instances. Typical use: pattern a cylinder 'tool', then boolean cut it from a plate.

polar_patternA

Rotate copies of an object about an axis through center: count instances spread over total_angle_deg (360 = full circle, evenly spaced). Same fuse behaviour as linear_pattern. Use for bolt circles.

make_drawingA

Make a third-angle engineering drawing (front, top, right, isometric) with hidden-line removal via TechDraw's projection, overall dimensions on each orthographic view, diameter callouts for round holes seen face-on, and a title block (title, material, mass, scale, date). Writes SVG, PDF and PNG into workspace/drawings// and returns the paths plus the PNG as an image. scale is paper:model (e.g. 0.5); default picks a standard scale that fits.

bomB

Bill of materials from object metadata (set_properties: part_no, description, material, supplier, quantity). Identical part_no+material+description lines are merged and quantities summed. Returns the rows and writes CSV and Markdown under workspace/bom//. Mass is volume x material density.

render_viewA

Render the document (or the listed objects) to a PNG you can look at. views: iso, front (looking along +Y), back, top, bottom, right, left, or grid (iso+front+top+right in one image). Objects are coloured by their color/material. explode (0..1.5) pushes every object away from the assembly centre along the line from the centre to the object's own centre, producing an exploded view. The PNG is also saved under workspace/renders//.

section_viewA

Cut the model with the plane axis=offset (e.g. z=10), discard the half on the remove side and render what is left, with the cut faces highlighted in orange so internal features (bores, walls, fastener fit) are visible. view 'auto' looks straight at the cut face; any render_view name also works. Nothing in the document is changed.

run_scriptA

Escape hatch: run arbitrary FreeCAD Python in the worker on doc (saved afterwards). Predefined: App (=FreeCAD), Part, V (Vector), doc, result (a dict you can fill; it is returned), add_shape(doc, name, shape, material=None). print() output is returned. Use only when no dedicated tool fits; geometry made here should go in via add_shape so other tools see it.

Prompts

Interactive templates invoked by user choice

NameDescription
design_and_validate_bracketA PROMPT is a reusable instruction template the user selects in the client (e.g. as a slash command).

Resources

Contextual data attached and managed by the client

NameDescription
documents_resourceWorkspace documents (JSON list). A RESOURCE is read-only context the client can attach, unlike a tool it has no side effects.
materials_resourceBuilt-in materials with density (kg/m3), Young's modulus (MPa), Poisson ratio and yield strength (MPa).

TDQS

B3.3/5.0

Scored across 45 tools

Disambiguation4/5

The tools mostly target clearly distinct CAD actions and resources, with detailed descriptions clarifying boundaries. Minor overlaps exist between export/export_dxf, import_step/insert_library_part, list_history/object_history, and check_interference/check_clearance, but they are semantically separable.

Naming Consistency4/5

All names use snake_case consistently and many follow a verb_noun pattern such as list_objects, create_sketch, and check_clearance. A few core CAD operations are noun-only or bare verbs (fillet, pad, boolean, export), but the convention remains readable and predictable.

Tool Count2/5

45 tools is a large surface for a single MCP server, well above the typical 3-15 range and into the 25+ category that risks overwhelming selection. While the CAD domain is broad, many operations could be grouped or exposed more selectively.

Completeness4/5

The surface covers document management, modeling, assembly mating, measurement, FEM, drawings, BOM, rendering, and export, giving strong lifecycle coverage. Minor gaps include direct STL/OBJ import and sketch editing, though run_script provides an escape hatch.

Maintenance

ActivityMaintained
ResponsivenessNo issues