soficad
Creates and reads real SOFiCAD reinforcement objects inside a running AutoCAD 2027 instance, including rebar, layings, views, cut layings, welded mats, sheet layouts, PDF export, and bar schedules from text descriptions or scripted item lists.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
SOFiCAD MCP
MCP server and Claude Code skills for producing SOFiCAD 2027 reinforcement drawings in a running AutoCAD 2027 from a text description. For example: "L-shaped slab 25 cm, bottom mesh Ø16/150 + Ø8/200, bars ≤ 14 m with 15 cm laps, U-bars Ø12 at every edge", turned into a finished drawing with sections, a centred 1:50 sheet, a monochrome PDF and a bar schedule.
It builds on the autocad-mcp repo: its autocad server, its session guard (dialogs, crash recovery,
AutoCAD started through SOFiCAD's launcher) and its Python venv. The soficad server here imports that guard.
Folder | What |
|
|
| Claude Code skills: |
| Unattended schedule export, SOFiCAD's LOG counter, type-library signature and enum lookup, surveys of big drawings ( |
What soficad_slab does in one call
You give it an outline (any simple polygon, slanted edges included, or a polyline handle), openings, the thickness, the cover, the bottom and optional top mesh layers, Lmax, the lap length and the U-bars. It then:
splits the outline into zones and lays out rows that keep the cover from every edge (perpendicular on slanted edges);
groups the rows along a slanted edge into layings whose bar ends differ by at most
step_m;splits long bars into pieces with laps (
max_firstorequal);staggeralternates the laps between rows. By default every layer gets the tension lap l0 of EN 1992-1-1 with the German NA (diameter, bond condition, lapped share);checks the detailing (
design_rules.py, also alone assoficad_design_check): cover for bond and exposure class, lap lengths, clear and maximum spacing, minimum and transverse reinforcement, free-edge U-bar legs. Findings are reported, they never stop the drawing;adds U-bars at every bar end (openings included), set between the main bars, with the height derived from the layer order;
unifies bar lengths that are within SOFiCAD's 5 cm similarity tolerance, so no "use similar mark?" question comes up;
draws longitudinal and transverse sections at 1:50 (bar views, cut layings, section marks);
lays out the sheet: slab centred, 1:50, or 1:100 if it does not fit at 1:50. The top mesh gets its own sheet. Titles carry the real scale.
saves the drawing, exports the PDF(s) and the schedule (.docx / .rdb), and checks that every mark's bar count in the drawing equals the computed one.
For example, a 26 × 14 m slab with a chamfer, an opening, a top mesh and staggered laps comes out as 43 marks and 1194 bars in about 30 s.
With mats={"bottom": "Q335(A)", "top": "Q188(A)"} instead of mesh, the slab is reinforced with welded
mats (see below): the bottom mats in one plan, the U-bars and their edge bars at every free edge in a plan of
their own, and the top mats on their own sheet. Bars and mats are checked mark by mark against the schedule.
examples/slab_mats_from_description.py does this for the Drawing1 L-slab on one A0 sheet at 1:50.
Related MCP server: AutoCAD MCP Pro
Other drawings: soficad_build and soficad_sheet_compose
For anything that is not a plain slab, a script computes the item list (bars, layings, bar views, cut
layings, polylines, texts, bubbles, section marks, hatches, dimensions) and draws it with one
soficad_build call. soficad_sheet_compose then lays out a sheet with several viewports at different
scales, paper-space notes and tables, and fills the title block. Plain geometry reaches AutoCAD as entmake
data that one in-process LISP loop reads from a file (about 1 ms per object instead of 20-50 ms over COM),
and every SOFiCAD object is one command.
The worked example skills/soficad-drawing/examples/track_curve_r1500.py draws a slab track (Feste
Fahrbahn) in an 800 m curve: R = 1500 m with 2 × 160 m clothoids and 120 mm cant, 64 identical 12.5 m
blocks. One A0 sheet holds the site plan at 1:1000 with curvature and cant bands, the typical block top
and bottom at 1:50, three canted cross-sections at 1:25, a longitudinal section, notes and a steel table;
labels are in German. It runs in about 19 s.
track_curve_r1500_var.py is the same curve with blocks of variable height: the slab bottom stays
horizontal and the top follows the cant (track_slab.py). It adds dowels at the joints, stirrups at the
dowels and S-hooks between the meshes. The bars that span the depth become SOFiCAD variable marks
(sub-marks N.1, N.2 ... with SOFiCAD's own table): soficad_build bars take vary (values and counts per
sub-mark) and hooks: "S". Three A0 sheets (plans, sections 1:20, joint detail 1:10; 13 transition
blocks; bending shapes and steel list), 72 marks, 30 056 bars, about 60 s. Every mark and sub-mark count
is checked against the schedule.
Welded meshes (Betonstahlmatten, Q/R mats) are the soficad_build item mesh_field (or the tool
soficad_create_mesh_field). SOFiCAD fills a rectangle with whole mats and fitting mats from its catalogue,
laps included. The result lists every mat mark with count, size and weight, and checks that the mats
cover the whole field. The field is repaired right after creation: one laid through SOFiCAD's API is
otherwise reported defective on the next open. soficad_rdb_read and the schedule export report the mats
(fabric). In examples/mesh_slab.py a slab gets its bottom and top layer as two plans on one sheet:
16 mats, 8 marks, 827.66 kg, matched mark by mark with the schedule, in about 16 s.
An L-, T- or U-shaped slab with openings is the item mesh_polygon (or soficad_create_mesh_polygon). The
outline, moved in by the cover and with the openings moved out by it, is cut into rectangles along the mats.
Each rectangle is a field, and where two meet the narrower one reaches into the other by the lap. The mats of
all fields are checked together: they must cover the whole area and stay inside the cover. An edge that runs
neither along nor across the mats is refused. SOFiCAD's own polygonal layout command is interactive only, so it is not
used. SOFiCAD cannot lay a fitting mat narrower than 1.5 × the lap (the field comes out broken), so the lap of
such a field is raised, or the field is laid as two halves.
The free edges of a mesh slab get U-bars (Steckbügel, EC2 9.3.1.4) from the item edge_u_bars. It becomes A3
marks and one laying per edge, with legs 2h by default. The U-bars sit between the bottom and top mats, and
those of crossing edges are nested at the corners. Each edge also gets two straight bars in the U's corners
(figure 9.8), lapped when the edge is longer than a bar. examples/mesh_polygon_slab.py lays both mat layers
of a 14 × 10 m L slab with a stair opening, plus its U-bars and edge bars in a plan of their own: 34 mats
(1080.79 kg) and 322 bars (167.02 kg), all matched with the schedule.
Requirements
Windows; AutoCAD 2027 with SOFiCAD 2027, licensed and started through SOFiCAD's launcher.
autocad-mcp, installed as its README says (
C:\autocad-mcp, with its venv). This repo finds it asAUTOCAD_MCP_HOME, else as the folderautocad-mcpnext to this repo, else inC:\autocad-mcp.Python 3.15 (64-bit) and Claude Code.
Install
The skills refer to C:\soficad-mcp and C:\autocad-mcp; the server locates its own files relative to itself.
git clone https://github.com/SweetBubalehj/soficad-mcp.git C:\soficad-mcp
C:\autocad-mcp\Scripts\pip install -r C:\soficad-mcp\requirements.txt # pypdfium2, python-docx into autocad-mcp's venvRegister both servers in your Claude Code project. Copy mcp.example.json to <project>\.mcp.json, or add
them with claude mcp add. Then install the skills of both repos into that project:
C:\autocad-mcp\Scripts\python.exe C:\autocad-mcp\tools\sync_skills.py install <project folder>
C:\autocad-mcp\Scripts\python.exe C:\soficad-mcp\tools\sync_skills.py install <project folder>Check the installation:
cd C:\soficad-mcp
C:\autocad-mcp\Scripts\python.exe tools\regress.py --offline # the 7 offline tests (geometry, EC2 rules, sheet check, mats, entmake data), seconds
C:\autocad-mcp\Scripts\python.exe tools\regress.py # + the reference drawings built in AutoCAD, ~3 minThe full regression run builds eight reference drawings in %TEMP%\soficad_regress: Drawing1 as items and by
soficad_slab, a slab with every feature, the curve and its variable-height variant, and the three mesh slabs
(one of them by soficad_slab with mats). It compares their
schedules with tools/regress_golden.json and runs soficad_sheet_check on every sheet, so overlapping
annotation or text cut by a viewport edge fails the run. It also writes PDF previews and overlays. Run it
after changing server or geometry code.
GitHub Actions (.github/workflows/offline-tests.yml) runs the offline tests on every push and pull request,
on Windows and Linux with Python 3.15. They need only the standard library. Where SOFiCAD is not installed,
the mat test reads a few standard mats from soficad_server/testdata/mesh_catalogue.ini instead of SOFiCAD's
din.ini. The reference drawings need AutoCAD and SOFiCAD, so they run only on a workstation.
Looking at the result
soficad_pdf_previewrenders a plotted sheet, or a region of it in paper mm, to PNG (pypdfium2).soficad_sheet_checkfinds texts, bubbles and SOFiCAD labels that overlap on a sheet, and items cut by a viewport edge, and draws them onto the rendered PDF. TEXT boxes are exact, rotated ones included. SOFiCAD's laying labels are estimated from their position, angle and text, because SOFiCAD does not expose their extents.SOFiCAD draws a variable mark's table into a plot only once the drawing has been opened, so
soficad_export_pdfsaves, closes and reopens a drawing once if this session created variable marks in it.
In Claude Code, soficad_status shows the connection.
Working on it
Server code changes need
/mcp→ Reconnect in Claude Code.sheet_config.jsonand autocad-mcp'sacad_guard/guard_config.jsonare re-read on every call.The skills are loaded from the project's
.claude\skills. After editing them there, copy them back before committing:C:\autocad-mcp\Scripts\python.exe tools\sync_skills.py export <project folder>.tools/sofbole_api.txt(a dump of SOFiSTiK's type library) is local only. To regenerate it:C:\autocad-mcp\Scripts\python.exe tools\tlb_dump.py "<SOFiCAD 2027 dir>\sofbole.tlb" > tools\sofbole_api.txt.tools\tlb_sig.pyandtools\tlb_enum.pyread method signatures and enum members straight fromsofbole.tlb.
License
MIT, see LICENSE. AutoCAD and SOFiCAD are products of Autodesk and SOFiSTiK; they are not part of this repo and need their own licences.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Edit AutoCAD and Revit MEP drawings from Claude or ChatGPT in plain English.
AI for Revit: 450+ tools, 1 undo step. Windows, Revit 2024–2027 (2021–2023 included). Free account.
Read and edit the Revit 2024–2027 model on your PC. Needs the free Revit MCP add-in.
Read, query, edit and render DWG drawings with AI. No AutoCAD required.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables architects to control AutoCAD 2021-2026 on macOS and Windows through natural language, allowing drawing and editing of architectural plans, checking compliance with standards, and generating construction documents.15-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to drive production-grade CAD automation against live AutoCAD on Windows or headlessly through ezdxf anywhere, using one typed contract across both engines. It covers drawing and dimensioning, ISO GD&T and tolerance validation, P&ID drafting and reading, mechanical part sheets, architectural plans, and quantity takeoffs into workbooks.-
- AlicenseBqualityCmaintenanceEnables AI clients to control AutoCAD 2027 on macOS in real time through a live GUI bridge and to process drawings headlessly with AcCoreConsole and ezdxf, including drawing and editing geometry, managing layers and blocks, inspecting entities, and exporting DWG, DXF, PDF, or PNG files.20MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to drive AutoCAD, ZWCAD, GstarCAD, and BricsCAD through seven unified tools covering 56 CAD commands — drawing lines, circles, rectangles, polylines, splines and tables, managing layers, blocks and entities, transforming and selecting objects, and exporting to Excel/JSON or saving as DWG/DXF/PDF.Apache 2.0