lambdacad-mcp
This MCP server allows AI to control a professional DWG CAD system (like BricsCAD on Linux) via AutoLISP for fully automated 2D drafting, 3D solid modeling, verification, and export.
2D Drafting & Annotation
Draw primitives (lines, circles, arcs, ellipses, rectangles, polylines, points, splines, donuts, xlines) and semantic shapes (slots, bolt circles, polygons, rounded rectangles, center marks) in one call.
Add hatches with island support, text (single‑line/mtext), dimensions (linear, aligned, radius, diameter, angular), and leaders.
Edit with trim, extend, fillet, chamfer, offset, mirror, array (rectangular/polar), break, join, explode, move, copy, rotate, scale.
Batch multiple operations atomically in a single
draw_batchcall (one undo step).
3D Solid Modeling
Create primitives (box, cylinder, sphere, cone, wedge, torus), extrude/revolve 2D profiles, sweep along paths.
Boolean operations (union, subtract, intersect), slice solids, and apply fillets/chamfers on edges.
Generate 2D projections (
flatshot_view) and measure volumes/centroids.
Layers, Styles & Blocks
Create/manage layers, set current layer/color/linetype (CENTER, HIDDEN, DASHED, etc.), create/insert blocks, manage text and dimension styles.
Purge unused objects; assign properties to entities.
Selection, Inspection & Verification
Select by user pick, type, layer (wildcards), or window; read GUI selection.
Get bounding box, length, area, key points, intersections; check collisions.
Query entity counts per type/layer, raw DXF data, system variables.
View, Export & Deliverables
Zoom extents/window, switch 3D views (iso, top, front, etc.) and shading modes.
Render clean PNG screenshots for visual inspection.
Save as DWG, export to DXF, PDF, STL (for 3D printing).
Automation & Flexibility
Run arbitrary AutoLISP code (
run_lisp) or direct BricsCAD commands (run_command) for full parametric control and custom operations.Undo/redo entire batches;
handle='selection'support to act on user‑selected entities.
Provides tools for interacting with AutoCAD through an AutoLISP file bridge, enabling AI agents to create and modify 2D drawings and 3D models, including drafting entities, dimensions, hatches, blocks, and solid modeling operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lambdacad-mcpDraw a DN80 flange: front view, dimensions, and 3D model"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
λ lambdacad-mcp
Let AI draw in your CAD. An MCP server for any AutoLISP-capable CAD — no COM, no SDK, no plugins. Pure AutoLISP. The reference adapter drives BricsCAD on Linux: the first MCP server for a professional DWG CAD on Linux.
"Draw a DN80 flange: front view, hatched section, dimensions — then model it in 3D."

Real-time capture, unedited: front view with bolt circle, hatched section, radial/diameter dimensions, leader, title block — then the same flange modeled as a 3D solid with an AI-written parametric AutoLISP loop and one boolean subtraction. ~20 seconds, 12 tool calls.
Complete 2D drawing, drawn by Claude | 3D solids with booleans | Clean render for AI vision |
|
|
|
Why this exists
Every other MCP server for a professional DWG CAD (multiCAD-mcp, autocad-mcp, CAD-MCP, ...) talks to the CAD through Windows COM — none of them can run on Linux, and none of them does real 3D.
BricsCAD is the professional DWG CAD that does run natively on Linux. This server drives it through a mechanism that needs no API at all: an AutoLISP file bridge. The MCP server writes LISP expressions to a file, triggers a tiny MCP command inside the CAD, and reads the result back. That's the whole trick — and it unlocks everything the CAD can do, including 3D solid modeling.
Because the bridge is plain AutoLISP + standard DXF entmake + AutoCAD-compatible commands, it is portable by construction: AutoCAD, ARES Commander (also Linux-native!), ZWCAD, GstarCAD and the IntelliCAD family all speak the same language. Porting means swapping the autoload file name and the keystroke trigger — adapters welcome.
MCP client (Claude, Cursor, ...) BricsCAD (Linux)
│ │
▼ ▼
server.py (FastMCP, 105 tools) c:MCP AutoLISP command
│ writes LISP ──► /tmp/mcp_bricscad.in
│ triggers via xdotool ──► reads, evals line by line
│ reads result ◄── /tmp/mcp_bricscad.outRelated MCP server: AutoCAD MCP Server - Codex Edition
What it can do
Full 2D drafting — lines/arcs/polylines/splines, real HATCH (with islands), dimensions incl. radius/diameter/angular, leaders, linetypes (chain/hidden), text styles, trim/extend/fillet/chamfer/offset/mirror/arrays, blocks
Semantic shapes —
slot,bolt_circle,rounded_rect,polygon,center_mark: one call, the server does the math3D solid modeling — box/cylinder/sphere/cone/wedge/torus, extrude/revolve/sweep, union/subtract/intersect, slice, fillet/chamfer on solid edges, 3D move/rotate around any axis — and
flatshot_view: auto-generate correct 2D drawing views from the 3D modelBatch & atomic —
draw_batchexecutes N operations in one round-trip, wrapped in one undo group (one batch = one Ctrl+Z)Talk about what the user selected —
get_selectionreads the GUI pickfirst set;select_by/select_windowhighlight what the AI found before acting; modify tools accept"selection"Verification without screenshots — bounding boxes, key points, exact lengths/areas, intersection checks (collision detection), solid volume/centroid
Eyes when needed —
render_view: BricsCAD's internal PNG render (clean, no UI, ~30 KB) for vision modelsDeliverables — save DWG, export DXF, PDF and STL (
export_stl: 3D solids straight to the slicer, parked on the origin)Escape hatch —
run_lispevaluates arbitrary AutoLISP (multi-line, multi-expression): capable models write parametric code and love it
Full reference: docs/TOOLS.md · How it works: docs/ARCHITECTURE.md
Measured, not promised
Metric | Result |
Tool calls for a complete dimensioned flange | 200 → 22 (9× fewer round-trips vs primitive-per-call) |
Trigger latency | 0.25 s per call |
Error reporting | per-line LISP errors ( |
Exactness |
|
Details and model-behavior notes (Sonnet writes parametric LISP, Haiku uses typed tools): docs/BENCHMARKS.md
Tests
BRICS_DISPLAY=:0 python tests/test_tools.py # 49 checks, ~2 min
python tests/test_tools.py 3d edges export # or just some groups
python tests/test_tools.py --listAn integration suite: it drives the CAD you already have running, then measures what came out — closed-form volumes, bounding boxes, the value stored inside a dimension, triangle counts read out of the STL. Never "no error".
That distinction is the whole point. The bridge answers OK whenever the CAD
accepted the command, which is not the same as the CAD having done what was
asked. Every bug found so far was of that shape: the classic CHAMFER silently
switching to all edges, edge picking swallowing the whole part from a wide
zoom, and — the one that reached a release — running object snap dragging
programmatic coordinates onto nearby geometry, so five blocks placed in a row
each landed on the previous. A volume, a bounding box and a measured dimension
are exact signatures: all three surfaced as arithmetic that did not add up.
The suite draws in a scratch region (x ≥ 50000), erases it afterwards, and
fails if the entity count does not come back to where it started. It still works
in the active drawing, so point it at a scratch one.
Usage telemetry (local only)
With 105 tools, the interesting question is which ones earn their place — and
which fail often enough to signal a docstring or design problem. The server
appends one JSON line per call to ~/.lambdacad/usage.jsonl:
{"t": 1786526823.4, "tool": "draw_batch", "ms": 198, "err": 0}Tool name, duration, error flag. Never the arguments — no coordinates, no
paths, no drawing data — and nothing ever leaves your machine. Disable with
LAMBDACAD_TELEMETRY=0.
python scripts/usage_report.py # per-tool calls, error rate, p50
python scripts/usage_report.py --core 95 # smallest set covering 95% of calls
python scripts/usage_report.py --reset # archive the current logThe --core output is a data-driven candidate for CORE_TOOLS (compact mode):
after a few weeks of real use, the choice of which tools deserve a place in a
schema-limited client stops being a guess. Early signal from the integration
suite itself: run_lisp alone is ~half of all calls — on clients that load
schemas on demand (Claude Code's tool search), the long tail of typed tools
costs nothing until used, so the rich docstrings stay.
Quick start
Requirements: Linux, BricsCAD (any recent version — tested on V26), Python 3.10+, xdotool.
git clone https://github.com/Psalmustrack/lambdacad-mcp
cd lambdacad-mcp
./install.shThe installer creates a venv, installs the AutoLISP bridge into BricsCAD's Support/on_doc_load.lsp (idempotent, marker-delimited), and prints ready-to-paste config for Claude Code / Claude Desktop.
Then:
Start BricsCAD and open a drawing (the bridge loads when a document opens).
Start a new AI session — the
bricscadtools appear.Ask: "draw the plan of a 4×3 m room with a door and dimensions".
Configuration (env vars)
Variable | Default | Purpose |
| session | X display where BricsCAD runs (e.g. |
| off |
|
|
| bridge file paths |
Security note
run_lisp and run_command execute arbitrary code inside BricsCAD by design — that's what makes the server fully general. Only connect MCP clients you trust, and treat the bridge files as trusted input. The bridge itself never loads foreign files (read+eval only) and honors BricsCAD's SECURELOAD.
Troubleshooting
Symptom | Fix |
| Is BricsCAD running on |
| Is a drawing open (not the Start page)? The bridge loads on document open. |
Commands typed into the drawing as text | Click once inside the drawing area so the command line has focus, then retry. |
Wayland | Works via XWayland; if your compositor struggles with heavy CAD redraws, run BricsCAD under a nested X server (Xephyr) and set |
Related projects
Project | CAD | Platform | 3D |
λ lambdacad-mcp (this) | any AutoLISP CAD — BricsCAD reference | Linux | yes |
AutoCAD/BricsCAD/ZWCAD via COM | Windows | no | |
AutoCAD LT (LISP bridge) | Windows | no | |
AutoCAD LT | Windows | no | |
freecad-mcp (various) | FreeCAD | cross-platform | yes (FreeCAD) |
Credit where due: multiCAD-mcp inspired the project; puran-water/autocad-mcp independently validated the LISP-bridge approach on Windows.
Roadmap
Focus-free dispatch (targeted X synthetic events — no window activation)
In-process socket bridge (no keystroke trigger, ~0 latency)
VIEWBASE paper-space drawing views; sheet metal (
SMUNFOLD) and BIM commandsCompact-mode behavioral benchmark
License
Apache 2.0 — with an explicit patent grant and trademark protection for the lambdacad-mcp name.
Trademarks
AutoCAD® and AutoLISP® are registered trademarks of Autodesk, Inc. BricsCAD® is a registered trademark of Bricsys NV (Hexagon). ARES Commander®, ZWCAD® and all other CAD product names mentioned are trademarks of their respective owners, used here only to identify compatibility. This project is independent open-source software: it is not affiliated with, endorsed or sponsored by Autodesk, Bricsys, or any CAD vendor.
Maintenance
Related MCP Servers
- Flicense-qualityCmaintenanceAn MCP server that bridges Claude with AutoCAD, enabling to generate architectural floor plans, draw geometry, and export DXF files just by describing what you need in natural language.
- AlicenseAqualityAmaintenanceMCP server for full AutoCAD automation, AutoCAD LT automation, and headless DXF generation. It provides 8 consolidated tools for drawing, entity, layer, block, annotation, P&ID, view, and system operations via MCP stdio transport.123MIT
- Alicense-qualityBmaintenanceAn MCP server for read-only inspection of AutoCAD DWG files, enabling AI agents to open drawings, query objects by handle or filter, and explore properties and references.6GPL 3.0
- Flicense-qualityCmaintenanceAn MCP server that drives SolidWorks 2023+ on Windows, exposing CAD operations like sketching, extrusions, assemblies, and exports through tools for AI assistants like Kimi and Claude.
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for Wan AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Psalmustrack/lambdacad-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server


