Skip to main content
Glama
autocad-arch-mcp

autocad-arch-mcp

by Crazay247

autocad-arch-mcp

Architectural MCP for AutoCAD 2021 + YQArch (NBC Standard) — hybrid dotnet + file_ipc + com + ezdxf.

Spec: docs/superpowers/specs/2026-08-24-autocad-arch-mcp-design.md
Knowledge: knowledge/master_knowledge.md + knowledge/*.json|yaml

Prereqs

  • Windows 10/11, AutoCAD 2021 Full (R24.0) at D:\SOFTWARES\Autocad 2021\AutoCAD 2021\

  • YQArch at D:\SOFTWARES\YQArch (or C:\Autodesk\...YQArch)

  • Python 3.10+ Windows native, uv (install)

Related MCP server: autocad-mcp

Install

cd "D:\6) Obsidian\AI Workspace\Tools\autocad-arch-mcp"
uv sync

Load in AutoCAD

  1. APPLOAD → lisp-code/mcp_arch_dispatch.lsp → === MCP Arch Dispatch v1 loaded ===

  2. NETLOAD → dotnet/AutocadArch.dll

  3. Add both to Startup Suite.

MCP config (opencode)

See spec §8 autocad-arch snippet.

Knowledge

Run uv run python -c "import json, jsonschema; ..." to validate. Phase -1 gate: knowledge/yqarch_compat_matrix.csv must be produced before wrappers.

Dev

uv run pytest tests/ -v
uv run pytest -m "not e2e" -v

Available Tools

14 tools
hama_goldA

Hama gold teaching — every-run retrieval of construction perfection.

operations:

  • retrieve: data {intent: str, k: int=3} -> top-k gold exemplars (BARAL municipal + Hama A001/A020) via cosine similarity

  • similarity: data {features: dict, gold_id: str="hama_A001"} -> 0-100 vs Hama

  • extract: data {} -> extract current drawing features via ezdxf (layers, dims, hatches, viewports) for scoring

  • score: data {features: dict} -> composite Hama 0.5validator +0.3vision+0.2*sim

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_blockC

Block ops: list/insert/define/get_attributes/update_attribute.

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_decorC

Decor — hatches, fills, symbols, furnishing blocks (YQArch bg/xf).

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_dimensionC

Dimensions — linear/aligned/angular/radius/leader with NBC ArchTick 45° DIMTAD 1.

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_drawingC

Drawing management: create/open/save/info/purge/plot_pdf/get_variables/setup_nbc_standards.

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_entityC

Generic entity ops: create_line/circle/polyline/rectangle/arc/ellipse/mtext/hatch/list/count/get/erase/copy/move/rotate/scale/mirror/offset/array/fillet/chamfer.

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_generateC

Generate any Hama-level drawing: plan 1:100, section 1:20, detail 1:5, schedule, site 1:200.

operation: drawing_type e.g., plan, section, detail, schedule, site, elevation, wall_detail data: {scale: "1:100"/"1:5"/"1:20", building: [WxH], grid_x, grid_y, walls, title, detail_type, kind, building, etc}

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_layerC

Layer ops: list/create/set_current/set_properties/freeze/thaw/lock/unlock.

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_openingC

Opening — doors/windows (YQArch ad/aw) with NBC door width gate.

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_sectionC

Section — cut lines, section views (generates 1:50/1:20 sections).

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_stairC

Stair (YQArch ltj / fallback geometry) — tread/riser validated via 2R+T [600,650].

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_systemB

System — status/undo/redo/purge/plot_pdf/execute_lisp/get_variables (ALLOW_RCE gate).

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_viewB

View — zoom_extents/zoom_window + screenshot (canvas-only if available).

Inputs: operation (required), data, include_screenshot. Returns: result

nbc_wallC

Wall operations (YQArch ww) — create/list with NBC thickness gate.

Inputs: operation (required), data, include_screenshot. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 14 tools

    Disambiguation3/5

    Most nbc_* tools map cleanly to a specific resource, but nbc_drawing and nbc_system both claim purge/plot_pdf/get_variables, making those operations ambiguous. nbc_generate also overlaps conceptually with nbc_drawing's create operation, adding selection risk.

    Naming Consistency4/5

    The nbc_<domain> prefix dominates and all names use consistent snake_case, so the overall pattern is predictable. hama_gold and nbc_generate break the pattern, with nbc_generate being an action rather than a resource name.

    Tool Count4/5

    14 tools is within the ideal range and each major architectural resource area has a dedicated tool. The redundancy between nbc_drawing and nbc_system plus the loosely related hama_gold toolkit makes it slightly heavier than strictly necessary.

    Completeness4/5

    The tool surface covers drawing management, architectural elements, dimensions, sections, layers, blocks, views, PDF output, and full drawing generation. Wall/opening updates and deletions are not first-class, but generic entity operations and execute_lisp provide workarounds.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables controlling CAD software (AutoCAD, GstarCAD, ZWCAD) through natural language instructions, allowing users to create and modify drawings without manually operating the CAD interface.
      683
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects Claude AI to AutoCAD for architectural design, enabling natural language to execute 684 commands. Automates drawing creation and editing through the Model Context Protocol.
      38 npm
      8
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables architectural modeling and automation in AutoCAD 2021 through YQArch integration, using hybrid MCP protocols to perform design tasks and manage CAD operations.
      MIT