Track H's foundation, landed on main before its three groups branch. - engineering/understand/snapshot.py: one bulk read of a drawing into frozen WCS records (OCS translated through backends/ocs.py, text decoded, an INSERT boxed by its block geometry without its attribute texts). A DXF is read with ezdxf after the size check; the headless engine's document is read under its own lock; the live engine exports the active document with Document.Export(<tmp>/snap, "DXF", <set of all>) - never renamed, deleted afterwards - and a DWG is opened read-only, exported and closed. Measured on AutoCAD 2026: ".dxf" is refused with Invalid argument, the file lands as snap.DXF, model space, paper space and unused block definitions all reach it, and the selection set does not narrow a DXF export. - engineering/understand/labels.py: %%c, \U+2205, the U+2300 sign, o-stroke and MTEXT format runs all read as one diameter spelling; sizes are kept as drawn and never equated; Cyrillic look-alike capitals fold into Latin tags; panels, wiring callouts and electrical data (kW, phases, volts, N, VFD) in EN / TR / RU / NL / DE. A power that is not written stays None. - engineering/understand/vocab.py: layer classification with a confidence and the deciding keyword, supply / return words, room labels and block kinds in five languages. A CIP layer without a direction word is not guessed. - MAX_DXF_BYTES defaults to 512 MB (a real layout was 188 MB); the refusal names the size and the variable. New `office` extra (openpyxl), also in `full`; uv.lock regenerated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
99 lines
4.3 KiB
Bash
99 lines
4.3 KiB
Bash
# AutoCAD MCP Pro — Environment Variables
|
|
|
|
# Rendering (view_screenshot / drawing_export_pdf) is an install-time choice,
|
|
# not an env var — the core install cannot render at all. ezdxf's drawing
|
|
# add-on imports Pillow unconditionally, so every render path needs it:
|
|
# pip install "autocad-mcp-pro[pdf]" ezdxf backend, matplotlib renderer
|
|
# (also pulls Pillow in transitively)
|
|
# pip install "autocad-mcp-pro[com]" live AutoCAD Win32 window capture
|
|
# pip install "autocad-mcp-pro[full]" both
|
|
# With only [com] the ezdxf backend still cannot render (no matplotlib).
|
|
|
|
# Backend selection: auto | com | ezdxf
|
|
AUTOCAD_MCP_BACKEND=auto
|
|
|
|
# COM ProgID the live backend attaches to. Escape hatch for AutoCAD-compatible
|
|
# applications that expose the same ActiveX object model.
|
|
#
|
|
# CAD_PROGID only changes which COM application the backend attaches to — every
|
|
# tool beyond the connection itself is developed and tested against AutoCAD
|
|
# alone, and AutoCAD-clone compatibility is unverified, so treat a non-default
|
|
# ProgID as experimental. An unrecognised ProgID fails loudly rather than
|
|
# falling back to AutoCAD, because the fallback would launch the very
|
|
# application you said you were not using.
|
|
#
|
|
# Candidates below are UNVERIFIED — none was tested against a running seat.
|
|
# List what is actually registered on your machine with:
|
|
# Get-ChildItem Registry::HKEY_CLASSES_ROOT |
|
|
# Where-Object { $_.PSChildName -like '*.Application*' } |
|
|
# Select-Object -Expand PSChildName
|
|
# CAD_PROGID=BricscadApp.AcadApplication # UNVERIFIED
|
|
# CAD_PROGID=ZWCAD.Application # UNVERIFIED
|
|
# CAD_PROGID=GstarCAD.Application # UNVERIFIED
|
|
CAD_PROGID=AutoCAD.Application
|
|
|
|
# Comma-separated list of allowed directories for file operations.
|
|
# Leave empty to allow all paths (not recommended for production).
|
|
# Example: ALLOWED_PATHS=C:\Drawings,D:\Projects\CAD
|
|
ALLOWED_PATHS=
|
|
|
|
# Maximum undo stack size (number of snapshots to keep). The code's default is
|
|
# 5; this file used to say 50, which was a documentation-only disagreement.
|
|
MAX_UNDO_STACK=5
|
|
|
|
# Logging level: DEBUG | INFO | WARNING | ERROR
|
|
LOG_LEVEL=INFO
|
|
|
|
# Enable dangerous AutoCAD commands (ERASE ALL, QUIT, etc.)
|
|
# Set to true only if you trust all MCP clients
|
|
DANGEROUS_COMMANDS_ENABLED=false
|
|
|
|
# Exposed tool profile: full (default) | lean
|
|
# lean is a curated ~47-tool drafting/inspection set for clients with tight
|
|
# tool caps. The "core" profile was removed in v1.5.0 — the discovery layer
|
|
# below solves the crowded-surface problem it existed for. TOOL_PROFILE=core
|
|
# still boots, falling back to full with a warning.
|
|
TOOL_PROFILE=full
|
|
|
|
# Tool packs: all (default) | comma list of core,pid,settings — advertise only the
|
|
# vertical packs this client uses. core is always on.
|
|
TOOL_PACKS=all
|
|
|
|
# Tool discovery: off (default) | search
|
|
# "search" replaces the advertised catalog with search_tools + call_tool, so a
|
|
# client sees two tools instead of ~126 and searches by AutoCAD command name
|
|
# ("QSELECT") or plain English ("round off this corner").
|
|
DISCOVERY_MODE=off
|
|
|
|
# Per-call backend timeouts in seconds; 0 disables the check.
|
|
# A hung call would otherwise hold the backend lock forever.
|
|
COM_CALL_TIMEOUT=60
|
|
EZDXF_CALL_TIMEOUT=120
|
|
|
|
# Undo/redo history for the headless backend, in steps. 0 disables it.
|
|
# Not free: ezdxf has no journal, so each step is a full DXF snapshot.
|
|
# Measured 37x slower entity creation with it on (0.18 -> 6.65 ms/call),
|
|
# and a snapshot of a 5000-entity drawing costs 130 ms / 658 KB. For a
|
|
# single checkpoint use transaction_begin/rollback instead.
|
|
# The live COM backend uses AutoCAD's own undo and ignores this.
|
|
EZDXF_UNDO_DEPTH=0
|
|
|
|
# Opt-in 3D solids (COM backend only; ezdxf reports them as unsupported)
|
|
ENABLE_3D=false
|
|
|
|
# --- Limits and remote access -------------------------------------------------
|
|
# These four are read by config.py but were missing from this file, which made
|
|
# it look like the complete list. Two of them are the remote-HTTP controls.
|
|
|
|
# Reject DXF input larger than this many bytes (512 MB). 0 disables the check.
|
|
MAX_DXF_BYTES=536870912
|
|
|
|
# Upper bound on list/selection response sizes.
|
|
MAX_LIST_LIMIT=5000
|
|
|
|
# Permit a non-loopback HTTP bind. Requires MCP_AUTH_TOKEN as well.
|
|
ALLOW_REMOTE_HTTP=false
|
|
|
|
# Bearer token required for remote HTTP. No default; remote binds refuse without it.
|
|
MCP_AUTH_TOKEN=
|