Skip to content
Back to search

cad-mcp

Free MCP server + CLI: plain-language request to real DXF drawings (dims, layers, floor plans, column grids, parts) with PNG/PDF renders. No AutoCAD needed.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/kingworks-dev--cad-mcp/badge.svg)](/listings/kingworks-dev--cad-mcp)

HTML

<a href="/listings/kingworks-dev--cad-mcp"><img src="/api/listings/kingworks-dev--cad-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

pip install ezdxf matplotlib mcp            # add --user (and --break-system-packages on PEP 668 systems) if needed
python3 -m pytest -q tests                  # optional

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 102 lines
  1. # cadkit / cad-mcp
  2. Turn a plain-language or JSON request into a real DXF drawing plus PNG and PDF renders. No AutoCAD licence, no GUI app:
  3. pure Python on top of [ezdxf](https://ezdxf.mansfield-online.com/) and matplotlib. Includes an MCP server so Claude (or any MCP
  4. client) can draw for you.
  5. > **Honest note:** this is a drafting aid. Its output is not stamped, sealed or code-checked engineering or architectural
  6. > drawing. Have a licensed professional verify anything that gets built, permitted or manufactured.
  7. ## Need it drawn for you?
  8. $49 per simple 2D drawing (DXF + PDF, 2 business days): https://buy.stripe.com/6oUaEQbTNb4E87EdqX0x52t
  9. A room or floor plan, column grid, or flat part, drafted from your dimensions or sketch. Drafting aid, not a stamped engineering drawing.
  10. ### Samples
  11. | Room plan | Column grid | Bracket |
  12. |---|---|---|
  13. | ![Room plan 12x16](samples/room-12x16.png) | ![Column grid 4 bay](samples/column-grid-4bay.png) | ![Bracket](samples/bracket.png) |
  14. * DXF is saved as **R2010 (AC1024)**: opens in AutoCAD, LibreCAD, FreeCAD, QCAD.
  15. * Real entities: LINE, LWPOLYLINE, CIRCLE, ARC, MTEXT, HATCH and real **DIMENSION** entities (dimstyles `ARCH-FTIN` for
  16. feet-inches, `MECH-MM` for millimetres), organised on named layers with colours and linetypes.
  17. * Every drawing gets a title block: title, scale, date (US Central), "Drawn by King AI".
  18. ## Install
  19. ```bash
  20. pip install ezdxf matplotlib mcp # add --user (and --break-system-packages on PEP 668 systems) if needed
  21. python3 -m pytest -q tests # optional
  22. ```
  23. ## Use
  24. ```bash
  25. python3 cli.py build samples/specs/room-12x16.json --out out/ # DXF + PNG + PDF + audit
  26. python3 cli.py audit out/room-12x16.dxf # ezdxf audit + entity counts per layer
  27. python3 cli.py render out/room-12x16.dxf --out out/
  28. ```
  29. Python:
  30. ```python
  31. from cadkit import room_plan, column_grid, bracket_part, render_dxf, audit_file
  32. d = room_plan(12, 16, 6, doors=[{"wall": "south", "offset_ft": 2, "width_ft": 3}],
  33. windows=[{"wall": "east", "offset_ft": 6, "width_ft": 4}], name="BEDROOM")
  34. d.save("bedroom.dxf"); render_dxf("bedroom.dxf"); print(audit_file("bedroom.dxf"))
  35. ```
  36. ### Spec format
  37. ```json
  38. {"type": "room_plan", "name": "BEDROOM", "width_ft": 12, "length_ft": 16, "wall_thickness_in": 6,
  39. "doors": [{"wall": "south", "offset_ft": 2, "width_ft": 3, "swing": "in", "hinge": "start"}],
  40. "windows": [{"wall": "east", "offset_ft": 6, "width_ft": 4}]}
  41. {"type": "column_grid", "bays_x": 4, "bays_y": 3, "spacing_x_ft": 25, "spacing_y_ft": 25, "column_size_in": 14}
  42. {"type": "bracket", "length_mm": 100, "height_mm": 80, "leg_width_mm": 30, "thickness_mm": 6, "hole_dia_mm": 9, "fillet_r_mm": 10}
  43. {"units": "mm", "title": "PLATE", "layers": [{"name": "PART", "color": "red", "linetype": "DASHED"}],
  44. "entities": [{"type": "rectangle", "corner1": [0, 0], "corner2": [60, 40], "layer": "PART"},
  45. {"type": "dimension", "p1": [0, 0], "p2": [60, 0], "offset": -10, "kind": "horizontal"}]}
  46. ```
  47. Generic entity types: `line`, `rectangle`, `polyline`, `circle`, `arc`, `text` (MTEXT), `dimension`
  48. (`aligned|horizontal|vertical`), `hatch`. Bad input raises a precise error such as
  49. `doors[0] (9 ft + 3 ft wide) does not fit the south wall (10 ft clear)`. `units: "in"` is architectural (coordinates in inches,
  50. dimensions shown as feet-inches); `"mm"` is mechanical.
  51. Room plans: `offset_ft` is measured along the wall from its interior start corner (south/north from the left, east/west from
  52. the bottom). Overall dimensions run to the outside of the walls.
  53. ## MCP server
  54. Tools: `create_drawing`, `add_entities`, `draw_room_plan`, `draw_column_grid`, `draw_bracket`, `render_drawing`,
  55. `audit_drawing`, `list_layers`. Files go to `$CADKIT_OUT` (default `./cad-output`).
  56. Claude Code:
  57. ```bash
  58. claude mcp add cadkit -e CADKIT_OUT=$HOME/cad-output -- python3 /path/to/cad-mcp/server.py
  59. ```
  60. Claude Desktop (`claude_desktop_config.json`):
  61. ```json
  62. {"mcpServers": {"cadkit": {"command": "python3", "args": ["/path/to/cad-mcp/server.py"],
  63. "env": {"CADKIT_OUT": "/Users/you/cad-output"}}}}
  64. ```
  65. Works with `mcp` 1.x (`FastMCP`) and 2.x (`MCPServer`).
  66. ## Known limits
  67. * Title-block scale is a label (default `NTS`); renders are fit-to-image, not plotted to a true paper scale.
  68. * The PNG/PDF renderer draws the diameter sign as a Greek phi (the DXF keeps the real diameter sign) because the matplotlib
  69. text-outline path fills that glyph solid.
  70. * Architectural dimension text is written as an explicit feet-inches string (the ezdxf renderer ignores DIMLUNIT); the DIMENSION
  71. entities themselves carry the real measurement and the `ARCH-FTIN` dimstyle.
  72. * No walls hatching, stairs, furniture, 3D, or layouts/paper space.
  73. ---
  74. Built by King AI — https://usekingai.com

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.