MIDAS Gen NX / Civil NX

io.github.Dennis5882由 GitHub 帳號 Dennis5882 發布v0.3.3更新於 Nov 6, 2026

Read and carefully change the model open in MIDAS Gen NX or Civil NX on this PC.

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

讀取並謹慎修改本機 MIDAS Gen NX 或 Civil NX 中開啟的模型,寫入操作先預覽再確認。

可以做什麼
  • 檢查 NX 連線並彙整模型:主要資料表筆數、單位系統、專案狀態、斷面性質、樓層參數與目前選取項目
  • 瀏覽與讀取模型資料:列出並說明 /db 與 /DESIGN 資料表,依 id 或筆數讀取紀錄,讀取設計參數表(如鋼結構設計規範)
  • 讀取分析結果:依類別列出結果表類型,取得反力、位移、桿件與板內力、週期及樓層結果
  • 擷取 NX 視窗為 PNG,或讓 NX 繪製結果圖形(反力、變形形狀、桿件圖、板內力)並回傳圖片
  • 預覽後修改模型:在單一或多個資料表新增、更新、刪除紀錄,產生 KDS 載重組合,執行分析,或另存副本
適用情境
適合在本機使用 MIDAS Gen NX 或 Civil NX 模型,並希望助理彙整模型、取出分析結果、顯示 NX 視窗畫面,或進行經確認的小幅修改(例如新增節點、產生載重組合)的情況。
執行需求
Windows 系統,Gen NX 或 Civil NX 執行於同一台電腦並已連上 Open API(Apps > API Settings)。每個產品需一組 MAPI 金鑰,透過 MIDAS_MAPI_KEY_GEN 與 MIDAS_MAPI_KEY_CIVIL 提供,兩者金鑰不同。MIDAS_OUTPUT_DIR 資料夾必須存在(預設 C:/temp)。可用 uvx 或 Claude Desktop 安裝包安裝;逾時設定與 MIDAS_MAX_ROWS 為選用。
安裝前請注意
需要 MIDAS_MAPI_KEY_GEN 與 MIDAS_MAPI_KEY_CIVIL 兩組金鑰。寫入會變更開啟的模型及其檔案:run_analysis 會先覆寫儲存目前文件,save_copy 會讓 NX 改為操作副本,任何寫入都會捨棄分析結果。多表操作失敗時不會回復。仍為 alpha 階段,僅在小型測試模型上驗證,並非 MIDAS IT 官方產品。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MIDAS Gen NX / Civil NX,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

midas-nx-mcp

A local MCP server that lets Claude (and other MCP clients) read the model open in MIDAS Gen NX or MIDAS Civil NX, and change it only through steps you see and confirm first. Built on the midas-nx SDK.

Built by a MIDAS IT team member as a personal project; not an official MIDAS IT product.

Status: alpha. Verified live on Gen NX 2026 and Civil NX 2026 on small test models (see PLAN.md); not yet used on large production models.

사용 설명서 (한국어): docs/user_guide_ko.md · 소개 페이지: https://mcp.midasapi.space/ · AI용 요약: llms.txt

What you can ask

  • "Summarise the Gen model." - node, element, material, section, load case counts
  • "Show the DL reactions." - result tables after an analysis
  • "Show me the model." - a picture of the NX window
  • "Show the DL moment diagram.", "Show the WX deformed shape." - NX draws the result, you get the picture
  • "Check the story drift." - ready-made checks in the client's prompt menu (reactions, story drift, model review)
  • "Generate the KDS concrete load combinations." - previewed, applied only after you agree
  • "Which design code is set?" - design parameter tables
  • "Add a node at (4, 3, 0)", "Run the analysis" - previewed, applied only after you agree

Requirements

  • Windows, with Gen NX or Civil NX running on the same PC and its Open API connected (Apps > API Settings)
  • A MAPI key per product (Apps > API Settings in each program). Keys differ between Gen and Civil, and a wrong key still reports "connected", so do not swap them.
  • uv (installs Python and the server for you); not needed for the Claude Desktop bundle below

Install

Claude Desktop - one click

Download midas-nx-mcp-<version>.mcpb from the latest release and open it (or drag it onto Settings > Extensions). Claude Desktop installs Python and the server itself, and asks for your Gen and Civil keys; leave the one you do not use empty. Change them later under Settings > Extensions.

Claude Desktop - by hand

Settings > Developer > Edit Config (not "Add custom connector": that is for remote servers) and add:

json
{  "mcpServers": {    "midas-nx": {      "command": "uvx",      "args": ["midas-nx-mcp"],      "env": {        "MIDAS_MAPI_KEY_GEN": "your Gen NX key",        "MIDAS_MAPI_KEY_CIVIL": "your Civil NX key"      }    }  }}

Quit Claude Desktop completely (tray icon too) and start it again. Settings > Developer should show midas-nx as running.

Claude Code

bash
claude mcp add midas-nx -e MIDAS_MAPI_KEY_GEN=your-gen-key -- uvx midas-nx-mcp

Gemini CLI

Add the same mcpServers entry as for Claude Desktop to %USERPROFILE%\.gemini\settings.json. Then run gemini in the folder you work in and trust it: in an untrusted folder the server stays Disabled. /mcp shows it connected; the tools appear as mcp_midas-nx_<tool>.

Signing in: a Google AI Pro or Ultra subscription, or a company Gemini Code Assist Standard or Enterprise account, uses Login with Google. A free personal account is refused there (IneligibleTierError); use an API key from Google AI Studio as GEMINI_API_KEY and choose "Gemini API Key" as the sign-in method.

Other clients (Codex, ...)

Add a STDIO server with command uvx, argument midas-nx-mcp, and the environment variables below.

Settings

variabledefaultmeaning
MIDAS_MAPI_KEY_GEN-Gen NX key. Needed for product="gen"
MIDAS_MAPI_KEY_CIVIL-Civil NX key. Needed for product="civil"
MIDAS_TIMEOUT20seconds per call. Short on purpose: a dialog in NX blocks the API
MIDAS_ANALYSIS_TIMEOUT300seconds for run_analysis only
MIDAS_SAVE_TIMEOUT120seconds for save_copy only
MIDAS_MAX_ROWS200most rows one call returns; the rest are counted, not sent
MIDAS_OUTPUT_DIRC:/tempwhere NX writes captures. Must exist

Tools

Reading (nothing in the model changes):

toolwhat it returns
check_connection(product)connected or not, program name
list_tables(product?, search?)the /db and /DESIGN tables midas-nx knows
describe_table(product, table)NX's own field schema for a /db table
read_table(product, table, ids?, limit?)records, capped at MIDAS_MAX_ROWS
model_summary(product)counts of the main tables, and the unit system
read_model_info(product, what)project status, section properties, story check parameters, current selection
list_result_tables(search?, category?)the result table types result_table accepts, as model / analysis / story / design, each with what NX needs first
result_table(product, table_type, load_cases?, components?, keys?, limit?)one result table; nothing exported
capture_view(product, width?, height?)the NX window as a PNG
show_result(product, result, load_case, component?, show_values?, deform_scale?)has NX draw reactions, displacement, deformed shape, beam diagram or plate forces for a load case or combination, and returns the picture. Changes what the NX window shows, not the model

Changing - each is called twice: first a preview with a confirm_token, then the same call with that token. It applies only if nothing changed in between, and reads the table back afterwards:

toolwhat it does
run_analysis(product)runs the analysis. NX saves the open file first; a never-saved document is refused. A dialog NX opens meanwhile is reported at once
save_copy(product)Save As to a generated name in MIDAS_OUTPUT_DIR; NX then works on the copy and the original stays as last saved. Gives a new document a file
write_records(product, table, records, mode)creates or updates up to 50 /db or /DESIGN records; a record naming one that does not exist (an element's material, section, thickness or nodes, a load's load case or group, ...) is refused; the preview says when NX picks the new ids itself
delete_records(product, table, ids)deletes up to 50 records by id; nodes, materials, sections and thicknesses still used by elements are refused; the preview names what NX deletes along with them (a load case's loads, a node's nodal loads, supports and masses, an element's beam loads, end releases and pressure loads); a /DESIGN record NX resets instead of removing is reported as such
apply_operations(product, operations)several creates, updates and deletes across tables under one preview and one token, e.g. the materials, sections, nodes, elements, load cases and loads of a small model; run in midas-nx's dependency order and checked as a whole first (a record an earlier step creates counts as existing); applied step by step with a read-back, stopping at the first failure with what is done, what failed and what did not run (nothing is rolled back); at most 20 operations and 200 records
generate_load_combinations(product, kind)Gen only: NX adds its KDS concrete, steel or SRC combinations from the load cases; the existing ones stay

Any write discards the analysis results in NX (even one that stores the same value); run the analysis again before reading results.

Prompts: check_reactions, check_story_drift, review_model - fixed review steps that use the read tools only.

Never exposed: new/open/import document, emptying a table.

Development

bash
git clone https://github.com/Dennis5882/midas-nx-mcpcd midas-nx-mcppython -m venv .venv.venv\Scripts\activatepip install -e ".[dev]"copy .env.example .env      # a checkout reads its .env; an installed package does notpytestruff check src tests scriptsnpx @modelcontextprotocol/inspector .venv\Scripts\python.exe -m midas_nx_mcp.server

AGENTS.md holds the safety rules every tool follows, and PLAN.md what has been verified live and what is open.

Contact

Bugs and ideas for this server go to GitHub Issues; questions about the products, licensing or the Open API service itself go to MIDAS IT's official support channels. For anything else, the author is Dennis: [email protected] or LinkedIn.

License

MIT

來源:README.md,提交 3e47a38

工具

16

check_connection

Check whether the given MIDAS NX product is reachable through the Open API. Returns the connection status and the program name. A blocked NX session (an open dialog) can still report "connected"; a later read then times out.

輸入參數product必填

list_tables

List the tables this server can read: /db model data (e.g. "NODE") and /DESIGN design parameters (e.g. "DESIGN/STEEL/DSTL", the steel design code). product: keep only tables that product supports. search: case-insensitive text matched against the table name and title, e.g. "load", "section", "design". No NX call is made.

輸入參數searchproduct

describe_table

The NX server's own field schema for one /db table (GET /info/db/<TABLE>). Call this before read_table to learn what each field means.

輸入參數table必填product必填

read_table

Records of one table in the open model, e.g. table="NODE" or "DESIGN/STEEL/DSTL". ids: return only these record ids. limit: at most this many records (capped by the server's MIDAS_MAX_ROWS). The reply says how many records the table holds in all, so a truncated answer is never mistaken for the whole table.

輸入參數idslimittable必填product必填

model_summary

Record counts of the main tables (nodes, elements, materials, sections, thicknesses, static load cases), plus the model's unit system. A table that fails to read is reported with its error, the rest still count.

輸入參數product必填

read_model_info

Model-wide information NX computes, not stored in a table. what: "project_status" (counts of model and load data), "section_properties" (computed area, inertia, ... per section id), "story_check_parameter" and "story_irregularity_parameter" (Gen only), or "selection" (what the user has selected in the NX window now). Entries keyed by id are capped like read_table.

輸入參數what必填limitproduct必填

list_result_tables

List the result/report table types result_table accepts, by category. Categories: "model" (mass, weights, loads, sections, supports; no analysis needed), "analysis" (reactions, displacements, member forces, stresses, modes), "story" (Gen: story drift, displacement, shear, stability, irregularity checks), "design" (design member forces). Each category says what NX needs before its tables have data. search: case-insensitive text matched against the type and its name, e.g. "reaction", "beam", "drift". No NX call is made.

輸入參數searchcategory

result_table

One result table from the open model (POST /post/TABLE, nothing exported). table_type: from list_result_tables. Common ones: "REACTIONG" (support reactions), "DISPLACEMENTG" (nodal displacements), "BEAMFORCE" (beam/column member forces), "PLATEFORCEL" (plate forces), "EIGENVALUEMODE" (periods and modes), "STORY_MASS" / "STORYWEIGHT" (story mass and weight, no analysis needed), "STORY_DRIFT_X" / "STORY_DRIFT_Y" and "STORY_SHEAR_FOR_RS" (Gen story checks), "BEAMDESIGNFORCES" / "COLUMNDESIGNFORCES" (design forces). load_cases: names with a type suffix, e.g. ["DL(ST)", "COMB1(CB)"]; the model's load cases are in read_table("STLD"). components: column names to keep. keys: node or element ids to restrict to. Rows beyond limit (capped by MIDAS_MAX_ROWS) are counted, not returned.

輸入參數keyslimitproduct必填componentsload_casestable_type必填

capture_view

A PNG of the model window as NX shows it now (POST /view/CAPTURE). Shows the current view: viewpoint, active elements and result display are whatever the user has set in NX; this tool does not change them. width and height are in pixels (each at most 2000); leave them out for the window size.

輸入參數widthheightproduct必填

show_result

Show an analysis result in the NX window and return it as a PNG. Like picking a result under Results in NX (POST /view/RESULTGRAPHIC, then /view/CAPTURE): the window keeps showing it afterwards. The model and its results are not changed. Needs the analysis run in NX. result and its components (default first): "reactions" FZ, FX, FY, MX, MY, MZ (values are always shown) "displacement" DXYZ, DX, DY, DZ (contour) "deformed_shape" DXYZ, DX, DY, DZ (deformed over undeformed) "beam_diagram" My, Mz, Fx (axial), Fy, Fz (shear), Mx (torsion) "plate_forces" Mxx, Myy, Mxy, Fxx, Fyy, Fxy load_case: a name from read_table("STLD"), e.g. "DL"; a combination with its type suffix as result_table takes it, e.g. "gLCB1(CB)", "cLCB1(CBC)". show_values writes the numbers on the picture; deform_scale scales the deformed shape (NX's own scale when left out). width/height: pixels, at most 2000 each.

輸入參數widthheightresult必填product必填componentload_case必填show_valuesdeform_scale

run_analysis

Run the analysis in NX (POST /doc/ANAL). Two steps: preview, then apply. NX saves the open document over its file before analysing (leaving a .bak), unsaved changes included, even when it then refuses the analysis. So this needs a document that has been saved before, seen in the NX window title on this PC; a new, never-saved document would raise a Save As dialog that blocks NX, and is refused here.

輸入參數product必填confirm_token

save_copy

Save the model as a new file in the output folder (POST /doc/SAVEAS). Two steps: preview, then apply. Like Save As in NX: from then on NX works on the copy, so the window, later saves and run_analysis use it, and the original file stays as it was last saved. The name is generated (mcp-save-<product>-<time>, .mgbx for Gen, .mcbz for Civil). Also the way to give a never-saved document a file, which run_analysis needs.

輸入參數product必填confirm_token

write_records

Create or update records in one /db or /DESIGN table. Two steps: preview, then apply. records: {id: fields}, e.g. {"13": {"X": 0, "Y": 0, "Z": 6.4}} for NODE; see describe_table for the fields (or read_table, for /DESIGN). "create" refuses ids that exist, "update" ids that do not, except record "1" of the one-record /DESIGN tables DCO, DCTL, LLRF, LMRR and SRDF, which have no create and are made by their first update. At most 50 records. After applying, the table is read back and what actually changed is returned; some tables store a new record under an id of their own choosing, so trust "added", not the ids you sent; the preview says when a table is known to do that. A record naming one that does not exist (an element's material, section, thickness or nodes, a load's load case or group, ...) is refused: NX would refuse it, store it pointing at nothing, or drop the value (midas-nx plan.validate). Any write discards the analysis results.

輸入參數mode必填table必填product必填records必填confirm_token

delete_records

Delete records by id from one /db or /DESIGN table. Two steps: preview, then apply. Only the listed ids, one DELETE per id; there is no way to empty a table here. Nodes still used by an element are refused (NX would delete the elements with them), and so are materials, sections and thicknesses still used by an element (NX would leave the elements pointing at nothing). The preview names the other records NX deletes or empties along with these: a load case's loads and combination entries, a node's nodal loads, supports and masses, an element's beam loads, end releases and pressure loads (midas-nx plan.validate). At most 50 ids. The table is read back afterwards: on some /DESIGN tables NX resets the record to defaults rather than removing it, or keeps it unchanged, and the result says which; records NX removed from other tables are counted.

輸入參數ids必填table必填product必填confirm_token

apply_operations

Create, update and delete records in several tables at once, e.g. the materials, sections, nodes, elements, load cases and loads of a small model. Two steps: preview, then apply. Each operation is what write_records or delete_records would take: table, action ("create", "update" or "delete"), and records ({id: fields}) or ids. The steps are run in midas-nx's dependency order (deletes first, then what is named before what names it), whatever order they are given in; the preview shows that order. The preview checks the whole batch first, with the records earlier steps create counted as existing: the same rules as write_records and delete_records. A UNIT change is not taken here. At most 20 operations and 200 records in all. Applying runs the steps one by one and reads each table back. It stops at the first step that fails, changes nothing, or stores new records under other ids while a later step names that table; what was already applied stays (nothing is rolled back) and the result lists the steps done, the failed one, and the ones not run. Any change discards the analysis results.

輸入參數product必填operations必填confirm_token

generate_load_combinations

Have NX add its KDS design load combinations. Two steps: preview, then apply. kind: "concrete" (KDS 41 20 : 2022, into LCOM-CONC), "steel" (KDS 41 30 : 2022, LCOM-STEEL) or "src" (KDS 41 SRC : 2022, LCOM-SRC). NX builds the combinations from the model's static load cases and their load types and appends them (cLCB1, cLCB2, ... for concrete); the existing ones stay. Gen NX only: Civil NX has no such command. After applying, the table is read back and the combinations NX added are returned. Any change discards the analysis results.

輸入參數kind必填product必填confirm_token

版本歷史

5
  1. v0.3.3最新Nov 5, 2026
  2. v0.3.2Nov 5, 2026
  3. v0.3.1Nov 4, 2026
  4. v0.3.0Nov 4, 2026
  5. v0.2.3Nov 3, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分