LLM Agent Built a Gearbox in KOMPAS-3D, but Scored Only 50 out of 100 on the Specification

The author of the kompas-mcp plugin connected an LLM agent to KOMPAS-3D over MCP, and the agent built a gearbox together with a full set of design documentation. In a homemade benchmark of 15 tasks, shafts and assemblies scored 88–100 out of 100, while the assembly specification scored only 50. The agent writes code against the KOMPAS API, but it knows that API poorly and gets confused when laying out drawings. Decisions and acceptance of the work remain with the engineer. • After every edit, the plugin checks the rebuild and body intersections • Working drawing of a gear wheel: 82 points in 49 minutes on Sonnet • Steel frame detailing drawings (KMD): 88 points in 32 minutes on Opus

AI-processed from Habr AI; edited by Hamidun News
LLM Agent Built a Gearbox in KOMPAS-3D, but Scored Only 50 out of 100 on the Specification
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1After every edit, the plugin checks the rebuild and body intersections
Working drawing of a gear wheel82 points in 49 minutes on Sonnet
Steel frame detailing drawings (KMD)88 points in 32 minutes on Opus

The author of an article on Habr wrote kompas-mcp, a plugin that lets an LLM agent work inside KOMPAS-3D, a Russian CAD system for engineering modeling. The agent opens models, builds and edits parts and assemblies, and produces drawings. It connects over MCP, an open protocol that lets a model call external tools.

The main example is a single-stage cylindrical gearbox from a classic machine-design course project: everything from the calculation to the assembly drawing and specification, i.e. a full set of design documentation.

To find out where the agent actually helps, the author put together a homemade benchmark of 15 tasks, each scored up to 100 points. Parts and assemblies got 88–100 points, while the assembly specification got only 50.

What the agent produced on the gearbox course project

The author does not consider himself a design engineer and acted as the client: he set the technical requirements stage by stage, accepted each stage, and caught errors visible to the naked eye. The input data are typical: an AIR112M4 motor (5.5 kW, 1440 rpm), a gear ratio of 4, and a service life of 10 000 hours. The agent calculated the gear drive using the Chernavsky method. The calculation is not stored as an image. It is written as variables and equations directly in the KOMPAS document, and the results table references them.

The agent then built an assembly with a skeleton: center distance, module, tooth counts, diameters, and widths are stored in the assembly, and the parts take their dimensions from there. The agent checked the parametric behavior itself: it temporarily set u = 5, confirmed that the skeleton rebuilt, and rolled the change back. The model includes a pinion shaft with z = 26 and a wheel with z = 105 (m = 1.

5), an output shaft, 207 and 208 bearings, keys per GOST 23360, shaft ends per GOST 12080, and a cast housing with bosses and draft angles, plus recessed covers for 35×58 and 40×60 seals. The teeth are built with the standard "Shafts and Mechanical Transmissions 3D" application, not with sketches.

Parametric behavior appeared only after a human stepped in. The author asked whether the calculation results had been passed into variables. They had not. The agent proposed options, and the author chose equations in the calculation document and reference variables in the assembly. Another catch: on the drawings, the keyway ends were concave, and the agent fixed this in both the models and the drawings. The author does not vouch for the correctness of the gearbox as a whole, and he still has questions about the documentation set.

Code instead of a set of buttons: how the plugin works

The plugin is an MCP server for KOMPAS. Any MCP-capable client can connect: Claude Code, Claude Desktop, Cursor, VS Code, Codex, Gemini CLI. The article uses Claude. Inside KOMPAS runs a library with embedded Python, and the agent's code executes directly in the program's process with full API access. Outside, a small bridge connects MCP to that library. Installation is a single script into the user profile, with no administrator rights.

The key design decision is to avoid a separate tool for every action. KOMPAS has thousands of operations with dozens of parameters each, and a real task is always a combination of them. So the agent writes a script against the API and runs it. The plugin gives it a reference for interfaces and methods, an overview of the model (tree, variables, mates, links between parts and drawings), checks (rebuild errors, body intersections, mass as a control number), and frames with section views, so the agent sees the model instead of guessing from numbers.

Every edit happens inside a stage: open, run code, close. On closing, the plugin checks the result, and if rebuild errors or intersections have appeared, the stage is not accepted. The agent has to sort it out or roll the whole stage back. In KOMPAS history a stage is a single entry, so a human can also undo it in one action. The agent can also launch a separate KOMPAS instance so it does not get in the engineer's way in their own window.

The benchmark: where it scores 100 and where 50

The author stresses that the benchmark is homemade. The 15 tasks are derived from the ready-made assemblies that ship with KOMPAS. He takes a finished product, removes or breaks something, and asks the agent to restore it. The original assembly serves as the reference, and checking is automatic: geometry, assembly, mass, drawing. It is a tool for improving the plugin, not a scientific comparison of models.

Some of the results (points out of 100, time):

  • shaft from a working drawing, Sonnet: 100, 8 minutes;
  • shaft assembly from an assembly drawing, Sonnet: 88–94, 7 minutes;
  • new shaft in the context of an assembly, Sonnet: 91, 15 minutes;
  • completing a steel frame from a sample, Opus: 100, 5 minutes;
  • working drawing of a gear wheel, Sonnet: 82, 49 minutes;
  • KMD for a steel frame (marks, drawings, steel), Opus: 88, 32 minutes;
  • steel frame assemblies from standard solutions, Opus: 63, 44 minutes;
  • specification for an assembly, Sonnet: 50, 7 minutes.

In 3D the agent performs confidently, needs almost no corrections, and uses few tokens. Drawings and design documentation come out with remarks and cost noticeably more time and tokens. The agent selects views, callouts, dimensions, and tolerances, but gets tangled in the API when placing everything on the sheet: the information is on the drawing, but it is hard to read. KOMPAS's built-in libraries are hard to integrate, many lack even COM interfaces, and a simple action turns into a series of commands.

The second cause of the weak spots is a lack of data. There are few examples of KOMPAS API code online, so models get confused on individual operations and token consumption grows. For now, only Opus-class models can handle the hard tasks, while Sonnet pulls off the simple ones. The author hopes that new generations of models, including open ones, will make this kind of modeling more accessible.

The practical takeaway: the agent already takes over routine 3D work — a part from a drawing, an assembly, an edit across a whole assembly, completion from a sample, a tolerance estimate. Drawings and specifications need to be checked and finished by hand. The plugin is on GitHub (cad-lab-ai/kompas-mcp), and the author asks people to send in cases where the agent helped and where it did not.

Story

Key Questions Answered

What the agent produced on the gearbox course project?

The author does not consider himself a design engineer and acted as the client: he set the technical requirements stage by stage, accepted each stage, and caught errors visible to the naked eye. The input data are typical: an AIR112M4 motor (5.5 kW, 1440 rpm), a gear ratio of 4, and a service life of 10 000 hours. The agent calculated the gear drive using the Chernavsky method. The calculation is not stored as an image. It is written as variables and equations directly in the KOMPAS document, and the results table references them. The agent then built an assembly with a ske

What are the key details on Code instead of a set of buttons: how the plugin works?

The plugin is an MCP server for KOMPAS. Any MCP-capable client can connect: Claude Code, Claude Desktop, Cursor, VS Code, Codex, Gemini CLI. The article uses Claude. Inside KOMPAS runs a library with embedded Python, and the agent's code executes directly in the program's process with full API access. Outside, a small bridge connects MCP to that library. Installation is a single script into the user profile, with no administrator rights. The key design decision is to avoid a separate tool for every action. KOMPAS has thousands of operations with dozens of parameters each, a

What are the key details on The benchmark: where it scores 100 and where 50?

The author stresses that the benchmark is homemade. The 15 tasks are derived from the ready-made assemblies that ship with KOMPAS. He takes a finished product, removes or breaks something, and asks the agent to restore it. The original assembly serves as the reference, and checking is automatic: geometry, assembly, mass, drawing. It is a tool for improving the plugin, not a scientific comparison of models. Some of the results (points out of 100, time): shaft from a working drawing, Sonnet: 100, 8 minutes; shaft assembly from an assembly drawing, Sonnet: 88–94, 7 minutes; ne

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…