Skip to main content
Glama
BricsCAD MCP

BricsCAD MCP

by alesdev88

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
UV_SYSTEM_CERTSNoSet to `1` to make uv use the system's certificates, needed on networks that inspect HTTPS traffic so the first start doesn't fail with `invalid peer certificate: UnknownIssuer`. Not needed for the Claude Desktop bundle.
BRICSCAD_VERSIONNoThe version of BricsCAD to start, for example `26`. Defaults to the newest installed version.
BRICSCAD_EXECUTABLENoFull path to the BricsCAD executable, if it isn't found automatically (for example when the Linux install location is unverified).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Controls one BricsCAD process through a LISP listener. Call bricscad_start first. The BricsCAD window it opens is occupied while the listener runs.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
bricscad_audit_reportA

Report empty layers, unused blocks, missing xrefs, entities not at zero elevation, and off-standard layer names.

Each section has a total count and up to sample_limit items. Blocks and layers used only inside other blocks count as used, and a dynamic block counts as used through its anonymous states. Layers 0 and Defpoints are never reported.

allowed_layers: name patterns such as ["A-", "S-"], ignoring case. Leave it out to skip this check.

bricscad_open_drawingA

Open a DWG or DXF and make it the current drawing. Returns the same details as bricscad_drawing_info.

path: full path to the file. read_only: true by default, so the file cannot be overwritten by accident. timeout: seconds to wait. Large drawings can take a while to open.

bricscad_close_drawingA

Close the current drawing. Refuses if it has unsaved changes.

discard: true closes it anyway and loses the unsaved changes.

bricscad_drawing_infoA

Describe the current drawing: name, path, read-only and modified state, units, limits, entity count and layouts.

extents and limits describe current_layout only, which may be a sheet rather than the model.

bricscad_list_layersB

List layers with their on, frozen and locked state, color, linetype and entity count. Up to 2000 per call.

bricscad_list_blocksB

List block definitions with insert counts, including nested inserts and inserts of dynamic blocks. Up to 2000 per call.

include_anonymous: also list the anonymous blocks, such as *U12, that hold a dynamic block's states.

bricscad_list_xrefsB

List external references with their stored path and whether the file was found. Up to 2000 per call.

bricscad_list_layoutsC

List Model and the paper space layouts with their entity counts. Up to 2000 per call.

bricscad_query_entitiesA

Find entities in the current drawing. Returns handle, type, layer, layout and bounding box. Up to 2000 per call.

types: DXF names such as ["LINE", "CIRCLE"]. layer, block: names, which may use the wildcards * and ?. A dynamic block goes by its own name. bbox: [min_x, min_y, max_x, max_y]; entities overlapping it match. layout: "Model" or a layout name.

An entity with no extent, such as an insert of an empty block, returns a null bounding box.

bricscad_get_entityA

Return one entity's type, layer and all its DXF group codes, as [code, value] pairs.

bricscad_read_attributesA

Read attribute values from block inserts, for example title block contents. Up to 2000 per call.

block: a block name, which may use the wildcards * and ?. A dynamic block goes by its own name. layout: "Model" or a layout name.

bricscad_find_textC

Search TEXT, MTEXT, MULTILEADER, table cell and block attribute text for literal text.

A table cell comes back with its table's handle and position, plus its row and column. Up to 2000 per call.

bricscad_undoA

Undo the last edits to the current drawing. Returns how many steps were undone.

One step is one successful edit tool call. Edits made through bricscad_run_lisp have no step of their own, so they go back with the step before them. steps: how many steps to undo, from 1 to 100. It stops at the oldest step.

bricscad_erase_entitiesB

Erase entities by handle. Erases all of them or none. bricscad_undo restores them.

Refuses entities on locked layers and attributes, which belong to their block insert.

bricscad_set_layerA

Create a layer, or change one that exists. Only the values you give are changed.

new_name: rename the layer. Layers 0 and Defpoints cannot be renamed. color: a color number from 1 to 255. linetype: loaded from iso.lin if the drawing does not have it yet. on, frozen, locked: true or false. The current layer cannot be frozen.

bricscad_modify_entitiesA

Change entities by handle. Changes all of them or none, and refuses locked layers.

move: a displacement, [dx, dy] or [dx, dy, dz]. rotate: {"angle": degrees, "base": point}. scale: {"factor": number above 0, "base": point}. layer: an existing layer. color: 0 by block, 1 to 255, or 256 by layer. linetype: loaded from iso.lin if the drawing does not have it yet. text: new text for TEXT, MTEXT or MULTILEADER. Change attributes with bricscad_set_attributes. MTEXT and MULTILEADER text takes format codes, where \P is a line break. Write a literal backslash or brace as \, { or }.

bricscad_set_attributesA

Set attribute values on block inserts, such as a title block. Changes all of them or none.

updates: [{"handle": insert handle, "values": {tag: text}}]. Get handles and tags from bricscad_read_attributes. Tags match whatever their case.

bricscad_create_entitiesA

Draw entities and return their handles. Draws all of them or none, as one undo step.

entities: up to 2000 items, each with a type and an optional layer, which must exist. Points are [x, y] or [x, y, z]. Angles are degrees. layout: a sheet name. The default is the model, whichever tab is current. MTEXT takes format codes, where \P is a line break. Write a literal backslash or brace as \, { or }.

bricscad_save_drawingA

Save the current drawing. Returns the same details as bricscad_drawing_info.

path: a new .dwg path. The drawing then continues under that name, and is no longer read-only. Leave it out to save over the open file, which needs overwrite=true. overwrite: true allows replacing an existing file. BricsCAD leaves a .bak beside it. A read-only drawing cannot be saved over its own file, and a file open as another drawing cannot be replaced.

bricscad_export_dxfA

Write the current drawing as a DXF file. The drawing keeps its name and state.

path: a .dxf file in an existing folder. It cannot be an open drawing. version: DXF version, R12 or 2000 to 2018. overwrite: true allows replacing an existing file. It is replaced only once the new one is complete.

bricscad_plot_pdfA

Plot one layout of the current drawing to a PDF file, with Print As PDF.pc3. The drawing is not changed.

path: a .pdf file in an existing folder. layout: "Model" or a sheet name. Defaults to the current layout. paper: BricsCAD's paper name, such as "ISO A3 (297.00 x 420.00 MM)". Defaults to the layout's current size. landscape: true or false. Defaults to the layout's current orientation. area: "extents", "layout" (sheets only) or "window". Defaults to extents for the model and layout for sheets. window: [x1, y1, x2, y2] in drawing units, with area="window". scale: "fit", or plotted millimetres to drawing units such as "1:100". Defaults to fit for the model and 1:1 for sheets. style_table: a plot style table such as "monochrome.ctb". Defaults to the layout's own. overwrite: true allows replacing an existing file. It is replaced only once the new one is complete.

bricscad_preview_imageA

Return a PNG of the current drawing, to check work by eye. The drawing is not changed.

layout: "Model" or a sheet name. Defaults to the current layout. The whole layout is shown. window: [x1, y1, x2, y2] in drawing units, to show only that area. The image is the size of the BricsCAD window. The model shows on black, as on screen.

bricscad_batch_runA

Run one job on many drawings, one at a time, and report a result per file. Try dry_run first.

job: {"type": ...} with its options. audit and find_text write nothing. export_dxf, plot_pdf (layout "*" plots every sheet to -.pdf), save_as and lisp with save=true write .dxf, .pdf or .dwg into output_folder. lisp runs code in each drawing and returns its value. files or folder: the drawings, up to 500. folder takes a glob pattern, and recursive for subfolders. Sources open read-only. A source is replaced only when output_folder is its own folder and overwrite=true. Drawings already open in BricsCAD are refused. timeout: seconds per file. A timeout stops the batch, since a dialog may be blocking BricsCAD. Afterwards the current drawing may be another open drawing.

bricscad_list_versionsA

List the BricsCAD versions installed on this computer, newest first.

bricscad_startA

Start BricsCAD in its own window and connect to it. Refuses if that version is already running.

version: for example "26". Defaults to BRICSCAD_VERSION, then the newest installed.

bricscad_stopA

Close the BricsCAD this server started. Refuses if drawings have unsaved changes.

discard: true closes it anyway and loses the unsaved changes.

bricscad_statusA

Report whether BricsCAD is running, how recently its listener reported, and the current drawing.

bricscad_run_lispA

Run LISP in BricsCAD and return the value of its last expression.

LISP can change or delete files and start programs, so use a dedicated tool where one exists. Do not use vla-save or vla-saveas: they open a dialog or fail. Use _.QSAVE or _.SAVEAS. Do not close the only open drawing: the listener stops.

code: one or more LISP expressions. timeout: seconds to wait for an answer.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 28 tools

Disambiguation4/5

Most tools map cleanly to a distinct resource+action (create_entities vs modify_entities vs erase_entities, read_attributes vs set_attributes). A few pairs overlap in intent: drawing_info vs status both describe the current drawing, and save_drawing vs export_dxf both write files, though the descriptions do clarify the difference.

Naming Consistency4/5

Nearly all 28 tools follow a bricscad_ prefix with snake_case verb_noun (list_layers, create_entities, plot_pdf, save_drawing); bare verbs like undo/start/stop are reasonable. Minor deviations are the noun-phrase queries drawing_info, audit_report and status, which break the verb-first pattern.

Tool Count3/5

At 28 tools this is on the heavy side of the 3-15 ideal band. Each tool covers genuinely distinct CAD functionality (entity read/write, layers, blocks, xrefs, plotting, batch, lifecycle), so the count is defensible for a full CAD package, but it is still borderline bloated.

Completeness4/5

Strong coverage of the domain: drawing lifecycle (open/save/close/export), entity read and write, layers, block attributes, plotting, batch processing, plus run_lisp as an escape hatch. Gaps remain for xref attach/detach (only list_xrefs), block definition creation/editing, and layer deletion, but these are workaroundable via LISP.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues