
Lambdacad Mcp
io.github.Psalmustrack由 GitHub 账号 Psalmustrack 发布v1.3.0更新于 Oct 24, 2026
AI drafting, design review and a drawing memory in BricsCAD on Linux: 128 tools, pure AutoLISP
概览
在 Linux 上驱动 BricsCAD(或任何支持 AutoLISP 的 CAD),让助手绘制二维图纸、建立三维实体、做设计审查并导出 DWG、DXF、PDF 与 STL。
- 可以做什么
- 绘制与编辑二维几何:直线、圆弧、多段线、样条、填充、标注、引线、图块、修剪延伸倒角,以及槽、螺栓圆等语义图形
- 建立并组合三维实体:基本体、拉伸/旋转/扫掠、布尔运算、剖切、实体边倒角,并从模型生成二维视图
- 审查设计:带校验的布尔运算、悬垂与接触报告、孔位探测、几何连通图、包围盒与精确测量
- 处理选择集与批处理:读取界面选择、高亮实体、把多步操作合并为一个撤销组
- 管理图纸与交付物:图幅、按比例视口、标题栏、PDF 导出、DWG/DXF/STL 导出、多文档切换
- 维护图纸记忆:记录编辑日志、为实体打语义标签并报告变化,另可渲染 PNG 视图并执行任意 AutoLISP
- 适用场景
- 当你希望在 Linux 上让 AI 助手产出或检查真实的 CAD 图纸与三维模型,而基于 COM 的 AutoCAD 服务器无法运行时适用。适合在运行中的 BricsCAD 会话里做制图、参数化建模、图纸排版和工程式设计审查。
- 运行要求
- 本机 Linux 进程,需运行 BricsCAD(在 V26 上测试)并打开一张图纸,另需 Python 3.10+ 与 xdotool;安装脚本会把 AutoLISP 桥接写入 BricsCAD 的 on_doc_load.lsp。可选环境变量:BRICS_DISPLAY、BRICS_COMPACT、BRICS_MCP_IN、BRICS_MCP_OUT、LAMBDACAD_TELEMETRY。
安装
在 SourceWeft 中
- 打开 控制台中的 Lambdacad Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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.
[License: Apache 2.0] [Platform: Linux] [Python 3.10+] [Tools: 128] [MCP Registry] [Glama score] [lambdacad-mcp MCP server]
"Draw a DN80 flange: front view, hatched section, dimensions — then model it in 3D."
[lambdacad-mcp demo: AI draws a complete flange in BricsCAD, 2D + 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.
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.
What it can do
- Full 2D drafting — lines/arcs/polylines/splines, line weights per layer (0.50 walls / 0.35 edges / 0.18 dimensions — measured on the plotted page, not just set), 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, fillet/chamfer on solid edges, 3D move/rotate around any axis — 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
- Design review — tools that answer an engineering question, not just run a command (new in 1.2) —
boolean_verifiedcuts and measures the change against the volume you expected (a cut that lands short reads SHORT, not success);overhang_reportreads the STL mesh and says whether a part prints without supports, scoring all six orientations;contact_reportover an assembly (assembly_place/assembly_list/assembly_clear) says who touches whom, who interferes, and who is an orphan — a part touching nothing, because its job was superseded and nobody noticed;hole_reportphysically probes every hole and says which are actually open (a drawing lies about its holes until something checks);graph_build/graph_traceread the 2D geometry as a connectivity graph — separate networks, exact run lengths, and the open ends that are real breaks vs T-junctions, with the joining tolerance emerging from the drawing instead of hardcoded - The drawing REMEMBERS (new in 1.3, beta) —
memory_enableputs a journal beside the .dwg that the CAD writes by itself, catching the edits the human makes in the GUI while no tool is running;tag_entitygives entities semantic roles ("muro-nord", "asta-principale") keyed to handles, which survive save and reopen;world_reportanswers what is here, what did I call it, what changed since I last looked — and revalidates every claim against the live drawing before answering (an entity erased behind the AI's back readsDEAD (erased since tagging), reported, never hidden). The next prompt — or the next session — starts knowing the drawing instead of re-surveying it - Instructions in the protocol (new in 1.2) — the server ships the rules that cannot be learned by trying (OK is not evidence; calibrate before trusting; booleans keep the first handle; one line is one complete expression; consult the drawing's memory first), plus a
lambdacad://trapsresource that costs nothing until read - Eyes when needed —
render_view: BricsCAD's internal PNG render (clean, no UI, ~30 KB) for vision models - Sheets, at a real scale —
create_sheet(A4…A0, margins zeroed so paper mm = sheet mm),add_viewport(ask for 1:50 and it is 1:50 — measured back off the entity, and parked on a non-plotting layer),fit_viewport(measures what is drawn and picks the largest STANDARD scale that fits — 1:37 is not a scale),title_block(border + ISO 7200 cartouche, sized from the sheet),export_sheet_pdf, which checks its own work by measuring the page of the PDF it just wrote - Deliverables — save DWG, export DXF, PDF and STL (
export_stl: 3D solids straight to the slicer, parked on the origin) - Several drawings open —
list_documentsshows which one the tools are pointing at (plus unsaved changes and read-only),use_documentpicks another; every reply says which drawing answered, and warns when it changes underfoot - 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
Details and model-behavior notes (Sonnet writes parametric LISP, Haiku uses typed tools): docs/BENCHMARKS.md
Tests
An 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; a layout that plots rotated 90°, so an A3 landscape
sheet comes out portrait, the drawing falls off the paper and the export writes
a perfectly valid, entirely empty page; 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, a measured dimension and the page of a PDF are exact signatures: every one
of those 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 128 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:
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.
The --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.
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)
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
Related projects
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.
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.
来源:README.md,提交 454c804
工具
0版本历史
1- v1.3.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分