lambdacad-mcp is an MCP (Model Context Protocol) server designed to let AI draw directly in CAD software that supports AutoLISP. Its core mechanism is a pure AutoLISP file bridge: the MCP server writes LISP expressions to a file, triggers a tiny MCP command inside CAD, and then reads back the result. This approach requires no COM, SDK, or plugin, so it can run on Linux and can unlock the full capabilities of CAD, including 3D solid modeling. The reference adapter drives BricsCAD on Linux and is claimed to be the first MCP server for professional DWG CAD on Linux. Because the bridge is based on standard AutoLISP, DXF entmake, and AutoCAD-compatible commands, it is in theory portable to the AutoCAD, ARES Commander, ZWCAD, GstarCAD, and IntelliCAD families, with porting requiring only changing the autoload file name and the key trigger method.
Main capabilities:
- Full 2D drafting: lines, arcs, polylines, splines; line weights set by layer (e.g., walls 0.50, edges 0.35, dimensions 0.18, subject to actual measurement on the printed page); true HATCH (with island support); dimensioning including radius, diameter, and angular; leaders; linetypes (center, dashed); text styles; trim/extend/fillet/chamfer/offset/mirror/array; blocks.
- Semantic shapes: slot, bolt_circle, rounded_rect, polygon, center_mark, with the server performing the math in a single call.
- 3D solid modeling: box/cylinder/sphere/cone/wedge/torus; extrude/revolve/sweep; union/subtract/intersect; slice; solid edge fillet/chamfer; 3D move/rotate about any axis; flatshot_view can automatically generate correct 2D drawing views from a 3D model.
- Batch and atomic operations: draw_batch executes N operations in a single round trip, wrapped in one undo group (one batch equals one Ctrl+Z).
- Selection set interaction: get_selection reads the GUI's pickfirst set; select_by / select_window highlights the objects found by the AI before operations; modifyThe tool accepts "selection".
- Screenshot-free verification: bounding boxes, keypoints, exact lengths/areas, intersection checks (collision detection), solid volumes/centroids.
- Design review (new in 1.2): boolean_verified performs the cut and measures the change against the expected volume (an insufficient cut reports SHORT instead of success); overhang_report reads the STL mesh and determines whether the part can be printed without supports, scoring six orientations; contact_report reports, for assemblies (assembly_place / assembly_list / assembly_clear), who touches whom, who interferes, and who is isolated; hole_report physically probes each hole and reports which are actually open; graph_build / graph_trace read 2D geometry as a connectivity graph, identifying independent networks, exact trace lengths, real breaks, and T-junctions, with connection tolerance emerging from the drawing rather than being hardcoded.
- Drawing memory (new in 1.3 beta): memory_enable places a log written by CAD itself next to the .dwg, capturing the edits a human makes in the GUI; tag_entity gives entities semantic roles (such as "muro-nord", "asta-principale"), keyed by handle, persisting after save and reopen; world_report answers what is here, what I call it, and what has happened since the last look, re-verifying every claim against the live drawing before answering (an entity erased behind the AI's back reports DEAD (erased since tagging), never hidden).
- In-protocol instructions (new in 1.2): the server ships with rules that cannot be learned by trying (OK is not evidence; calibrate before trusting; boolean operations keep the first handle; one line is one complete expression; consult drawing memory first), plus a lambdacad://traps resource.
- Visual assistance: render_view uses BricsCAD's internal PNG rendering (clean, no UI, about 30 KB) for vision models.
- Sheets and viewports: create_sheet (A4 to A0, margins zeroed so paper millimeters equal drawing millimeters); add_viewport (requesting 1:50 is 1:50, measured back from the solid, and parked on a non-printprint layer); fit_viewport (measure the already-drawn content and choose the largest standard scale that fits it; 1:37 is not a standard scale); title_block (border plus ISO 7200 title block, according to sheet size); export_sheet_pdf checks its own work by measuring the PDF pages just written.
- Deliverables: save DWG, export DXF, PDF, and STL (export_stl sends 3D solids directly to the slicer, parked at the origin).
- Multiple drawings: list_documents shows which drawing the tool is pointing at (as well as unsaved changes and read-only status), use_document selects another one; state in every reply which drawing you are answering for, and warn when it changes underneath.
- Escape hatch: run_lisp evaluates arbitrary AutoLISP (multiline, multiple expressions); capable models can write parametric code.
How to use:
Requires Linux, BricsCAD (any recent version, tested on V26), Python 3.10+, xdotool. The installer creates a venv, installs the AutoLISP bridge into BricsCAD's Support/on_doc_load.lsp (idempotent, marker-delimited), and prints configuration that can be pasted directly into Claude Code / Claude Desktop. Start BricsCAD and open a drawing (the bridge loads when the document opens), start a new AI session, the bricscad tool appears, and then you can ask things like "draw the plan of a 4×3 m room with a door and dimensions".
Configuration is done through environment variables. run_lisp and run_command execute arbitrary code inside BricsCAD by design, so only connect trusted MCP clients and treat the bridge files as trusted input. The bridge itself never loads external files (read-only + evaluate), and respects BricsCAD's SECURELOAD.
Local usage telemetry: the server appends one line of JSON per call to ~/.lambdacad/usage.jsonl, containing the tool name, duration, and error flag, never arguments (no coordinates, paths, or drawing data); the data never leaves the local machine. It can be disabled with LAMBDACAD_TELEMETRY=0 disable.
Applicable scenarios:
- AI-assisted 2D drafting and 3D modeling using BricsCAD on Linux.
- Workflows that need to generate 2D drawing views from 3D models and export PDF/STL.
- Engineering tasks that need design review (boolean verification, overhang analysis, contact analysis, hole inspection, connectivity analysis).
- Projects that need drawing memory and semantic labels to maintain context across sessions.
- Advanced users who want to write parametric AutoLISP code via run_lisp.
Limitations:
- The reference adapter targets BricsCAD on Linux; adapters for other CAD programs are welcome as contributions, but no ready-made support is provided.
- Requires Linux, BricsCAD, Python 3.10+, and xdotool.
- The bridge mechanism relies on keystroke triggering and file reads/writes, and may be affected by window focus (the documentation mentions focus-free dispatch as a future direction).
- Telemetry is enabled by default (locally), and can be disabled.
- The project is independent open-source software and is not affiliated with Autodesk, Bricsys, or any CAD vendor.
- Some features (such as drawing memory) are marked as beta.
The project is licensed under Apache 2.0, including an explicit patent grant and trademark protection for the lambdacad-mcp name.