mech-cad-design-mcp
This server provides MCP tools for running a mechanical CAD design workflow: managing design sessions, retrieving reusable knowledge, recording validated models, sizing gears, confirming designs, publishing lessons, and registering standard parts with provenance.
Inspect system readiness for FreeCAD, knowledge store, and standard-part providers.
Start or resume design jobs after natural-language approval, and list or inspect their status.
Retrieve matching Product Family Knowledge and Design Lessons for a design without making retrieval a CAD gate.
Record model results by binding the exact FCStd hash to passed JSON, Markdown, and PNG evidence.
Report validation mistakes that were corrected or are still outstanding for a design.
Size spur gear drives from power, speeds, materials, duty, life, and safety factor, with stated limitations.
Confirm finished models, evaluate design lessons, and approve or decline lesson publication.
List standard-part providers in trust order and inspect the configured catalog binding status.
Register validated downloaded standard parts with provider, part identity, source URL, standard, and metadata.
Integrates with FreeCAD to create, edit, and validate mechanical CAD models, using FreeCAD as the interactive modeling engine and the FCStd file as the source of truth.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mech-cad-design-mcp Size a spur gear pair for 10 kW at 1450 rpm, ratio 3, then validate the model."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CAD Agent

CAD Agent helps coding agents turn mechanical requirements into validated FreeCAD models. It combines requirement reasoning, knowledge reuse, standard-part provenance, deterministic CAD state, automatic validation, correction, final confirmation, and reusable Design Lessons.
Nothing here guesses a number. Sizing follows published standards, the result carries its own assumptions and limitations, and a finished model is confirmed by a process the agent cannot reach or forge. A learned surrogate may offer a fast screening estimate, but only as a calibrated interval with declared coverage that is refused outside its fitted domain and can never gate completion.
The package provides the mech-cad-design CLI and
mech-cad-design-mcp server. A compatible coding agent performs the design
reasoning, while an external FreeCAD GUI MCP performs interactive CAD work. The
package does not embed a language model and does not replace engineering review.
Design process
User request
→ requirement clarification
→ short design proposal
→ one natural-language direction approval
→ knowledge retrieval
→ CAD modeling
→ automatic validation and correction
→ correction capture
→ final result
→ natural-language final confirmation
→ automatic Design Lesson evaluation
→ finish, or one decision before durable lesson publicationRelated MCP server: IntentForge MCP Server
Core capabilities
Create new designs or edit read-only snapshots of existing FCStd/STEP models.
Retrieve matching Product Family Knowledge and Design Lessons when available.
Continue CAD work when knowledge has no match or its backend is unavailable.
Model interactively in FreeCAD and keep FCStd as the source of truth.
Size a spur gear drive from duty inputs (power, speeds, material, duty, life, safety factor) through ratio, module, forces, bending and contact stress, shaft diameter, and required bearing capacity, then model and validate the resulting pair against the same calculated values. Preliminary sizing evidence, not a strength certification; see its
limitations.Find purchasable standard parts through configured structured providers and, when they miss, extend the search to authoritative manufacturer, standards body, industry association, and attributable authorized-distributor sources.
Register selected CAD components with provider, manufacturer, part identity, source, license, validation evidence, and SHA-256 provenance.
Calculate from Shigley's Mechanical Engineering Design independently of any one component: stress states and principal stresses, static and fatigue failure criteria, deflection and columns, shafts, bolted joints, springs, rolling and journal bearings, gears, welds, clutches, brakes and belts. Pure standard library, with every shipped constant checked against an independent anchor and every curve fit marked as one.
Record a surrogate screening estimate produced outside this package, as a calibrated interval with its coverage, calibration provenance and declared training domain. An estimate whose query falls outside that domain is refused and the refusal is kept. Screening never gates completion and never counts as a passed validation check; see Surrogate screening.
Test a screening interval against the closed-form
mechanicsresult for the same load case, so a miscalibrated surrogate is caught by the analytical answer rather than trusted over it.Validate geometry, dimensions, placements, interfaces, assemblies, fasteners, BOM consistency, and visual evidence.
Bind completion to the exact FCStd SHA-256 and passed JSON, Markdown, and PNG evidence.
Re-verify the finished model in a separate process the agent does not control, under a SHA-256-pinned FreeCAD executable running digest-pinned scripts, and accept the result only when a host-issued nonce and the recorded model digest both come back unchanged. The agent writes its own validation report; this is the part of the evidence it cannot author.
Record every validation attempt in an append-only correction ledger, so a failure that was fixed is not lost when the next attempt is recorded.
Evaluate reusable lessons automatically after the user confirms the final model, including lessons derived from the mandatory checks this design failed and then corrected.
Feed published correction lessons back through ordinary knowledge retrieval, so a later design finds the defect before repeating it.
Store long-term Product Family profiles, Knowledge Assertions, and Design Lessons in a local SQLite database by default, with optional PostgreSQL for shared team use and an optional rebuild-only Neo4j projection.
MCP surfaces
The default design surface contains the complete design flow:
design_system_statusdesign_startdesign_statusdesign_knowledge_retrievedesign_record_resultdesign_mistakesdesign_gear_sizedesign_screening_recorddesign_screening_statusdesign_confirmdesign_lesson_decidestandard_part_providers_getstandard_part_sources_statusstandard_part_download_register
The separate knowledge-admin surface manages Product Family onboarding,
knowledge search, Design Lesson supersession or revocation, and explicit
Neo4j projection rebuilds.
Architecture

Design sessions live under designs/<design-id>/ as atomic JSON state, one
authoritative model.FCStd, optional source snapshots, validation evidence,
outputs, and an optional lesson review card. CAD creation and validation do not
depend on PostgreSQL.
The knowledge store holds only durable Product Families, Knowledge Assertions, and Design Lessons, in local SQLite by default or PostgreSQL when configured. Neo4j is optional, rebuildable, and never authoritative. See Architecture and trust boundaries.
Learning from corrected mistakes
Every call to design_record_result appends one entry to the design's
append-only correction ledger: the model hash, the validation outcome, and each
failed check. Nothing in a later attempt rewrites an earlier one, so the record
of what went wrong survives the fix.
When the user confirms the final model, the package groups the mandatory checks
that failed on earlier attempts and passed on the confirmed model. Each such
defect becomes one deterministic Design Lesson candidate carrying
origin: validation_correction, its check signature, and how many attempts it
cost. These candidates join any the agent proposes on the same immutable review
card and follow the same single publication decision.
Derivation runs without a language model and never blocks: a design that made
no mistakes derives nothing, an advisory-only failure derives nothing, and a
malformed derivation is dropped rather than holding up a completed model. Once
published, correction lessons are ordinary Design Lessons, so
design_knowledge_retrieve returns them to later designs in the same scope.
Install and run
Python 3.12 or newer is required. There is no PyPI release yet, so install from a clone:
git clone https://github.com/bloodreaper005/cad-agent
cd cad-agent
python -m pip install .
mech-cad-design init \
--workspace /path/to/mech-cad-design-workspace \
--actor engineer \
--organization example-org \
--design-group example-group
mech-cad-design knowledge bootstrap \
--workspace /path/to/mech-cad-design-workspace
export MECH_DESIGN_WORKSPACE=/path/to/mech-cad-design-workspace
mech-cad-design-mcpThe knowledge store is a local SQLite database inside the workspace, so no
service has to be running. mech-cad-design status reports workspace,
FreeCAD, and knowledge readiness as structured JSON and exits non-zero when
setup is incomplete.
Windows PowerShell:
mech-cad-design init --workspace "D:\Mechanical Design Workspace" --actor engineer --organization example-org --design-group example-group
$env:MECH_DESIGN_WORKSPACE = "D:\Mechanical Design Workspace"
mech-cad-design-mcpCommand line
Every command prints one JSON document and exits 0 ready, 1 warning,
2 setup required, or 3 blocked. gear size uses the same scale: 0
sized, 1 sized with warnings, 3 rejected.
mech-cad-design init --workspace W --actor A --organization O --design-group G
mech-cad-design status --workspace W
mech-cad-design migrate --workspace W [--dry-run]
mech-cad-design design start --workspace W --design-id ID --title T \
--requirements-json '{"capacity": 4}' --proposal P --approve "yes"
mech-cad-design design list --workspace W
mech-cad-design design open --workspace W --design-id ID
mech-cad-design design status --workspace W --design-id ID
mech-cad-design design mistakes --workspace W --design-id ID
mech-cad-design gear size --power-kw 7.5 --pinion-rpm 1450 --gear-rpm 480 \
--pinion-material 20MnCr5_carburised_G2 --gear-material 20MnCr5_carburised_G2 \
--duty moderate --life-hours 20000 --safety-factor 1.5 [--out sizing.json]
mech-cad-design screening record --workspace W --design-id ID \
--screening-file screening.json \
--query-json '{"material_class": "linear_elastic"}'
mech-cad-design screening status --workspace W --design-id ID
mech-cad-design family start --workspace W --onboarding-id OB \
--family-id F --family-name N [--alias A]
mech-cad-design family analyze --workspace W --onboarding-id OB --analysis-file P
mech-cad-design family review --workspace W --onboarding-id OB --decision "approved"
mech-cad-design family publish --workspace W --onboarding-id OB
mech-cad-design family status --workspace W --onboarding-id OB
mech-cad-design knowledge bootstrap --workspace W
mech-cad-design knowledge import-postgres --workspace W --source-env E
mech-cad-design standard-parts providers [--category C]design mistakes reports which mandatory validation checks this design failed
and later corrected, and which defects are still outstanding.
design start is idempotent: repeating it with the same design intent resumes
the existing job instead of creating a second one. design open reports where
an existing job stands and which step comes next. Starting a design needs a
configured FreeCADCmd; listing, opening, and reading design jobs do not.
Select knowledge administration only when needed:
MECH_DESIGN_MCP_TOOL_PROFILE=knowledge-admin mech-cad-design-mcpThe current acceptance target is official FreeCAD 1.1.3. Configure the exact
FreeCADCmd path and SHA-256 in the workspace or environment. Durable
knowledge works out of the box on the local SQLite store; set
MECH_DESIGN_DATABASE_URL to use PostgreSQL instead, which has no pgvector
requirement. Install the neo4j extra (python -m pip install '.[neo4j]') only when the
optional relationship projection is wanted.
Project-owned Agent Skills
Operating boundaries
Generated models, reports, screenshots, databases, credentials, and customer-specific evidence stay outside the public repository.
Local MCP and database services remain bound to loopback interfaces.
A passed validation report proves only the checks that ran against one exact model revision. It is not FEA, manufacturing release, safety certification, or legal standards certification.
A surrogate screening estimate is a learned prediction with declared coverage, not an analysis. It is not FEA either, it proves nothing about the model, and no screening result can complete, block, or confirm a design.
Final engineering responsibility remains with the user or an authorized engineer.
Documentation
License
Project source is released under Apache-2.0. External dependencies, integrations, and assets retain their own licenses; see Third-Party Notices.
Available Tools
13 toolsdesign_confirmC
Confirm the model, evaluate lessons, or revise its pending review.
Inputs: design_id (required), confirmation_text (required), review_revision_text, lesson_candidates_json. Returns: result
design_gear_sizeA
Size a spur gear drive: ratio, teeth, module, forces, stresses, shaft, bearings.
Preliminary sizing evidence, not a strength certification. See the result's limitations for what is not evaluated.
Inputs: duty (required), power_kw (required), life_hours (required), gear_material (required), +5 more. Returns: result
design_knowledge_retrieveC
Retrieve applicable knowledge without making retrieval a CAD gate.
Inputs: query (required), design_id (required), required, features_json, +1 more. Returns: result
design_lesson_decideC
Approve all or selected review-card lessons, or decline publication.
Inputs: design_id (required), decision_text (required), selected_lesson_numbers_json. Returns: result
design_listA
List every design job in the workspace with its current state.
Inputs: no named parameters. Returns: result
design_mistakesC
Report validation defects this design corrected or still carries.
Inputs: design_id (required). Returns: result
design_record_resultB
Bind the exact FCStd hash to passed JSON, Markdown, and PNG evidence.
Inputs: design_id (required), model_path (required), evidence_paths_json (required), validation_report_path (required). Returns: result
design_startC
Start or resume a design after natural-language direction approval.
Inputs: title (required), design_id (required), approval_text (required), proposal_summary (required), +3 more. Returns: result
design_statusC
Read current model, validation, confirmation, and lesson state.
Inputs: design_id (required). Returns: result
design_system_statusB
Inspect local design, FreeCAD, knowledge, and provider readiness.
Inputs: no named parameters. Returns: result
standard_part_download_registerC
Register a validated downloaded standard part with full provenance.
Inputs: standard (required), file_path (required), source_url (required), part_number (required), +4 more. Returns: result
standard_part_providers_getC
List standard-part sources in configured trust order.
Inputs: category. Returns: result
standard_part_sources_statusB
Inspect the configured standard-part catalog binding.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct action or resource: readiness checks, lifecycle management, knowledge retrieval, evidence recording, gear sizing, and standard-part management are clearly separated. Even closely related tools like design_confirm and design_lesson_decide have non-overlapping responsibilities (model confirmation vs. lesson publication).
All tools follow a consistent domain prefix (design_ or standard_part_), but the suffix pattern mixes verb-first (design_start, design_confirm) with noun-first (design_status, design_mistakes) forms. The readability is high and the prefix convention provides strong predictability, so the minor deviations are not confusing.
13 tools is well within the ideal 3-15 range and matches the server's broad but focused scope—covering design workflow, knowledge, validation, and standard-part integration. Each tool offers a distinct function and none feel redundant or extraneous.
The tool surface covers the core design lifecycle (start, status, list, confirm, record, mistakes) and standard-part management (providers, sources, register). Minor gaps exist, such as no explicit design update/delete or a standard-part search/download tool, but the existing tools allow agents to work around these via design_start/confirm and the provider/source inspection tools.
Maintenance
Related MCP Connectors
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Parametric CAD as code: model 3D-printable parts on an exact B-rep kernel, measured.
Requirements authority for AI coding agents: binding requirements and acceptance criteria.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to safely generate parametric CAD parts (STEP/STL) using verified templates and FreeCAD, with validation and assembly support.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to convert natural language engineering prompts into editable parametric CAD models with deterministic parsing, validation, and edit support.5Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables agent-assisted CAD engineering, allowing users to create, validate, and export CAD designs through natural language, with a deterministic engine that has zero LLM runtime dependency.-
- AlicenseAqualityBmaintenanceEnables LLM agents (and humans at a terminal) to drive FreeCAD through 280+ structured tools for parametric mechanical design, drawings, FEM/CFD and other simulations, and manufacturing checks. Also supports multi-agent orchestration, letting a team of agents split one product into components, build them in parallel, and merge them back together with fitting joints.28650 PyPI13Apache 2.0