autocad.site โ AI Generative CAD, Model Context Protocol (MCP) Server & AutoCAD DWG / DXF Editor
autocad.site (JsCAD) is the world's first AI-native Generative CAD platform and Model Context Protocol (MCP) server operating directly in the web browser. It equips autonomous AI agents (Anthropic Claude Desktop, Google Antigravity, Cursor, Windsurf, BrowserOS) and human engineers with native AutoCAD DWG and DXF file reading, 19 dedicated MCP drafting tools, full 3D CSG solid modeling, STL export for 3D printing, real-time Cloudflare collaboration, and complete AutoCAD drafting with 900+ commands.
Native AutoCAD DWG & DXF Support: Open, view, and edit binary AutoCAD DWG files (R14 through 2018+) and ASCII DXF files directly in the browser with 100% client-side privacy and zero plugins.
Model Context Protocol (MCP) AI Server: 19 dedicated tools enabling AI agents to programmatically generate complex blueprints, execute procedural code sandboxes, and inspect drawing state.
3D Solid Modeling & 3D Printing: Parametric CSG 3D solids (box, cylinder, sphere, extrude, revolve, boolean union/subtract/intersect), interactive 3D Orbit, and binary/ASCII STL export.
AI Web Bridge & URL Automation: Full in-page JavaScript control via window.CAD, deep-linking (?sample=mosque, ?cmd=...), and zero-refresh hash streaming (#cmd=...).
Real-Time Cloud Collaboration: Instant multi-user drawing sharing, live synchronization, and persistent links powered by Cloudflare D1.
Professional 2D Drafting & AutoCAD Commands: Lines, polylines, splines, associative hatches, dimensions, tables, blocks with attributes, and 900+ AutoCAD command pipeline.
JsCADDrawing1.dwg
Draw
Modify
Layers
Properties
Utilities
Clipboard
Modify
Layer Tools
Measure
Groups & Selection
Draw
Block
Dimensions & Text
Dimension Tools
Text & Leaders
Tables
Create
Draw 3D
Coordinates
Edit
Modify 3D
View
Output
Inquiry
Navigate
Plot & Export
Drawing Recovery
Showcase Blueprints
๐ข Shared: ยท
Block Editor:
/
JsCAD
Type "HELP" or press F1 for commands and shortcuts.
Type a command
Properties (Ctrl+1)
No selection
Layer Properties Manager (LA)
Click โ to set current ยท double-click a name to rename
Cur
Name
On
Freeze
Lock
Color
Linetype
Lineweight
Objects
QuickCalc (Ctrl+8 / QC)
About JsCAD
autocad.site โ AI Generative CAD & MCP Platform
The world's first AI-native CAD platform: 19 Model Context Protocol (MCP) tools for autonomous agents, 3D CSG solid modeling, real-time collaboration, and professional 2D drafting in pure JavaScript.
๐ค Model Context Protocol (MCP) & AI Engine
19 dedicated MCP tools for Claude Desktop, Google Antigravity, Cursor, and Windsurf agents.
Procedural JavaScript Sandbox (cad_execute_script) for drafting 10,000+ entities with zero token exhaustion.
AutoCAD.site Generative CAD MCP Server & Browser Bridge
Empowers AI Agents (Anthropic Claude, Cursor, Windsurf, Google Antigravity, BrowserOS) to programmatically compose, calculate, and stream massive 2D/3D CAD engineering drawings with 0 token exhaustion.
Traditional AI interactions with CAD suffer from a severe limitation: outputting 10,000 raw drawing coordinates via text prompts exhausts LLM context windows, costs hundreds of thousands of tokens, and is painfully slow. The JsCAD CAD Engine MCP Server eliminates this bottleneck by giving AI models programmatic CAD drafting tools and an isolated JavaScript execution sandbox.
โก Key Superpowers for AI Agents
Procedural Code Sandbox (cad_execute_script): AI writes high-speed JavaScript generator loops. 50,000 entities are calculated and rendered in milliseconds inside an isolated Node permission-checked process.
High-Level Parametric Generators (cad_generate_parametric): Built-in instant generators for structural column grids, roof trusses, machine flanges with bolt circles, involute gear teeth, and multi-room floor plans.
Real AutoCAD Command Pipeline (cad_run_commands): Executes authentic AutoCAD command strings (e.g. LINE 0,0 100,0; CHPROP ALL; LA WALLS C red) with Quick Select filters and full problem reporting.
Bi-Directional DXF & SVG Plotting: Imports and exports full AutoCAD 2000 (AC1015) ASCII DXF with layers, linetypes, colors, and blocks, plus instant vector SVG visual verification.
Cloud Collaboration (cad_share_drawing): Shares active sessions to Cloudflare D1 with live view & edit URLs for real-time human-agent co-designing.
๐ Agent Masterclass: 3D Architectural Master Planning (Grand Mosque)
How AI Agents orchestrate massive multi-plane, multi-elevation 3D CAD drawings via the project MCP server without context token exhaustion.
3D Axonometric Isometric View (SWISO)
Master Architectural Ground Plan (Top View)
๐ The 5 Step Architecture for AI Agents
Step 1 โ Space & Layers Initialization: Call cad_new_drawing with the drawing name, followed by cad_add_layers with architectural colors, linetypes (e.g. Center for grid), and lineweights.
Step 2 โ True 3D Entity Batching: Use cad_batch_add_entities. Points for LINE and POLYLINE3D take { x, y, z } directly. Circular entities and text take plane: { o, x, y, z } or normal: [x,y,z] and elevation z.
Step 3 โ Procedural 3D Arches & Spires: Never stream 10,000 raw text lines. Use loops for the 16 meridian arches curving to the dome apex ($Z = +54\text{m}$) and the 100m minaret's dual cantilevered balconies.
Step 4 โ Hybrid 3D Solids: Call cad_run_commands with authentic AutoCAD solid commands (BOX 40,90,0 6,6 24, CYL 60,110,20 18 4, SPHERE 60,110,36 18) to combine wireframes with watertight volumetric solids.
Step 5 โ Multi-View SVG & DXF Verification: Rotate camera with cad_run_commands: "VIEW SWISO" and export vector SVG with cad_export_svg, then export production AutoCAD 2000 DXF via cad_export_dxf.
For AI browser subagents (like BrowserOS Neo, Puppeteer, Playwright) or in-page automation scripts, JsCAD exposes zero-refresh programmatic control without requiring a local Node process:
1. In-Page JavaScript API (window.CAD)
Complete programmatic control via the browser developer console or agent execution:
// Control from any iframe, extension, or sibling tab:
const channel = new BroadcastChannel('jscad-bridge');
channel.postMessage({ type: 'CAD_EXECUTE', script: 'PLINE 0,0 100,0 100,100 0,100 C' });
โ๏ธ Connect Your AI (Claude, Cursor, ChatGPT, Antigravity)
Connect the CAD Engine MCP Server to any AI client via local npm, official registry, or cloud remote connector:
๐ Official Anthropic MCP Registry
Validated & active in the official Model Context Protocol catalog:
io.github.blackmoon87/autocad-site-mcp
โก Smithery 1-Click Install
Instant install via Smithery CLI or Cloud Gateway:
npx -y smithery mcp add blackmoon/autocad
1. Claude Code CLI (1-Line Instant Setup)
claude mcp add autocad-site -- npx -y autocad-site-mcp
2. Claude.ai & ChatGPT (Cloud Connector โ Zero Install)
In Claude.ai (Settings โ Connectors) or ChatGPT (Developer Connectors), add the streamable remote endpoint:
https://acad-qlae.onrender.com/mcp
3. Anthropic Claude Desktop (claude_desktop_config.json)
Test in-browser execution directly against the active canvas in real time:
Ready. Click "Execute on Canvas" to test.
Help
Shortcut
Command
Description
Turning an image or scan into a drawing
For users and AI agents (through the MCP server). A picture is only a picture: to edit it as CAD it has to be redrawn as lines, text, hatches and blocks.
Small sheets (forms, tables, details)
Attach the image (IMAGEATTACH, or drop the file on the drawing) as a reference.
Measure positions from the image pixels rather than by eye, so table lines and cells line up.
Draw on separate layers (frames, grid, fills, text, logo) next to or over the image; agents use cad_batch_add_entities.
Compare with the original (cad_export_svg for agents) and correct the differences.
Large plans (architectural drawings, many sheets of detail)
Reading a big plan in one look does not work: fine text and dimensions are lost. Split the work: algorithms find the geometry, the AI decides what it means, and the result is checked against the image.
Underlay and scale first. Attach the image on a locked layer. Use SCALE with Reference (or ALIGN) so a known dimension or the scale bar measures true. One wrong scale ruins everything after it, so confirm it.
Work in tiles. Cut the image into overlapping tiles (about 1000โ1500 px), handle each one and place the results in drawing coordinates.
Geometry by code, not by eye. Image tools (for example OpenCV) clean the scan (straighten, black and white, remove specks), find straight lines and arcs (door swings), merge broken pieces, make near-horizontal and near-vertical lines straight, close gaps at corners, and pair parallel thick lines into walls (MLINE). The AI reviews and fixes the result.
Text by OCR. OCR (for example Tesseract or PaddleOCR, both read Arabic) reads room names and dimensions; the AI decides which text is a dimension, a room name or a note.
Blocks and layers. Doors, windows, sanitary fittings and furniture become one block each, inserted many times. Sort everything into layers such as walls, doors, windows, text and dimensions.
Build in batches. Agents send a few hundred objects per cad_batch_add_entities call and use cad_execute_script for procedural parts, so thousands of coordinates do not pass through the conversation. Save progress tile by tile (cad_export_dxf).
Check automatically. Export SVG, overlay it on the image, score each tile for how well the lines match, and redo only the tiles that score low.
Ask when unsure. Hand-drawn plans, blurry scans, hatching and stamps defeat automatic tracing. Keep the image underneath as a reference and ask instead of guessing.
What JsCAD does and does not do
JsCAD provides the drawing side: image underlay (embedded in the drawing), layers, blocks, multilines, tables, text, scaling by reference, DXF and SVG export, and the MCP tools above.
JsCAD does not trace images or read text from them automatically: steps 3 and 4 need outside image and OCR tools.
Expect automation to do most of a clean printed plan, with review for the rest; poor scans need much more manual work.
Drawing in 3D
JsCAD allows drawing, snapping, and modifying shapes directly in 3D space and across any work plane (UCS).
1. 3D Wireframes & Points (Acceptance A1)
Type 3D coordinates (x,y,z) or snap directly to 3D geometry across any of the 14 preset views.
100-unit cube with a gable roof ridge in SW Isometric view
Direct 3D Coordinates: Draw a 3D frame by typing LINE 0,0,0 100,0,0, LINE 0,0,100 0,50,150, etc. Use 3DPOLY for 3D polylines through non-coplanar points.
Preset Views: Switch between 14 preset view cameras (VIEW TOP, VIEW FRONT, VIEW RIGHT, VIEW SWISO, VIEW NEISO...) or click the Views ribbon buttons.
3D Snapping: Endpoint, midpoint, intersection and center snaps pick true 3D points regardless of the current view camera.
2. Drawing Shapes on Any Plane (UCS & Acceptance A2)
Any 2D shape (circles, arcs, polylines, hatches, text, dimensions) can be drawn on any 3D plane.
Circle drawn on the Front face plane, projecting as an exact ellipse in SW Isometric view
Work Planes (UCS): Set a work plane with UCS 3point (origin, X axis, XY plane), UCS Origin, or UCS Object. In face views (Front, Right, etc.), the work plane automatically aligns with the face (when UCSORTHO = 1).
Planar Entities: Circles, arcs, and polylines store their coordinate system plane. In corner views (like SW Isometric), a circle on the front face projects with mathematical precision as an ellipse.
Standard DXF Compliance: Planar entities export to standard AutoCAD DXF using their Object Coordinate System (OCS) normal vectors (group codes 210, 220, 230) and elevation.
3D Solids
Create, edit, preview, and 3D print solid models from within JsCAD.
Draw a closed 2D sketch: Draw a closed polyline (PLINE with Close), circle (CIRCLE), or ellipse (ELLIPSE).
Extrude or Revolve into 3D: Run EXTRUDE (EXT) and enter a height, or REVOLVE (REV) around two axis points. Primitive solids like BOX, CYLINDER (CYL), and SPHERE can also be placed directly.
Boolean edits: Use SUBTRACT (SU) to cut holes, pockets, or slots (select solids to keep, press Enter, then select solids to subtract). Use UNION (UNI) to merge solids, and INTERSECT (IN) to keep only common overlapping volume.
Measure properties: Run MASSPROP to measure volume, surface area, bounding box limits, and centroid.
3D Preview & Orbit: Run 3DORBIT (ORBIT / 3DO) or click 3D view in the 3D ribbon tab to orbit, pan, and zoom solids in flat-shaded WebGL with feature edges.
3D Printing (STL export): Run STLOUT to export selected solids as Binary or ASCII STL files ready for 3D slicers.
Important details on solids & file formats
Faceted representation: Curved solids (cylinders, spheres, revolved shapes) are faceted into planar triangles using tolerance-controlled chords.
DXF saving: AutoCAD DXF format stores solids as standard AC1015 Polyface Meshes so third-party CAD programs can display them. JsCAD attaches an extended XRECORD containing the exact parametric recipe so opening the file in JsCAD restores editable solids.
JSON & Share links: Native JSON files and shareable cloud links store full parametric recipes directly, keeping solids fully editable with zero loss.
Plot - Model (Ctrl+P)
Choose "Save as PDF" in the print dialog to create a PDF. Keep the print scale at 100% for exact scale.