# midas-nx-mcp > A local MCP server. It lets AI apps such as Claude Desktop, Claude Code, Codex and Gemini CLI read the model open in MIDAS Gen NX / Civil NX, running on the same Windows PC, through the MIDAS NX Open API, and apply only the changes the user confirms. A personal project (alpha) built by a MIDAS IT team member; not an official MIDAS IT product. MIT license. This file is a summary for AI agents helping a user install and use the server. Page for people: https://mcp.midasapi.space/en/ (Korean: https://mcp.midasapi.space/llms.txt) ## Key facts - Transport: stdio. The AI app starts and stops the server; it is not a remote server. - Command: `uvx midas-nx-mcp@latest` (PyPI package `midas-nx-mcp`) - Claude Desktop bundle: `midas-nx-mcp-.mcpb` from the latest GitHub release. Installs by double-click; no uv or Python needed. - MCP Registry name: `io.github.Dennis5882/midas-nx-mcp` - Requires: Windows, with Gen NX or Civil NX running on the same PC and its Open API connected (NX: `Apps > API Settings`). - Keys: one MAPI key per product (`MIDAS_MAPI_KEY_GEN`, `MIDAS_MAPI_KEY_CIVIL`). A wrong key still reports "connected", so make sure the user has not swapped them. Never print a key in the chat or a log. ## Install (the order to guide the user through) 1. Ask which AI app the user has. 2. Claude Desktop: download the `.mcpb` from the latest release and double-click it. Enter the Gen / Civil keys; leave the unused product empty. Keys can be changed later under `Settings > Extensions`. 3. Other apps: install uv (`powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"`), then use one of the configurations below. 4. Check: with a model open in NX, call `check_connection(product="gen")`. Claude Desktop config file (`Settings > Developer > Edit Config`, `claude_desktop_config.json`). After saving, quit the app completely (tray icon too) and start it again: ```json { "mcpServers": { "midas-nx": { "command": "uvx", "args": ["midas-nx-mcp@latest"], "env": { "MIDAS_MAPI_KEY_GEN": "", "MIDAS_MAPI_KEY_CIVIL": "" } } } } ``` Claude Code: ```bash claude mcp add midas-nx -e MIDAS_MAPI_KEY_GEN= -e MIDAS_MAPI_KEY_CIVIL= -- uvx midas-nx-mcp@latest ``` Codex (`~/.codex/config.toml`): ```toml [mcp_servers.midas-nx] command = "uvx" args = ["midas-nx-mcp@latest"] env = { MIDAS_MAPI_KEY_GEN = "", MIDAS_MAPI_KEY_CIVIL = "" } ``` Gemini CLI: the same entry as Claude Desktop, under `mcpServers` in `%USERPROFILE%\.gemini\settings.json`. Then run `gemini` in the working folder and trust it (in an untrusted folder the server is Disabled). Tools appear as `mcp_midas-nx_`. Sign-in: a Google AI Pro or Ultra subscription, or a Code Assist Standard or Enterprise account, uses Login with Google; a free personal account is refused with `IneligibleTierError`, so use `GEMINI_API_KEY` (Google AI Studio). ## Settings (environment variables) | variable | default | meaning | | --- | --- | --- | | MIDAS_MAPI_KEY_GEN | - | Gen NX key. Needed for product="gen" | | MIDAS_MAPI_KEY_CIVIL | - | Civil NX key. Needed for product="civil" | | MIDAS_TIMEOUT | 20 | seconds per call. Short on purpose, so an NX dialog is noticed quickly | | MIDAS_ANALYSIS_TIMEOUT | 300 | seconds for run_analysis | | MIDAS_SAVE_TIMEOUT | 120 | seconds for save_copy | | MIDAS_MAX_ROWS | 200 | most rows one call returns | | MIDAS_OUTPUT_DIR | C:/temp | where captures and copies are written. Must already exist | ## Tools Every tool takes `product` ("gen" or "civil"). If the user has not said which, ask. Reading (nothing in the model changes): - check_connection(product): connected or not, program name - list_tables(product?, search?): the `/db` and `/DESIGN` tables - describe_table(product, table): NX's own field schema for a `/db` table - read_table(product, table, ids?, limit?): records, at most MIDAS_MAX_ROWS 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 (Gen only), current selection - list_result_tables(search?): the result table types result_table accepts - result_table(product, table_type, load_cases?, components?, keys?, limit?): an analysis result table - capture_view(product, width?, height?): the NX window as a PNG - show_result(product, result, load_case, component?, show_values?, deform_scale?, width?, height?): has NX draw a result, then returns the PNG. result: "reactions" (FZ, FX, FY, MX, MY, MZ), "displacement" and "deformed_shape" (DXYZ, DX, DY, DZ), "beam_diagram" (My, Mz, Fx, Fy, Fz, Mx), "plate_forces" (Mxx, Myy, Mxy, Fxx, Fyy, Fxy). load_case: "DL", or a combination with its type, "gLCB1(CB)". Changes what the NX window shows, not the model. Changing (two steps): - run_analysis(product): runs the analysis. NX first saves over the open file. A document never saved is refused. - save_copy(product): Save As to a generated name in MIDAS_OUTPUT_DIR. NX then works on the copy. - write_records(product, table, records, mode): creates (create) or updates (update) `/db` or `/DESIGN` records, up to 50 at once. 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 unchecked, or drop the value). - delete_records(product, table, ids): deletes records by id, up to 50 at once. Nodes, materials, sections and thicknesses 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. - apply_operations(product, operations): creates, updates and deletes across several tables under one preview and one token. operations is a list of {table, action: create|update|delete, records or ids}. The steps run in midas-nx's dependency order (the preview shows it), and the whole batch is checked first, with records created by earlier steps counted as existing. Each step is read back; on a failure it stops and returns done, failed and not_run (nothing is rolled back). No UNIT changes. At most 20 operations and 200 records. - generate_load_combinations(product, kind): Gen only. kind "concrete", "steel" or "src". NX builds the KDS combinations from the load cases and their types and appends them after the existing ones (can be hundreds). Run again on a model that has them, and it adds a second set. Prompts (read tools only): check_reactions(product, load_case), check_story_drift(allowable_ratio, load_cases), review_model(product). Result tables: list_result_tables(category) sorts them into "model" (no analysis needed), "analysis" (needs the analysis), "story" (Gen; needs stories defined and calculated before the analysis) and "design". ## Rules for the agent 1. Call a changing tool first without confirm_token to get a preview. Show the preview to the user, and only after the user explicitly agrees, call it again with the same arguments and that confirm_token. If the model changed in between, it is refused. 2. Any change discards NX's analysis results. Run the analysis again before reading results. 3. If the original file must be kept, call save_copy before run_analysis. 4. On a timeout or `waiting_for_nx_dialog`, do not retry. Tell the user to answer the dialog in the NX window. 5. Pass on NX's messages from the tools as they are ("no analysis result", "The project is not opened", ...). Do not report success just because nothing raised an error. 6. Not offered: new document, open document, import, emptying a table, running design checks, saving outside MIDAS_OUTPUT_DIR. Do not work around these. ## Links - [Page for people](https://mcp.midasapi.space/en/) - [README](https://github.com/Dennis5882/midas-nx-mcp#readme): the full English documentation - [Korean user guide](https://github.com/Dennis5882/midas-nx-mcp/blob/main/docs/user_guide_ko.md) - [Latest release and .mcpb](https://github.com/Dennis5882/midas-nx-mcp/releases/latest) - [PyPI](https://pypi.org/project/midas-nx-mcp/) - [SDK midas-nx](https://github.com/Dennis5882/MIDAS-API-NX-SDK) - [Issues](https://github.com/Dennis5882/midas-nx-mcp/issues) ## Author Dennis (MIDAS IT) · sjj0507@midasit.com · [LinkedIn](https://www.linkedin.com/in/dennis58)