NX MCP Server
This server lets an AI agent drive Siemens NX locally to create and modify 3D models through MCP tools.
Part/file management: create, open, save, close parts, and export STEP files.
Status & inspection: report NX/bridge status, active part, and list sketches, bodies, features, edges, and faces.
Sketching: create sketches on XY/XZ/YZ planes and add lines, rectangles, circles, and arcs.
3D modeling: extrude sketches (create or subtract), revolve, mirror, shell, edge blend, chamfer, and boolean-unite bodies.
Holes: create simple holes, counterbore holes, and countersink holes on bodies.
Patterns: create linear and circular patterns of bodies.
View & workflow control: undo last operation, fit the modeling view, and release the bridge for manual NX editing.
Higher-level automation (from README): supports text-described modeling and automatic 2D drawing-to-NX modeling through the bundled nx-agent plan runner.
Provides automation for Siemens NX CAD software, including creating and modifying parts, sketches, extrusions, holes, edge blends, chamfers, boolean operations, and exporting STEP files.
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., "@NX MCP Server Create a new part, sketch a 100x60 rectangle, and extrude it 10 mm."
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.
NX MCP — Enhanced Edition (V2)
原始项目:DreamEnding/NX_MCP — MIT License. 本项目为 增强版,在原项目基础上增加了 C# 常驻 NXOpen 后端 (
NX_MCP_Loader)、扩展建模工具,以及用于“二维工程图 → NX 自动建模”的一体化 Agent Pack。
作者:抖音 无趣
NX MCP 是一套本地运行的 Siemens NX 自动化系统,可通过 Agent 接收文字建模要求,或自动读取二维机械工程图,统一生成建模计划并驱动 Siemens NX 完成建模。所有组件均在本机运行,不依赖云端服务。
推荐架构(V2)
Agent
-> 文字描述 --------┐
-> 二维工程图 -> Drawing Reader
↓
Modeling Planner
↓
Plan Runner
↓
Python MCP sidecar
↓
LoaderBridge
↓
named pipe (localhost)
↓
NX_MCP_Loader.dll
↓
NXOpen
↓
Siemens NX常驻 Loader 会在 NX 启动时自动加载,正常使用无需 Alt+F8 或手动运行 Journal。
NX_MCP_BACKEND=auto 默认优先使用 Loader,仅在 Loader 不可用时回退到旧版 Python bridge。
Related MCP server: self-host-fusion360-mcp
已认证工具(32 个)
已在 Windows + Siemens NX 2506 真机环境完成验证。
分类 | 工具 |
文件 |
|
状态 / 查询 |
|
几何检查 |
|
草图 |
|
拉伸 |
|
孔 |
|
特征 |
|
边处理 |
|
视图 / 恢复 |
|
安装 — 一体化一键流程
环境要求
Windows 10/11
已安装 Siemens NX(当前在 NX 2506 上完成真机验证)
Python 3.10+
已安装并至少启动过一次 Agent 客户端
克隆仓库后,在仓库根目录执行一条命令:
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1安装器会自动完成:
创建 Python 虚拟环境并安装 NX_MCP-Enhanced sidecar
创建 Workspace
为当前 Windows 用户配置
UGII_USER_DIR构建 C# Loader
将 Loader 部署到
%UGII_USER_DIR%\startup安装统一
nx-agentSkill(文字描述建模 + 二维工程图自动建模)安装 Plan Runner 并执行轻量测试
如果存在多个 Agent Profile,可手动指定:
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -AgentProfile "Profile 7"注:
-AgentProfile是当前安装脚本中的兼容参数名,仅用于指定本机 Profile。
如果安装前 Siemens NX 已经处于运行状态,安装完成后需要重启一次 NX,
让新进程读取 UGII_USER_DIR 并自动加载新部署的 Loader。
如果 NX 尚未启动,安装完成后直接启动即可。
安装完成并启动 / 重启 NX 后,有两种建模方式:
方式一:文字描述建模
新建一个 Agent 对话,直接描述你希望创建或修改的 NX 模型,例如:
用我打开的 NX 创建一个 100×60×10 mm 的底板,四角 R8,
并在四角各打一个 Ø8 通孔。文字建模由统一 nx-agent 生成建模计划,再通过 Plan Runner → resident Loader 执行;无需额外 MCP 客户端 JSON 配置。
方式二:二维工程图自动建模
新建一个 Agent 对话,上传二维机械工程图,并发送:
开始建模工程图模式由统一 nx-agent 内部执行:工程图读取 → 建模规划 → Plan Runner;阶段 C 失败时仅允许一次受控自动修复,并从干净状态完整重跑。
完整安装说明请查看 INSTALL.md。
路径自动检测
项目 | 检测 / 使用顺序 |
NX 安装目录( |
|
Workspace( | 环境变量 → |
NX 用户目录( | 优先使用已有环境变量;未设置时自动配置为 |
Loader 启动目录 |
|
当前限制
暂不支持真实螺纹 / 螺纹孔几何。
Sweep、Loft、Draft、Spline、渐开线齿轮及复杂自由曲面不在当前认证范围内。
当前真机认证环境为 NX 2506 / Windows;其他 NX 版本可能可用,但尚未正式验证。
STEP 导出后,NX Translator 可能需要短暂时间完成文件写入。
两种建模入口
Agent Pack 已经内置在本仓库中,并由 install.ps1 自动安装。
对外只安装一个统一 Skill:
nx-agent:自动识别并处理文字描述建模、工作区内已保存零件的安全修改、二维工程图自动建模
工程图模式内部仍保持模块化规则:工程图读取 → 建模规划 → Plan Runner。Plan Runner 作为内部执行器安装,不再作为单独 Skill 展示。
详细使用说明:docs/DRAWING_TO_NX.md
NX_MCP 核心仍可独立使用;install-agent.ps1 保留为高级工具,
用于只重装 Agent Pack,而不重新安装 NX_MCP 核心。
致谢
原始项目:DreamEnding/NX_MCP
增强版 / 一体化 Agent Pack:NX MCP contributors
许可证
MIT License,详见 LICENSE。
原始项目内容继续遵循其自身的 MIT License。
Available Tools
32 toolsnx_chamferB
Create a symmetric chamfer on edges of a body; default all edges.
Inputs: offset (required), body_id (required), edge_indices. Returns: object, status, message
nx_circular_patternA
Pattern a body circularly about an axis through center.
count is the total number of instances including the original
(count=4 yields 4 bodies); angle is the total sweep in degrees
(360.0 distributes evenly around a full circle). The original body is
kept and new instances are independent bodies (NOT united); use
nx_unite if merging is required.
Inputs: axis (required), angle (required), count (required), center (required), +2 more. Returns: status, message, objects
nx_close_partB
Close the active work part, optionally saving it first.
Inputs: save. Returns: status, message
nx_counterbore_holeA
Create a coaxial counterbore hole: a smaller deep through hole plus a larger shallow counterbore from the top face. Independent from nx_hole.
Inputs: center (required), body_id (required), hole_depth (required), hole_diameter (required), +3 more. Returns: object, status, message
nx_countersink_holeA
Create a coaxial countersink (conical) hole: a smaller deep through cylinder plus a conical countersink from the top face. Independent of nx_hole / nx_counterbore_hole.
Inputs: center (required), body_id (required), hole_depth (required), hole_diameter (required), +3 more. Returns: object, status, message
nx_create_partC
Create a part inside the configured workspace.
Inputs: path (required), units. Returns: part, status, message
nx_create_sketchC
Create and activate a sketch on a principal datum plane.
Inputs: name, plane. Returns: object, status, message
nx_edge_blendC
Create an edge blend (fillet) on edges of a body; default all edges.
Inputs: radius (required), body_id (required), edge_indices. Returns: object, status, message
nx_export_stepB
Export the active work part as STEP inside the configured workspace.
Inputs: path (required). Returns: path, status, message
nx_extrudeB
Extrude a sketch into a new body, or subtract it from an existing target body.
Inputs: distance (required), sketch_id (required), reverse, operation, +2 more. Returns: body, status, feature, message
nx_finish_sketchC
Deactivate and finish an explicit sketch reference.
Inputs: sketch_id (required). Returns: object, status, message
nx_fit_viewA
Fit the active modeling view.
Inputs: no named parameters. Returns: status, message
nx_holeC
Create a hole on a target body (circle sketch + boolean subtract).
Inputs: depth (required), center (required), body_id (required), diameter (required), +1 more. Returns: object, status, message
nx_linear_patternA
Pattern a body linearly along X/Y/Z.
count is the total number of instances including the original
(count=4 yields 4 bodies); spacing is the per-instance delta in mm.
The original body is kept and new instances are independent bodies
(NOT united); use nx_unite if merging is required.
Inputs: count (required), body_id (required), spacing (required), direction (required), +1 more. Returns: status, message, objects
nx_list_bodiesA
List bodies in the active work part.
Inputs: no named parameters. Returns: status, message, objects
nx_list_edgesA
Inspect every edge of a body: index, curve type, endpoints, midpoint, length, bounding box, direction and adjacent face count. Read-only.
Inputs: body_id (required). Returns: object
nx_list_facesA
Inspect every face of a body: index, tag, face type, centroid, area, normal (planar only) and adjacent edge count. Read-only.
Inputs: body_id (required). Returns: object
nx_list_featuresA
List features in the active work part.
Inputs: no named parameters. Returns: status, message, objects
nx_list_sketchesA
List sketches in the active work part.
Inputs: no named parameters. Returns: status, message, objects
nx_mirrorA
Mirror a body about a datum plane.
plane selects the mirror datum plane (XY/XZ/YZ); offset shifts
that plane along its normal by the given mm value (default 0). The
mirrored body is created as an independent body and is NOT united with
the source; use nx_unite if merging is required.
Inputs: plane (required), body_id (required), offset. Returns: object, status, message
nx_open_partC
Open a part from the configured workspace.
Inputs: path (required). Returns: part, status, message
nx_releaseA
Gracefully stop the bridge and release the NX GUI for manual editing.
The current command completes, then the journal ends and NX becomes fully interactive (no restart of NX required). Start the bridge again later by running the launcher journal (Alt+F8) again.
Inputs: no named parameters. Returns: status, message
nx_revolveA
Revolve a closed sketch section around an in-sketch 2D axis.
Creates a new solid only (no unite/subtract). axis_start and
axis_end are sketch XY coordinates defining the revolution axis;
angle is the sweep angle in degrees (0 < angle <= 360).
Inputs: axis_end (required), sketch_id (required), axis_start (required), angle, +1 more. Returns: object, status, message
nx_save_partB
Save the active work part.
Inputs: no named parameters. Returns: status, message
nx_shellA
Shell (hollow) a body: remove one face as an opening and keep a constant wall thickness. First version removes a single face; inward=True keeps the outer dimensions.
Inputs: body_id (required), thickness (required), remove_face_index (required), inward. Returns: object, status, message
nx_sketch_arcA
Add an arc (center, radius, start/end degrees) to an explicit sketch reference.
Inputs: center (required), radius (required), sketch_id (required), end_angle, +1 more. Returns: object, status, message
nx_sketch_circleC
Add a circle (center + diameter) to an explicit sketch reference.
Inputs: center (required), diameter (required), sketch_id (required). Returns: object, status, message
nx_sketch_lineB
Add a line to an explicit sketch reference.
Inputs: end (required), start (required), sketch_id (required). Returns: object, status, message
nx_sketch_rectangleC
Add a rectangle to an explicit sketch reference.
Inputs: corner1 (required), corner2 (required), sketch_id (required). Returns: status, message, objects
nx_statusA
Report bridge, NX version, and active-part status.
Inputs: no named parameters. Returns: status, connected, nx_version, active_part, +1 more
nx_undoB
Undo the last visible NX MCP operation.
Inputs: no named parameters. Returns: status, message
nx_uniteA
Boolean-unite one or more tool bodies into the target body.
The target body keeps its id; the tool bodies are consumed and
disappear from nx_list_bodies after the boolean.
Inputs: tool_body_ids (required), target_body_id (required). Returns: object, status, message
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 32 tools
Every tool targets a distinct operation: inspection, part management, sketch creation, sketch primitives, feature creation, boolean, patterns, and control. The three hole tools are clearly differentiated by geometry type, and list tools each query a different entity. No two tools appear to do the same thing.
All tools follow a consistent nx_verb_noun pattern using lower_snake_case, such as list_faces, create_sketch, extrude, and unite. The verbs are predictable and the naming style is uniform throughout the set, making the interface highly navigable.
While 32 tools is above the typical 3-15 range, it is appropriate for a comprehensive CAD modeling server. Each tool serves a specific function spanning part lifecycle, inspection, sketching, feature creation, boolean operations, and patterning. The count is justified by the breadth of NX modeling capabilities.
The tool surface covers part lifecycle (create/open/save/close), inspection (list faces/edges/sketches/bodies/features), sketch creation with primitives, feature creation (extrude, revolve, holes, shell, blend, chamfer), boolean unite, patterns, mirror, export, and undo. Missing delete and edit-parameter operations can be worked around via undo and recreation, so no major dead ends.
Maintenance
Related MCP Connectors
Global CAD/BIM, industrial engineering (FEM, CFD) and property tools via one MCP endpoint.
Headless CAD engine & MCP server for 2D/3D drafting, solids, DXF/SVG export, and automation.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Read and edit the Revit 2024–2027 model on your PC. Needs the free Revit MCP add-in.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables natural language control of Siemens NX for text-to-CAD modeling, generating .prt files via NX Open API. Currently supports basic solids, booleans, and fillets in batch mode.5-
- AlicenseBqualityBmaintenanceEnables any MCP client to drive Autodesk Fusion 360 locally, with ~100 tools for modeling, assemblies, CAM, inspection, and verification, plus enhanced component targeting and explicit thread creation.1081MIT
- AlicenseBqualityBmaintenanceEnables safe, local Siemens NX automation through MCP, providing tools for part creation, sketching, extrusion, feature manipulation, measurement, save-as, and STEP export within a confined workspace.19MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to build and edit native CAD parts and assemblies, inspect saved geometry and measurements, retain revisions, run mechanism and interference checks, and export STEP/STL/GLB artifacts through MCP tools.MIT