Headless CAD engine & MCP server for 2D/3D drafting, solids, DXF/SVG export, and automation.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Creates or configures CAD layers with custom colors (hex), linetypes (Continuous, Hidden, Center, Phantom), and lineweights (0.18, 0.25, 0.35, 0.50, etc.).
List of layer definitions to create
This tool isn't marked read-only, so it may change something on the server or in an account you connected.
Creates or configures CAD layers with custom colors (hex), linetypes (Continuous, Hidden, Center, Phantom), and lineweights (0.18, 0.25, 0.35, 0.50, etc.).
| Argument | Type | Description |
|---|---|---|
| layers* | array | List of layer definitions to create |
{
"type": "object",
"required": [
"layers"
],
"properties": {
"layers": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"color": {
"type": "string",
"description": "Hex color or ACI index e.g. \"#ff0000\" or \"#00ffff\""
},
"linetype": {
"type": "string",
"description": "Continuous, Hidden, Center, Phantom"
},
"lineweight": {
"type": "string",
"description": "e.g. \"0.25\", \"0.50\""
}
}
},
"description": "List of layer definitions to create"
}
}
}Fast batch insertion of multiple CAD entities (LINE, LWPOLYLINE, CIRCLE, ARC, ELLIPSE, XLINE, RAY, DONUT, SOLID, TRACE, WIPEOUT, SPLINE, ARRAY (associative rect/polar/path), MLINE (multiline), TABLE (title, header and data cells), IMAGE (picture embedded in the drawing), TEXT, MTEXT, DIMENSION, TOLERANCE, LEADER, HATCH (pattern or gradient), POINT, INSERT, POLYLINE3D). LINE, POINT and POLYLINE3D points take z.
| Argument | Type | Description |
|---|---|---|
| entities* | array | Array of CAD entity definition objects |
{
"type": "object",
"required": [
"entities"
],
"properties": {
"entities": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"z": {
"type": "number",
"description": "Z or elevation"
},
"p1": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
}
},
"p2": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
}
},
"dir": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"description": "XLINE / RAY direction (or give through: {x,y} or angle in radians)"
},
"base": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"description": "XLINE / RAY start point"
},
"data": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "TABLE: data rows (arrays of cell text; MTEXT codes such as \\P allowed)"
},
"file": {
"type": "string",
"description": "IMAGE: path of a PNG, JPEG, GIF, BMP or WebP file inside the server folder (embedded in the drawing); or dataUrl / base64 with name; with position, width (default: pixel width) and rotation"
},
"kind": {
"type": "string",
"description": "ARRAY: rect (rows, cols, rowSpacing, colSpacing), polar (center, count, fill, rotateItems) or path (path, method divide|measure, count|spacing, rows, rowSpacing, align)"
},
"text": {
"type": "string"
},
"type": {
"type": "string",
"description": "LINE, LWPOLYLINE, CIRCLE, ARC, ELLIPSE, XLINE, RAY, DONUT, SOLID, TRACE, WIPEOUT, SPLINE, ARRAY, MLINE, TABLE, IMAGE, TEXT, MTEXT, DIMENSION, TOLERANCE, LEADER, HATCH, POINT, INSERT, POLYLINE3D"
},
"color": {
"type": "string"
},
"layer": {
"type": "string"
},
"title": {
"type": "string",
"description": "TABLE: title row text"
},
"width": {
"type": "number",
"description": "LWPOLYLINE constant width"
},
"center": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
}
},
"closed": {
"type": "boolean"
},
"datums": {
"type": "array",
"items": {
"type": "string"
},
"description": "TOLERANCE datum references, e.g. [\"A\", \"B(M)\", \"C\"]"
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "TABLE: header row cells"
},
"height": {
"type": "number"
},
"inside": {
"type": "number",
"description": "DONUT inside diameter (0 = filled disc)"
},
"normal": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"description": "Plane normal [x,y,z]"
},
"points": {
"type": "array",
"items": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"bulge": {
"type": "number"
}
}
}
},
"radius": {
"type": "number"
},
"dataUrl": {
"type": "string",
"description": "IMAGE: data:image/...;base64,... picture"
},
"dimType": {
"type": "string",
"description": "linear, aligned, radius, diameter, jogged, angular, ordinate, arclength. Optional: textPoint, textAngle and obliqueAngle (radians), jogLine; jogged: centerOverride, jogPoint"
},
"outside": {
"type": "number",
"description": "DONUT outside diameter"
},
"sources": {
"type": "array",
"items": {
"type": "object"
},
"description": "ARRAY: entity definitions that are arrayed"
},
"endAngle": {
"type": "number"
},
"gradient": {
"type": "object",
"description": "HATCH gradient fill: { name: LINEAR|CYLINDER|INVCYLINDER|SPHERICAL|INVSPHERICAL|HEMISPHERICAL|INVHEMISPHERICAL|CURVED|INVCURVED, color1, color2, angle (radians), centered }. Saved to DXF as a solid fill of color1 (AutoCAD 2000 has no gradients)."
},
"textSize": {
"type": "number",
"description": "DIMENSION: text height in drawing units (e.g. 120 for a plan in mm); with arrowSize and precision (decimals)"
},
"vertices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
}
}
},
"arrowSize": {
"type": "number",
"description": "DIMENSION: arrowhead size in drawing units"
},
"fitPoints": {
"type": "array",
"items": {
"type": "object"
},
"description": "SPLINE through these points (with optional startTangent, endTangent, knotMethod chord|sqrt|uniform, closed)"
},
"tolerance": {
"type": "string",
"description": "TOLERANCE value, e.g. \"0.1\", \"d0.05M\" (d = diameter, M/L/S = material condition)"
},
"mlineStyle": {
"type": "string",
"description": "MLINE: multiline style name (default Standard); with points, closed and scale (default 20)"
},
"startAngle": {
"type": "number"
},
"tableStyle": {
"type": "string",
"description": "TABLE: table style name (default Standard); with position, rowLines and rotation"
},
"leaderStyle": {
"type": "string",
"description": "LEADER: multileader style name"
},
"columnWidths": {
"type": "array",
"items": {
"type": "number"
},
"description": "TABLE: width of each column (or columns + columnWidth, default 63.5)"
},
"controlPoints": {
"type": "array",
"items": {
"type": "object"
},
"description": "SPLINE control vertices (with degree, optional weights, closed)"
},
"justification": {
"type": "string",
"description": "TEXT: Left, Center, Right, TL, TC, TR, ML, MC, MR, BL, BC, BR. MLINE: top, zero or bottom"
},
"characteristic": {
"type": "string",
"description": "TOLERANCE: position, concentricity, symmetry, parallelism, perpendicularity, angularity, cylindricity, flatness, circularity, straightness, surfaceprofile, lineprofile, runout, totalrunout"
}
}
},
"description": "Array of CAD entity definition objects"
}
}
}Defines a reusable Block containing geometric entities and optional attribute definitions (ATTDEF).
| Argument | Type | Description |
|---|---|---|
| name* | string | Block name, e.g. "DOOR_900", "TITLE_BLOCK" |
| entities* | array | Array of entity definition objects comprising the block |
| basePoint | object | Insertion base point |
| attributes | array | Optional block attribute definitions |
{
"type": "object",
"required": [
"name",
"entities"
],
"properties": {
"name": {
"type": "string",
"description": "Block name, e.g. \"DOOR_900\", \"TITLE_BLOCK\""
},
"entities": {
"type": "array",
"description": "Array of entity definition objects comprising the block"
},
"basePoint": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"description": "Insertion base point"
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"required": [
"tag"
],
"properties": {
"tag": {
"type": "string"
},
"height": {
"type": "number"
},
"prompt": {
"type": "string"
},
"constant": {
"type": "boolean"
},
"invisible": {
"type": "boolean"
},
"defaultValue": {
"type": "string"
},
"insertionPoint": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
}
}
}
},
"description": "Optional block attribute definitions"
}
}
}Executes JavaScript to generate large or procedural geometry (loops, patterns, algorithms) without spending context tokens. Runs in a separate Node process that cannot write files, start programs or read anything outside the CAD sources; 30 s limit. Variables: CAD, M (CADMath), G (CADGeometry), E (CADEntities), S (CADState), D (CADDXF), L (CADLayouts), parametric, solid(recipe) (adds a 3D solid), console. Changes to the drawing are kept.
| Argument | Type | Description |
|---|---|---|
| script* | string | JavaScript code to execute. Can call S.addEntity(), parametric.*, M.*, E.*, etc. |
{
"type": "object",
"required": [
"script"
],
"properties": {
"script": {
"type": "string",
"description": "JavaScript code to execute. Can call S.addEntity(), parametric.*, M.*, E.*, etc."
}
}
}Exports the current drawing to a standard AutoCAD 2000 (AC1015) ASCII DXF file compatible with AutoCAD, Civil 3D, SolidWorks, and LibreCAD.
| Argument | Type | Description |
|---|---|---|
| filePath* | string | Path of the .dxf file inside the output folder (CAD_MCP_OUTPUT_DIR, default: the server working directory), e.g. "plans/level1.dxf" |
{
"type": "object",
"required": [
"filePath"
],
"properties": {
"filePath": {
"type": "string",
"description": "Path of the .dxf file inside the output folder (CAD_MCP_OUTPUT_DIR, default: the server working directory), e.g. \"plans/level1.dxf\""
}
}
}Exports the closed 3D solids to a binary or ASCII STL file for 3D printing.
| Argument | Type | Description |
|---|---|---|
| ids | array | Solid ids; default all solids |
| scale | number | Multiplier on the drawing units (default 1) |
| binary | boolean | Default true; false writes ASCII |
| filePath* | string | Path of the .stl file inside the output folder |
{
"type": "object",
"required": [
"filePath"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Solid ids; default all solids"
},
"scale": {
"type": "number",
"description": "Multiplier on the drawing units (default 1)"
},
"binary": {
"type": "boolean",
"description": "Default true; false writes ASCII"
},
"filePath": {
"type": "string",
"description": "Path of the .stl file inside the output folder"
}
}
}Renders the drawing or paper space layout to an SVG vector file for instant preview and inspection.
| Argument | Type | Description |
|---|---|---|
| filePath* | string | Path of the .svg file inside the output folder (CAD_MCP_OUTPUT_DIR, default: the server working directory) |
| background | string | Background color, e.g. "#ffffff" (default) or "#1e1e1e" |
{
"type": "object",
"required": [
"filePath"
],
"properties": {
"filePath": {
"type": "string",
"description": "Path of the .svg file inside the output folder (CAD_MCP_OUTPUT_DIR, default: the server working directory)"
},
"background": {
"type": "string",
"description": "Background color, e.g. \"#ffffff\" (default) or \"#1e1e1e\""
}
}
}Generates complex parametric structures: "structural_grid", "truss", "mechanical_flange", "gear", or "architectural_floorplan".
| Argument | Type | Description |
|---|---|---|
| type* | string | Type of parametric structure to generate |
| params | object | Parameters specific to the structure (e.g. baysX, baysY, spacingX, span, height, teeth, module, rooms, etc.) |
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"structural_grid",
"truss",
"mechanical_flange",
"gear",
"architectural_floorplan"
],
"type": "string",
"description": "Type of parametric structure to generate"
},
"params": {
"type": "object",
"description": "Parameters specific to the structure (e.g. baysX, baysY, spacingX, span, height, teeth, module, rooms, etc.)"
}
}
}Returns comprehensive statistics of the current drawing: entity count, breakdown by type, layers, bounding box extents, blocks, and layouts.
No arguments.
{
"type": "object",
"properties": {}
}Places an instance (INSERT) of a block into the drawing with transform scale, rotation, and attribute values.
| Argument | Type | Description |
|---|---|---|
| name* | string | Name of the block to insert |
| scale | number | Uniform scale factor (defaults to 1) |
| position* | object | Insertion coordinate |
| attributes | object | Key-value map of attribute values for ATTDEF tags |
| rotationDeg | number | Rotation in degrees CCW |
{
"type": "object",
"required": [
"name",
"position"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the block to insert"
},
"scale": {
"type": "number",
"description": "Uniform scale factor (defaults to 1)"
},
"position": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"description": "Insertion coordinate"
},
"attributes": {
"type": "object",
"description": "Key-value map of attribute values for ATTDEF tags"
},
"rotationDeg": {
"type": "number",
"description": "Rotation in degrees CCW"
}
}
}Lists every implemented AutoCAD command with its aliases and description. Optional filter matches the name, an alias or words in the description (for example "layer" or "dim").
| Argument | Type | Description |
|---|---|---|
| filter | string |
{
"type": "object",
"properties": {
"filter": {
"type": "string"
}
}
}Initializes a fresh CAD drawing space, clearing existing entities and resetting layers.
| Argument | Type | Description |
|---|---|---|
| name | string | Drawing filename, e.g. "Structural_Frame.dxf" |
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Drawing filename, e.g. \"Structural_Frame.dxf\""
}
}
}Opens an existing ASCII DXF file (AutoCAD R12 to 2018+) in place of the current drawing, so it can be edited with cad_run_commands and saved with cad_export_dxf. Returns counts, what was converted, and a warning listing objects that cannot be read (they would be missing from a saved file).
| Argument | Type | Description |
|---|---|---|
| filePath* | string | Path of the .dxf file inside the server folder (CAD_MCP_OUTPUT_DIR, default: the server working directory), e.g. "plans/level1.dxf" |
{
"type": "object",
"required": [
"filePath"
],
"properties": {
"filePath": {
"type": "string",
"description": "Path of the .dxf file inside the server folder (CAD_MCP_OUTPUT_DIR, default: the server working directory), e.g. \"plans/level1.dxf\""
}
}
}Opens a shared drawing from Cloudflare D1 storage into the current CAD session by its share ID or URL.
| Argument | Type | Description |
|---|---|---|
| id* | string | Share ID (22 chars) or full URL, e.g. "https://autocad.site/?share=k7Qx..." |
| apiUrl | string | Optional sharing API endpoint (default: "https://autocad.site") |
| editToken | string | Optional edit token if not included in the URL fragment |
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "Share ID (22 chars) or full URL, e.g. \"https://autocad.site/?share=k7Qx...\""
},
"apiUrl": {
"type": "string",
"description": "Optional sharing API endpoint (default: \"https://autocad.site\")"
},
"editToken": {
"type": "string",
"description": "Optional edit token if not included in the URL fragment"
}
}
}Revokes and deletes a shared drawing from Cloudflare D1 storage using its ownerToken.
| Argument | Type | Description |
|---|---|---|
| id* | string | Share ID or full share URL |
| apiUrl | string | Optional sharing API endpoint |
| ownerToken* | string | Owner token received when creating the share |
{
"type": "object",
"required": [
"id",
"ownerToken"
],
"properties": {
"id": {
"type": "string",
"description": "Share ID or full share URL"
},
"apiUrl": {
"type": "string",
"description": "Optional sharing API endpoint"
},
"ownerToken": {
"type": "string",
"description": "Owner token received when creating the share"
}
}
}Runs AutoCAD command-line input in the current drawing, exactly as typed in the app. Statements are separated by ";" or newlines; inside a statement tokens are separated by spaces and the statement ends with Enter. Example: "LINE 0,0 100,0 100,50; CIRCLE 50,25 10; CHPROP ALL; C red; LAYMRG N DOORS; N WALLS Y; DRAWORDER ALL; F". Every statement ends with Enter, so keep the follow-up answers of one command step in the same statement ("CHPROP ALL; LA WALLS C red"; a question asked after Enter goes in the next statement: "LAYDEL N TEMP; Y"). Objects are selected with ALL or P (previous). Returns the command log and any problems. 3D: points x,y,z; 3DPOLY, ELEV, VIEW (Top, Front, SWiso ...), UCS. 3D solids: BOX, CYL, SPHERE, EXTRUDE, REVOLVE, UNION, SUBTRACT, INTERSECT, MASSPROP. Use cad_list_commands to see every command.
| Argument | Type | Description |
|---|---|---|
| select | object | Optional Quick Select filter applied before the script; the commands then act on it (pre-selection, or P for previous). Example: { "type": "CIRCLE", "property": "radius", "op": "<", "value": 5 }. Properties: color, layer, linetype, lineweight, length, radius, area, text, height, blockname, measurement. Operators: =, <>, >, <, * (any). Text values accept * and ? wildcards. exclude: true inverts the filter. |
| commands* | string | Command script |
{
"type": "object",
"required": [
"commands"
],
"properties": {
"select": {
"type": "object",
"properties": {
"op": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {},
"exclude": {
"type": "boolean"
},
"property": {
"type": "string"
}
},
"description": "Optional Quick Select filter applied before the script; the commands then act on it (pre-selection, or P for previous). Example: { \"type\": \"CIRCLE\", \"property\": \"radius\", \"op\": \"<\", \"value\": 5 }. Properties: color, layer, linetype, lineweight, length, radius, area, text, height, blockname, measurement. Operators: =, <>, >, <, * (any). Text values accept * and ? wildcards. exclude: true inverts the filter."
},
"commands": {
"type": "string",
"description": "Command script"
}
}
}Shares the current drawing online via Cloudflare D1 storage (autocad.site). Returns view and edit URLs that can be shared with users or other agents.
| Argument | Type | Description |
|---|---|---|
| name | string | Optional drawing name (defaults to current drawing name) |
| apiUrl | string | Optional sharing API endpoint (default: "https://autocad.site") |
| expiresDays | number | Expiration in days (e.g. 1, 7, 30; omit or 0 for never) |
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Optional drawing name (defaults to current drawing name)"
},
"apiUrl": {
"type": "string",
"description": "Optional sharing API endpoint (default: \"https://autocad.site\")"
},
"expiresDays": {
"type": "number",
"description": "Expiration in days (e.g. 1, 7, 30; omit or 0 for never)"
}
}
}Inspects 3D solids: list (id, op, volume, bounds), measure (volume, area, centroid) or check (closed, curve error).
| Argument | Type | Description |
|---|---|---|
| ids | array | Solid ids; default all |
| from | integer | Start index; use the reply's next to page |
| limit | integer | Solids per reply, 1 to 50 (default: as many as fit in 900 bytes) |
| action | string | Default list |
{
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Solid ids; default all"
},
"from": {
"type": "integer",
"description": "Start index; use the reply's next to page"
},
"limit": {
"type": "integer",
"description": "Solids per reply, 1 to 50 (default: as many as fit in 900 bytes)"
},
"action": {
"enum": [
"list",
"measure",
"check"
],
"type": "string",
"description": "Default list"
}
}
}Uploads and updates the current CAD session drawing to an existing shared drawing using its editToken.
| Argument | Type | Description |
|---|---|---|
| id* | string | Share ID or full share URL |
| apiUrl | string | Optional sharing API endpoint |
| editToken* | string | Edit token |
{
"type": "object",
"required": [
"id",
"editToken"
],
"properties": {
"id": {
"type": "string",
"description": "Share ID or full share URL"
},
"apiUrl": {
"type": "string",
"description": "Optional sharing API endpoint"
},
"editToken": {
"type": "string",
"description": "Edit token"
}
}
}