lambdacad-mcp
MCP server that lets AI draw in AutoLISP-capable CAD (reference BricsCAD on Linux) via a file bridge, enabling 2D drafting, 3D solid modeling, and verification with 100 tools.
README
λ 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, 100 tools) c:MCP AutoLISP command
│ writes LISP ──► /tmp/mcp_bricscad.in
│ triggers via xdotool ──► reads, evals line by line
│ reads result ◄── /tmp/mcp_bricscad.out
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 math - 3D solid modeling — box/cylinder/sphere/cone/wedge/torus, extrude/revolve/sweep, union/subtract/intersect, slice — and
flatshot_view: auto-generate correct 2D drawing views from the 3D model - Batch & 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 models - Deliverables — save DWG, export DXF and PDF
- 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 (msg=L2: ...) → models self-correct without screenshots |
| Exactness | entity_length on an r=20 circle: 125.664 / 1256.637 (2πr, πr² exact) |
Details and model-behavior notes (Sonnet writes parametric LISP, Haiku uses typed tools): docs/BENCHMARKS.md
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.sh
The 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 |
|---|---|---|
BRICS_DISPLAY |
session $DISPLAY |
X display where BricsCAD runs (e.g. :77 for a nested Xephyr) |
BRICS_COMPACT |
off | 1 = expose only 14 essential tools (~1k schema tokens instead of ~7k) for clients that inject every schema |
BRICS_MCP_IN / BRICS_MCP_OUT |
/tmp/mcp_bricscad.{in,out} |
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 |
|---|---|
ERR: BricsCAD window not found |
Is BricsCAD running on BRICS_DISPLAY? |
ERR: no response from BricsCAD |
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 BRICS_DISPLAY. |
Related projects
| Project | CAD | Platform | 3D |
|---|---|---|---|
| λ lambdacad-mcp (this) | any AutoLISP CAD — BricsCAD reference | Linux | yes |
| multiCAD-mcp | AutoCAD/BricsCAD/ZWCAD via COM | Windows | no |
| puran-water/autocad-mcp | AutoCAD LT (LISP bridge) | Windows | no |
| hvkshetry/autocad-mcp | 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 commands - Compact-mode behavioral benchmark
License
Apache 2.0 — with an explicit patent grant and trademark protection for the lambdacad-mcp name.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。


