codersag/mechanical-mcp
MCP server that connects AI assistants to ANSYS Mechanical via PyMechanical gRPC
c24735666acaansys-mechanical-mcp1.4.0 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 15 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
- 1 of 71 tools, prompts and resources could not be followed through the code
- 1 tool, prompt or resource registered only in the repository's tests is not counted on this page
Top risks in plain words
- HIGHTools
acp_inspect_cdb,acp_prepare_external_model,acp_save_modelread or write any file path by design: an agent steered by prompt injection can use them that way.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it only the folder it needs
acp_inspect_cdb,acp_prepare_external_model,acp_save_modelcan read or write any file path. Mount a single project folder, read-only where you can. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
acp_inspect_cdb,acp_prepare_external_model,acp_save_model, switch them off. - Give it a narrowly scoped token
Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 70 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
acp_prepare_external_modelacp_inspect_cdb, acp_prepare_external_model, acp_save_model, acp_wb_build_script, add_contact, add_directional_deformation and 48 moreacp_create_fabric, acp_create_layup, acp_create_material, acp_create_oriented_selection_set, acp_create_rosette, acp_create_solid_model and 62 moreNo tool was seen to: connect to the internet or other hosts; read passwords, tokens or keys; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files51 tools · acp_inspect_cdb, acp_prepare_external_model, add_contact +48
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (70: 70 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
acp_inspect_cdbtool Summarise a CDB: node/element counts, bounding box (m), element types, materials, sections,FilesEnv varsoutside textReads/writes files
Summarise a CDB: node/element counts, bounding box (m), element types, materials, sections,
element coordinate systems, element and node component names with sizes.acp_prepare_external_modeltool Convert an ACP solid-model CDB into a per-fibre-angle external model for Mechanical.ProcessesFilesEnv varsoutside textReads/writes files
Convert an ACP solid-model CDB into a per-fibre-angle external model for Mechanical.
Each distinct ply angle gets its own material id and element coordinate system; elements become
homogeneous hexahedra; node components STRIKE (top surface within strike_radius_mm of the centre)
and GNDNODES (the lateral faces, optionally the bottom) are added. Import the result through a
Workbench External Model system. The returned mapping tells you which material id carries which
fibre angle (needed when assigning properties in Mechanical).
normalise_with_mapdl (default on) re-writes the file through MAPDL, which Workbench's External Model
reader needs; turn it off only if ANSYS is not installed. ground_bottom adds the bottom face to GNDNODES.
node_boxes_json replaces STRIKE / GNDNODES with your own node components: a JSON object
{"NAME": [xmin, xmax, ymin, ymax, zmin, zmax]} in metres, null = open side, e.g.
{"INNER_WALL": [null, null, null, null, 0.125, 0.125]}.acp_save_modeltool Save an ACP model as an .acph5 file (acp:h5 format) that the ACP GUI can open.FilesEnv varsReads/writes files
Save an ACP model as an .acph5 file (acp:h5 format) that the ACP GUI can open.
acp_create_fabrictool Create a fabric (one ply layer) from a material. thickness is in model length units.Env vars
Create a fabric (one ply layer) from a material. thickness is in model length units.
acp_create_layuptool Create a modeling group with one ply per angle (in order from the reference surface).Env vars
Create a modeling group with one ply per angle (in order from the reference surface).
Plies are named plyNN_<angle> (the name encodes the angle, which acp_prepare_external_model
relies on). Optionally appends a 'bulk' ply of bulk_layers layers of bulk_fabric.acp_create_materialtool Create an orthotropic ply material (SI units unless the model was imported with other units).Env vars
Create an orthotropic ply material (SI units unless the model was imported with other units).
Properties are placeholders when the downstream solve takes thermal / electrical behaviour from
elsewhere (for example a user material in Mechanical).acp_create_oriented_selection_settool Create an oriented selection set. The laminate is extruded toward orientation_point.Env vars
Create an oriented selection set. The laminate is extruded toward orientation_point.
Example: shell mesh at z=0 and orientation_point (0,0,-1) puts the plies below the surface
(the first ply listed in a modeling group sits against the reference surface).acp_create_rosettetool Create a parallel rosette. dir1 is the 0-degree reference direction.Env vars
Create a parallel rosette. dir1 is the 0-degree reference direction.
acp_create_solid_modeltool Create a solid model from oriented selection sets (analysis_ply_wise gives one element layer per ply).Env vars
Create a solid model from oriented selection sets (analysis_ply_wise gives one element layer per ply).
acp_export_solid_modeltool Export a solid model to CDB ('ansys:cdb') or H5 ('ansys:h5').Env vars
Export a solid model to CDB ('ansys:cdb') or H5 ('ansys:h5').acp_import_modeltool Import a mesh into a new ACP model.Env vars
Import a mesh into a new ACP model.
fmt: 'ansys:cdb' (blocked CDB), 'ansys:h5', 'ansys:dat', or 'acp:h5' (a saved ACP model).
unit_system: si | mks | umks | mpa | from_file (ignored for 'acp:h5').
The element set 'All_Elements' is created automatically for ANSYS meshes.acp_launchtool Start (or reuse) a PyACP-managed ACP server. Needs AWP_ROOT261 or the default install path.Env vars
Start (or reuse) a PyACP-managed ACP server. Needs AWP_ROOT261 or the default install path.
acp_model_treetool List the main objects of a model with their statuses.Env vars
List the main objects of a model with their statuses.
acp_shutdowntool Stop the ACP server and forget all models.Env vars
Stop the ACP server and forget all models.
acp_statustool Report whether ACP is running and which models are loaded.Env vars
Report whether ACP is running and which models are loaded.
acp_updatetool Update (recompute) the model; reports each solid model's status and analysis-ply count.Env vars
Update (recompute) the model; reports each solid model's status and analysis-ply count.
acp_wb_build_scripttool Write the script that builds a layup inside WORKBENCH's own ACP (legacy API) and ends with wbupdate().FilesEnv vars
Write the script that builds a layup inside WORKBENCH's own ACP (legacy API) and ends with wbupdate().
`material` must already exist in the ACP-Pre system's Engineering Data (import a composite material there first).
Run the file with the Workbench commands returned by acp_wb_commands. Nothing is executed here.acp_wb_commandstool Return the Workbench scripting commands that run an ACP script via Setup.RunScript and, optionally, link theEnv vars
Return the Workbench scripting commands that run an ACP script via Setup.RunScript and, optionally, link the
ACP Setup cell to a Mechanical Model cell with TransferData. Paste them into a Workbench scripting session
(for example the ansys-workbench MCP's execute_workbench_script). For Thermal-Electric Mechanical systems the
transferred solid is one SOLID225 body whose plies are identifiable by section number; use acp_wb_ply_split_snippet.acp_wb_ply_split_snippettool Return the Mechanical command snippet that splits an ACP-transferred Thermal-Electric solid into plies by sectionEnv vars
Return the Mechanical command snippet that splits an ACP-transferred Thermal-Electric solid into plies by section
number (own material copy, ESYS and TB,USER per ply). Use null for an isotropic bulk layer. Verified on a 4-ply test:
sections 3..6 were exactly one ply (672 elements) each.add_contacttool Add a contact region between two sets of geometry. Each side is given by entity ids or aFilesEnv varsoutside text
Add a contact region between two sets of geometry. Each side is given by entity ids or a
bounding box in mm ("xmin,xmax,ymin,ymax,zmin,zmax", blank = open; entities are chosen by
CENTROID) plus an optional body name. Nothing is created on error. A region that already joins
exactly these entities is returned if its type (and friction) match (already_exists: true,
with its suppressed state); if they differ the call is refused with the differences unless
update_existing=true, which changes type/friction and reports `updated`. Args: contact_type (bonded, no_separation,
frictionless, rough, frictional), source_*, target_*, entity_type (face/edge),
friction_coefficient, reuse_existing, update_existingadd_directional_deformationtool Add Directional Deformation result. An unknown axis or a missing named selection is anFilesEnv varsoutside text
Add Directional Deformation result. An unknown axis or a missing named selection is an
error and nothing is created. Before the solve the values are null; ok:true means created.
An identical existing result is returned (already_exists: true).
Args: axis (X/Y/Z), named_selection, analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_displacementtool Add Displacement BC. Pass None for a DOF to leave it free (at least one must be given).FilesEnv varsoutside text
Add Displacement BC. Pass None for a DOF to leave it free (at least one must be given).
Args: named_selection, x_mm, y_mm, z_mm (None=free), analysis_index, entity_ids, box_mm,
entity_type, body_name
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. Nothing is created on error.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_equivalent_stresstool Add Equivalent (von Mises) Stress result, optionally scoped to a named selection (aFilesEnv varsoutside text
Add Equivalent (von Mises) Stress result, optionally scoped to a named selection (a
missing or empty one is an error and nothing is created). Before the solve the object is
created with null values; ok:true means created, not validated. An identical existing
result is returned (already_exists: true) instead of a duplicate.
Args: named_selection (empty = whole model), analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_fixed_supporttool Add Fixed Support. Args: named_selection, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_insideFilesEnv varsoutside text
Add Fixed Support. Args: named_selection, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_inside
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. A missing or empty named selection,
ids that do not exist, or a box that matches nothing is an error and nothing is created.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_forcetool Add Force load in Newtons. Args: named_selection, fx_n, fy_n, fz_n, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_insideFilesEnv varsoutside text
Add Force load in Newtons. Args: named_selection, fx_n, fy_n, fz_n, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_inside
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. Nothing is created on error.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").
allow_zero: create an all-zero load on purpose (default: refused).add_frictionless_supporttool Add Frictionless Support. Args: named_selection, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_insideFilesEnv varsoutside text
Add Frictionless Support. Args: named_selection, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_inside
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. Nothing is created on error.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_momenttool Add Moment load in N*m on a named selection. Nothing is created on error.FilesEnv varsoutside text
Add Moment load in N*m on a named selection. Nothing is created on error.
Args: named_selection, mx_nm, my_nm, mz_nm, analysis_index
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").
allow_zero: create an all-zero load on purpose (default: refused).add_normal_stresstool Add a Normal Stress result. Before the solve the values are null; ok:true means created.FilesEnv varsoutside text
Add a Normal Stress result. Before the solve the values are null; ok:true means created.
An identical existing result is returned (already_exists: true).
Args: axis (x, y, z), analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_pressuretool Add Pressure load in Pascals. Args: named_selection, magnitude_pa, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_insideFilesEnv varsoutside text
Add Pressure load in Pascals. Args: named_selection, magnitude_pa, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_inside
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. Nothing is created on error.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_principal_stresstool Add Principal Stress result. Before the solve the values are null; ok:true means created.FilesEnv varsoutside text
Add Principal Stress result. Before the solve the values are null; ok:true means created.
An identical existing result is returned (already_exists: true).
Args: which (max/mid/min), analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_reaction_forcetool Add a Force Reaction probe scoped to the geometry of a named selection. Before the solveFilesEnv varsoutside text
Add a Force Reaction probe scoped to the geometry of a named selection. Before the solve
the x/y/z/total values are null; ok:true means created. A missing or empty named selection
is an error and nothing is created; an identical probe is returned (already_exists: true).
Args: named_selection, analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_remote_displacementtool Add Remote Displacement BC on a named selection. Pass None for a DOF to leave it freeFilesEnv varsoutside text
Add Remote Displacement BC on a named selection. Pass None for a DOF to leave it free
(at least one must be given). Nothing is created on error (missing or empty named selection).
Args: named_selection, x_mm, y_mm, z_mm, rot_x_deg, rot_y_deg, rot_z_deg, analysis_index
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_remote_forcetool Add Remote Force load (N) on a named selection. Nothing is created on error.FilesEnv varsoutside text
Add Remote Force load (N) on a named selection. Nothing is created on error.
Args: named_selection, fx_n, fy_n, fz_n, analysis_index
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").
allow_zero: create an all-zero load on purpose (default: refused).add_standard_gravitytool Add Standard Earth Gravity (always 1 g = 9.80665 m/s^2). Only the DIRECTION of the vectorFilesEnv varsoutside text
Add Standard Earth Gravity (always 1 g = 9.80665 m/s^2). Only the DIRECTION of the vector
matters (it is normalised) and it must lie along +-X, +-Y or +-Z, because that is all
Mechanical's Standard Earth Gravity supports; any other direction is an error. Default -Y.
Args: analysis_index, x_component, y_component, z_component
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_stress_intensitytool Add a Stress Intensity result. Before the solve the values are null; ok:true meansFilesEnv varsoutside text
Add a Stress Intensity result. Before the solve the values are null; ok:true means
created; an identical existing result is returned (already_exists: true).
Args: analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_stress_tooltool Add Stress Tool (safety factor, stress ratio) using material limits. ok:true meansFilesEnv varsoutside text
Add Stress Tool (safety factor, stress ratio) using material limits. ok:true means
created (and evaluated if the model was solved); an existing one is returned
(already_exists: true). Args: analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_total_deformationtool Add Total Deformation result. Before the analysis is solved the object is created withFilesEnv varsoutside text
Add Total Deformation result. Before the analysis is solved the object is created with
null values (max/min) and a note; ok:true means created, not validated. If an identical
result already exists it is returned (already_exists: true) instead of a duplicate.
Args: mode (0=not modal; >0 needs a Modal analysis), analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_total_deformation_all_modestool Add Total Deformation for modes 1..num_modes of a SOLVED Modal analysis (all or nothing).FilesEnv varsoutside text
Add Total Deformation for modes 1..num_modes of a SOLVED Modal analysis (all or nothing).
An unsolved or non-modal analysis, or num_modes above the extracted modes, is an error and
nothing is created. Args: num_modes, analysis_index
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").assign_materialtool Assign a material from Engineering Data to every body with this exact name (bodies of theFilesEnv varsoutside text
Assign a material from Engineering Data to every body with this exact name (bodies of the
same name in different parts are all changed). Args: body_name, material_namecheck_mechanical_connectiontool Check connection status. While another call (for example a blocking solve) is usingFilesEnv varsoutside text
Check connection status. While another call (for example a blocking solve) is using
Mechanical this answers at once with connected: true, busy: true instead of waiting.connect_to_mechanicaltool Connect to a running ANSYS Mechanical session on this machine (one at a time).FilesEnv varsoutside text
Connect to a running ANSYS Mechanical session on this machine (one at a time).
Connecting again replaces the connection only if the new session answers. The handshake
is bounded (MECHANICAL_MCP_CONNECT_TIMEOUT_S, default 20 s): a port that is not Mechanical
is reported, it does not freeze the server.
Args: port: gRPC port reported by Workbench (changes every session)convert_part_to_point_masstool Convert all unsuppressed bodies inside a named Part to a combined Point Mass, then createFilesEnv varsoutside text
Convert all unsuppressed bodies inside a named Part to a combined Point Mass, then create
a Named Selection of all coplanar attachment faces on the nearest structural surface.
Everything is measured before anything changes; on any failure it is all undone. Refused if
a point mass for the same part already exists unless allow_duplicate=true. LIMIT: only
principal moments of inertia are available (inertia_basis: "principal"); see
convert_prefix_to_point_mass. Args: part_name, proximity_multiplier (0.1-100), allow_duplicate
Suppressing the bodies leaves loads, results, contacts or mesh controls scoped to their geometry with an
empty scope: they are listed (scope_loss) and the conversion is refused unless acknowledge_scope_loss=true.
Matched bodies that are not solids are neither converted nor suppressed; they are named in the warnings.convert_prefix_to_point_masstool Convert all unsuppressed bodies whose name starts with body_name_prefix (required, notFilesEnv varsoutside text
Convert all unsuppressed bodies whose name starts with body_name_prefix (required, not
empty) to a combined Point Mass, then create a Named Selection of all coplanar attachment
faces on the nearest structural surface. Everything is measured before anything changes;
on any failure the point mass, the selection and the suppression are undone. Refused if a
point mass for the same prefix already exists (converting again would double count the mass)
unless allow_duplicate=true. LIMIT: Mechanical gives only each body's PRINCIPAL moments of
inertia; they are used as Ixx, Iyy, Izz (inertia_basis: "principal"), exact only when the
principal axes are the global axes, and products of inertia are dropped; warnings say so.
Args: body_name_prefix, proximity_multiplier (0.1-100, default 3.0), allow_duplicate
Suppressing the bodies leaves loads, results, contacts or mesh controls scoped to their geometry with an
empty scope: they are listed (scope_loss) and the conversion is refused unless acknowledge_scope_loss=true.
Matched bodies that are not solids are neither converted nor suppressed; they are named in the warnings.create_named_selectiontool Create a named selection from exactly one of: body_names (comma-separated exact body names),FilesEnv varsoutside text
Create a named selection from exactly one of: body_names (comma-separated exact body names),
body_prefix, entity_ids (geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank
= open; entities are chosen by CENTROID unless fully_inside=true) with entity_type
face/edge/vertex and optional body_name. An empty result creates nothing; an existing name is
refused unless replace=true (and then only if nothing is scoped to the old one). The response
gives the entity count. A body name that matches nothing is an error (nothing created) unless
allow_missing=true, which creates the selection from the others and lists `missing`.
Args: name, body_names, body_prefix, entity_ids, box_mm, entity_type, body_name, fully_inside,
replace, allow_missingdelete_named_selectiontool Delete every named selection with this name. Refused (with the list of dependents) if loads,FilesEnv varsoutside text
Delete every named selection with this name. Refused (with the list of dependents) if loads,
results, probes, contacts, point masses or mesh controls are scoped to it, because they would
be left without a scope; force=true deletes anyway. object_id (the id list_named_selections
reports) deletes that one selection whatever its name is, including a name that cannot be typed.
Args: name, force, object_iddisconnect_from_mechanicaltool Disconnect from Mechanical, leaving the session running.Files
Disconnect from Mechanical, leaving the session running.
Args: shutdown (True sends Mechanical a forced exit request whoever started it, so unsaved
work is lost; the result says whether the session's port actually closed), confirm (must be
exactly "SHUT DOWN MECHANICAL" for shutdown to proceed)export_nodal_resultstool Write an evaluated result's node ids, coordinates (mm) and values to a .json file. TheFilesEnv varsoutside text
Write an evaluated result's node ids, coordinates (mm) and values to a .json file. The
analysis must be solved. The file states coordinate_unit, value_unit and whether the
quantity is signed. output_path must be inside MECHANICAL_MCP_ROOTS (default: the server's
working directory), end in .json, and not exist unless overwrite=true.
The file records which step it holds (`step`: load step, substep, time) and, on an analysis with
several load steps, load_step must be given so the exported step is explicit (setting it on the
result was not run against a real solve). Reading the result unit is cross-checked
(value_unit_verified).
Args: result_name (as shown in the tree), output_path, analysis_index, overwrite, load_stepgenerate_meshtool Generate mesh. Visible live in Mechanical GUI. ok:true means a mesh with nodes exists. The callFilesEnv varsoutside text
Generate mesh. Visible live in Mechanical GUI. ok:true means a mesh with nodes exists. The call
blocks until Mechanical has meshed (there is no background mode, and Mechanical cannot be asked
anything meanwhile): other tools wait up to MECHANICAL_MCP_LOCK_WAIT_S and at most four may queue,
the rest are told busy at once; the status tools still answer 'busy' within about a second.generate_reporttool Generate a simulation report (docx needs python-docx: pip install ansys-mechanical-mcp[report]).FilesEnv varsoutside text
Generate a simulation report (docx needs python-docx: pip install ansys-mechanical-mcp[report]).
output_path must be inside MECHANICAL_MCP_ROOTS (default: the server's working directory),
end in .docx or .txt matching fmt, and not exist unless overwrite=true.
Args: output_path, analysis_index, fmt (docx or txt), overwriteget_mesh_statisticstool Get mesh node and element counts.FilesEnv varsoutside text
Get mesh node and element counts.
get_modal_frequenciestool Get natural frequencies (Hz) from a SOLVED Modal analysis. ok:false for a static orFilesEnv varsoutside text
Get natural frequencies (Hz) from a SOLVED Modal analysis. ok:false for a static or
unsolved analysis (an unsolved one would report 0 Hz). Frequencies are only readable
through result objects; with add_results_if_missing the missing ones are added (and
removed again if that fails).
Args: analysis_index, add_results_if_missing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").get_model_infotool Get model info: bodies, named selections, analyses.FilesEnv varsoutside text
Get model info: bodies, named selections, analyses.
get_result_valuestool Details of one existing result by its name in the tree: scope, status, Max/Min with unitFilesEnv varsoutside text
Details of one existing result by its name in the tree: scope, status, Max/Min with unit
(null before the solve) and, for a Force Reaction probe, x/y/z/total.
Args: result_name, analysis_indexget_solve_statustool Get solve status. While a solve started with wait=False is running this answersFilesEnv varsoutside text
Get solve status. While a solve started with wait=False is running this answers
'Solving' (naming the analysis) without touching Mechanical; for another analysis it says
which one is solving. While another call holds Mechanical (a blocking solve) it answers busy
at once. A finished background solve's result is kept until it is read: it is attached to the
poll for the SAME analysis that really reached Mechanical (older unread ones for that
analysis come as earlier_unread_solves) and expires after an hour. The messages are
Mechanical's global Messages pane, not specific to this analysis.
Args: analysis_indexlinearize_pathtool Membrane + bending + peak linearization (ASME definition: peak = total - membrane -FilesEnv varsoutside text
Membrane + bending + peak linearization (ASME definition: peak = total - membrane -
bending) of an exported SIGNED stress component along a straight section line. Refuses
unsigned quantities (von Mises, stress intensity) unless allow_unsigned - linearizing an
absolute value is non-conservative. Needs numpy and scipy (pip install
ansys-mechanical-mcp[postproc]).
Args: nodal_file (.json from export_nodal_results, inside MECHANICAL_MCP_ROOTS), start_mm and
end_mm as "x,y,z" (3D line) or "a,b" in `plane` (xy, xz, yz; then the data must lie in one
plane or slice_mm must give the coordinate normal to the plane), samples (2-5000),
slice_mm/slice_tol_mm, allow_unsigned, allow_gaps (a line that crosses a hole or notch is an
error because the value would be interpolated across the void; true accepts it and reports
interpolated_across_gap), expect_component (x/y/z: error if the export holds another one).
snap_fraction (0-1: a line end that falls outside the mesh by less than this fraction of an
element, e.g. on a curved boundary, is extrapolated and reported in endpoint_adjustments; farther
out is an error), accept_direction_mismatch (a line that runs along a different axis than the
exported component is refused unless true). A gap is detected against the LOCAL element size
(median distance of the nearest node to its 6 nearest distinct nodes), after merging
coincident nodes; the error carries gap_diagnostics. value_unit is "unverified" unless the
export cross-checked it against the result's maximum.
Only the single exported scalar is linearized; nothing is combined from other components.
Large exports are limited by MECHANICAL_MCP_MAX_NODES and the run by
MECHANICAL_MCP_LINEARIZE_TIMEOUT_S.list_boundary_conditionstool List the loads and supports of an analysis with their scope (named selection or entityFilesEnv varsoutside text
List the loads and supports of an analysis with their scope (named selection or entity
count), suppression state and key values (components, magnitude, direction). Analysis
settings, initial conditions, command snippets and the Solution are not listed.
Args: analysis_indexlist_contact_regionstool List contact regions: index, name, type, friction, source/target entity counts and bodyFilesEnv varsoutside text
List contact regions: index, name, type, friction, source/target entity counts and body
names, suppression state. Region names are not unique in Mechanical; duplicate_names lists
the ones that are shared (set_contact_type(region_names=...) matches every region of a name).list_materialstool List all materials in Engineering Data.FilesEnv varsoutside text
List all materials in Engineering Data.
list_named_selectionstool List all named selections with their entity counts and ObjectId. A name Mechanical holds butFilesEnv varsoutside text
List all named selections with their entity counts and ObjectId. A name Mechanical holds but
cannot encode (an unpaired surrogate) comes back with \\uXXXX escapes; delete such a selection
with delete_named_selection(object_id=...).list_point_massestool List all Point Masses with CG (mm), mass (kg), pinball and scoped named selection. ValuesFilesEnv varsoutside text
List all Point Masses with CG (mm), mass (kg), pinball and scoped named selection. Values
are converted with Mechanical's own unit conversion, so they are right in any unit system.list_resultstool List the result objects of an analysis: type, scope, and Max/Min with unit once theFilesEnv varsoutside text
List the result objects of an analysis: type, scope, and Max/Min with unit once the
analysis is solved (null before). Args: analysis_indexrun_mechanical_scripttool DISABLED unless the server is started with MECHANICAL_MCP_ENABLE_SCRIPT=1. Run a customFilesEnv varsoutside text
DISABLED unless the server is started with MECHANICAL_MCP_ENABLE_SCRIPT=1. Run a custom
IronPython script inside Mechanical (full ACT API) with stock IronPython semantics, sharing
Mechanical's persistent globals. Args: scriptrunnertool
No description.
set_2d_behaviortool Set how 2D (surface) geometry is analysed; an error for a model without 2D geometry.FilesEnv varsoutside text
Set how 2D (surface) geometry is analysed; an error for a model without 2D geometry.
Args: behavior (axisymmetric, plane_strain, plane_stress)set_body_mesh_sizetool Set a mesh sizing control on every body with this exact name (0.001 to 100000 mm). TheFilesEnv varsoutside text
Set a mesh sizing control on every body with this exact name (0.001 to 100000 mm). The
control is named 'MCP body size: <body>' and is updated, not duplicated, on a repeat call.
Args: body_name, element_size_mmset_contact_typetool Set the type of contact regions. WARNING: with no filter this overwrites EVERY region inFilesEnv varsoutside text
Set the type of contact regions. WARNING: with no filter this overwrites EVERY region in
the model, including ones you tuned by hand. Limit it with region_names (comma-separated
exact names) and/or only_if_currently (only regions of that type). Region names are not
unique in Mechanical: a shared name matches every region of that name (list_contact_regions
shows them, and a warning says so). The result lists only regions whose type really changed,
with the previous type, and counts those already of that type; all changes are undone if
one fails.
Suppressed regions are skipped (and listed in suppressed_regions_skipped) unless
include_suppressed=true (then they are changed and listed in suppressed_regions_changed).
Args: contact_type (bonded, no_separation, frictionless, rough, frictional),
friction_coefficient (0-10, needed for frictional), region_names, only_if_currently, include_suppressedset_mesh_element_sizetool Set the global mesh element size in mm (0.001 to 100000). The size Mechanical actuallyFilesEnv varsoutside text
Set the global mesh element size in mm (0.001 to 100000). The size Mechanical actually
holds afterwards is read back and reported; a value it ignores is an error.
Args: element_size_mmset_nonlinear_settingstool Load-step control for nonlinear static solves (numerical control only). ONLY theFilesEnv varsoutside text
Load-step control for nonlinear static solves (numerical control only). ONLY the
settings you pass are changed; the values Mechanical holds afterwards are returned, and
everything is restored if one fails.
Args: analysis_index, large_deflection, auto_time_stepping, initial_substeps, min_substeps,
max_substeps (giving any substep also sets time-step definition to substeps),
number_of_steps (0 leaves it)
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").solve_analysistool Solve the analysis. Progress visible in GUI. Returns solver messages. ok:true only if theFilesEnv varsoutside text
Solve the analysis. Progress visible in GUI. Returns solver messages. ok:true only if the
status is Done. Mechanical's Messages pane is not cleared. If a previous solve request did not
come back (client timeout, dropped channel) a new one is refused until you check that nothing
is still running and pass confirm_not_running=true.
Args: analysis_index, wait (False starts the solve on a background thread and returns at
once - then poll get_solve_status; use it for solves longer than the client call timeout),
confirm_not_running
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").suppress_bodiestool Suppress or unsuppress every body whose name starts with name_prefix. A prefix matchingFilesEnv varsoutside text
Suppress or unsuppress every body whose name starts with name_prefix. A prefix matching
nothing is an error. An empty prefix is refused: pass all_bodies=true to change every body.
Args: name_prefix, suppress (True=suppress, False=unsuppress), all_bodiesText the model reads (70)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
acp_launch tool
Start (or reuse) a PyACP-managed ACP server. Needs AWP_ROOT261 or the default install path.
acp_status tool
Report whether ACP is running and which models are loaded.
acp_shutdown tool
Stop the ACP server and forget all models.
acp_import_model tool
Import a mesh into a new ACP model.
fmt: 'ansys:cdb' (blocked CDB), 'ansys:h5', 'ansys:dat', or 'acp:h5' (a saved ACP model).
unit_system: si | mks | umks | mpa | from_file (ignored for 'acp:h5').
The element set 'All_Elements' is created automatically for ANSYS meshes.acp_save_model tool
Save an ACP model as an .acph5 file (acp:h5 format) that the ACP GUI can open.
acp_model_tree tool
List the main objects of a model with their statuses.
acp_create_material tool
Create an orthotropic ply material (SI units unless the model was imported with other units).
Properties are placeholders when the downstream solve takes thermal / electrical behaviour from
elsewhere (for example a user material in Mechanical).acp_create_fabric tool
Create a fabric (one ply layer) from a material. thickness is in model length units.
acp_create_rosette tool
Create a parallel rosette. dir1 is the 0-degree reference direction.
acp_create_oriented_selection_set tool
Create an oriented selection set. The laminate is extruded toward orientation_point.
Example: shell mesh at z=0 and orientation_point (0,0,-1) puts the plies below the surface
(the first ply listed in a modeling group sits against the reference surface).acp_create_layup tool
Create a modeling group with one ply per angle (in order from the reference surface).
Plies are named plyNN_<angle> (the name encodes the angle, which acp_prepare_external_model
relies on). Optionally appends a 'bulk' ply of bulk_layers layers of bulk_fabric.acp_create_solid_model tool
Create a solid model from oriented selection sets (analysis_ply_wise gives one element layer per ply).
acp_update tool
Update (recompute) the model; reports each solid model's status and analysis-ply count.
acp_export_solid_model tool
Export a solid model to CDB ('ansys:cdb') or H5 ('ansys:h5').acp_inspect_cdb tool
Summarise a CDB: node/element counts, bounding box (m), element types, materials, sections,
element coordinate systems, element and node component names with sizes.acp_prepare_external_model tool
Convert an ACP solid-model CDB into a per-fibre-angle external model for Mechanical.
Each distinct ply angle gets its own material id and element coordinate system; elements become
homogeneous hexahedra; node components STRIKE (top surface within strike_radius_mm of the centre)
and GNDNODES (the lateral faces, optionally the bottom) are added. Import the result through a
Workbench External Model system. The returned mapping tells you which material id carries which
fibre angle (needed when assigning properties in Mechanical).
normalise_with_mapdl (default on) re-writes the file through MAPDL, which Workbench's External Model
reader needs; turn it off only if ANSYS is not installed. ground_bottom adds the bottom face to GNDNODES.
node_boxes_json replaces STRIKE / GNDNODES with your own node components: a JSON object
{"NAME": [xmin, xmax, ymin, ymax, zmin, zmax]} in metres, null = open side, e.g.
{"INNER_WALL": [null, null, null, null, 0.125, 0.125]}.acp_wb_build_script tool
Write the script that builds a layup inside WORKBENCH's own ACP (legacy API) and ends with wbupdate().
`material` must already exist in the ACP-Pre system's Engineering Data (import a composite material there first).
Run the file with the Workbench commands returned by acp_wb_commands. Nothing is executed here.acp_wb_commands tool
Return the Workbench scripting commands that run an ACP script via Setup.RunScript and, optionally, link the
ACP Setup cell to a Mechanical Model cell with TransferData. Paste them into a Workbench scripting session
(for example the ansys-workbench MCP's execute_workbench_script). For Thermal-Electric Mechanical systems the
transferred solid is one SOLID225 body whose plies are identifiable by section number; use acp_wb_ply_split_snippet.acp_wb_ply_split_snippet tool
Return the Mechanical command snippet that splits an ACP-transferred Thermal-Electric solid into plies by section
number (own material copy, ESYS and TB,USER per ply). Use null for an isotropic bulk layer. Verified on a 4-ply test:
sections 3..6 were exactly one ply (672 elements) each.runner tool
connect_to_mechanical tool
Connect to a running ANSYS Mechanical session on this machine (one at a time).
Connecting again replaces the connection only if the new session answers. The handshake
is bounded (MECHANICAL_MCP_CONNECT_TIMEOUT_S, default 20 s): a port that is not Mechanical
is reported, it does not freeze the server.
Args: port: gRPC port reported by Workbench (changes every session)disconnect_from_mechanical tool
Disconnect from Mechanical, leaving the session running.
Args: shutdown (True sends Mechanical a forced exit request whoever started it, so unsaved
work is lost; the result says whether the session's port actually closed), confirm (must be
exactly "SHUT DOWN MECHANICAL" for shutdown to proceed)check_mechanical_connection tool
Check connection status. While another call (for example a blocking solve) is using
Mechanical this answers at once with connected: true, busy: true instead of waiting.get_model_info tool
Get model info: bodies, named selections, analyses.
list_materials tool
List all materials in Engineering Data.
assign_material tool
Assign a material from Engineering Data to every body with this exact name (bodies of the
same name in different parts are all changed). Args: body_name, material_nameset_mesh_element_size tool
Set the global mesh element size in mm (0.001 to 100000). The size Mechanical actually
holds afterwards is read back and reported; a value it ignores is an error.
Args: element_size_mmgenerate_mesh tool
Generate mesh. Visible live in Mechanical GUI. ok:true means a mesh with nodes exists. The call
blocks until Mechanical has meshed (there is no background mode, and Mechanical cannot be asked
anything meanwhile): other tools wait up to MECHANICAL_MCP_LOCK_WAIT_S and at most four may queue,
the rest are told busy at once; the status tools still answer 'busy' within about a second.get_mesh_statistics tool
Get mesh node and element counts.
add_fixed_support tool
Add Fixed Support. Args: named_selection, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_inside
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. A missing or empty named selection,
ids that do not exist, or a box that matches nothing is an error and nothing is created.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_frictionless_support tool
Add Frictionless Support. Args: named_selection, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_inside
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. Nothing is created on error.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_force tool
Add Force load in Newtons. Args: named_selection, fx_n, fy_n, fz_n, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_inside
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. Nothing is created on error.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").
allow_zero: create an all-zero load on purpose (default: refused).add_pressure tool
Add Pressure load in Pascals. Args: named_selection, magnitude_pa, analysis_index, entity_ids, box_mm, entity_type, body_name, fully_inside
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. Nothing is created on error.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_displacement tool
Add Displacement BC. Pass None for a DOF to leave it free (at least one must be given).
Args: named_selection, x_mm, y_mm, z_mm (None=free), analysis_index, entity_ids, box_mm,
entity_type, body_name
Location: pass the named selection, or pass "" for it and give entity_ids (comma-separated
geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank = open) with
entity_type face/edge/vertex and optional body_name. A box selects entities by their CENTROID
(a warning counts those that stick out); fully_inside=true requires the whole entity to lie inside. Nothing is created on error.
ok:true means the object was created and scoped.
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_remote_displacement tool
Add Remote Displacement BC on a named selection. Pass None for a DOF to leave it free
(at least one must be given). Nothing is created on error (missing or empty named selection).
Args: named_selection, x_mm, y_mm, z_mm, rot_x_deg, rot_y_deg, rot_z_deg, analysis_index
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_standard_gravity tool
Add Standard Earth Gravity (always 1 g = 9.80665 m/s^2). Only the DIRECTION of the vector
matters (it is normalised) and it must lie along +-X, +-Y or +-Z, because that is all
Mechanical's Standard Earth Gravity supports; any other direction is an error. Default -Y.
Args: analysis_index, x_component, y_component, z_component
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_remote_force tool
Add Remote Force load (N) on a named selection. Nothing is created on error.
Args: named_selection, fx_n, fy_n, fz_n, analysis_index
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").
allow_zero: create an all-zero load on purpose (default: refused).add_moment tool
Add Moment load in N*m on a named selection. Nothing is created on error.
Args: named_selection, mx_nm, my_nm, mz_nm, analysis_index
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").
allow_zero: create an all-zero load on purpose (default: refused).list_boundary_conditions tool
List the loads and supports of an analysis with their scope (named selection or entity
count), suppression state and key values (components, magnitude, direction). Analysis
settings, initial conditions, command snippets and the Solution are not listed.
Args: analysis_indexsolve_analysis tool
Solve the analysis. Progress visible in GUI. Returns solver messages. ok:true only if the
status is Done. Mechanical's Messages pane is not cleared. If a previous solve request did not
come back (client timeout, dropped channel) a new one is refused until you check that nothing
is still running and pass confirm_not_running=true.
Args: analysis_index, wait (False starts the solve on a background thread and returns at
once - then poll get_solve_status; use it for solves longer than the client call timeout),
confirm_not_running
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").get_solve_status tool
Get solve status. While a solve started with wait=False is running this answers
'Solving' (naming the analysis) without touching Mechanical; for another analysis it says
which one is solving. While another call holds Mechanical (a blocking solve) it answers busy
at once. A finished background solve's result is kept until it is read: it is attached to the
poll for the SAME analysis that really reached Mechanical (older unread ones for that
analysis come as earlier_unread_solves) and expires after an hour. The messages are
Mechanical's global Messages pane, not specific to this analysis.
Args: analysis_indexadd_total_deformation_all_modes tool
Add Total Deformation for modes 1..num_modes of a SOLVED Modal analysis (all or nothing).
An unsolved or non-modal analysis, or num_modes above the extracted modes, is an error and
nothing is created. Args: num_modes, analysis_index
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_total_deformation tool
Add Total Deformation result. Before the analysis is solved the object is created with
null values (max/min) and a note; ok:true means created, not validated. If an identical
result already exists it is returned (already_exists: true) instead of a duplicate.
Args: mode (0=not modal; >0 needs a Modal analysis), analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").get_modal_frequencies tool
Get natural frequencies (Hz) from a SOLVED Modal analysis. ok:false for a static or
unsolved analysis (an unsolved one would report 0 Hz). Frequencies are only readable
through result objects; with add_results_if_missing the missing ones are added (and
removed again if that fails).
Args: analysis_index, add_results_if_missing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_equivalent_stress tool
Add Equivalent (von Mises) Stress result, optionally scoped to a named selection (a
missing or empty one is an error and nothing is created). Before the solve the object is
created with null values; ok:true means created, not validated. An identical existing
result is returned (already_exists: true) instead of a duplicate.
Args: named_selection (empty = whole model), analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_directional_deformation tool
Add Directional Deformation result. An unknown axis or a missing named selection is an
error and nothing is created. Before the solve the values are null; ok:true means created.
An identical existing result is returned (already_exists: true).
Args: axis (X/Y/Z), named_selection, analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_principal_stress tool
Add Principal Stress result. Before the solve the values are null; ok:true means created.
An identical existing result is returned (already_exists: true).
Args: which (max/mid/min), analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_stress_tool tool
Add Stress Tool (safety factor, stress ratio) using material limits. ok:true means
created (and evaluated if the model was solved); an existing one is returned
(already_exists: true). Args: analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_reaction_force tool
Add a Force Reaction probe scoped to the geometry of a named selection. Before the solve
the x/y/z/total values are null; ok:true means created. A missing or empty named selection
is an error and nothing is created; an identical probe is returned (already_exists: true).
Args: named_selection, analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_normal_stress tool
Add a Normal Stress result. Before the solve the values are null; ok:true means created.
An identical existing result is returned (already_exists: true).
Args: axis (x, y, z), analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").add_stress_intensity tool
Add a Stress Intensity result. Before the solve the values are null; ok:true means
created; an identical existing result is returned (already_exists: true).
Args: analysis_index, reuse_existing
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").list_results tool
List the result objects of an analysis: type, scope, and Max/Min with unit once the
analysis is solved (null before). Args: analysis_indexget_result_values tool
Details of one existing result by its name in the tree: scope, status, Max/Min with unit
(null before the solve) and, for a Force Reaction probe, x/y/z/total.
Args: result_name, analysis_indexlist_contact_regions tool
List contact regions: index, name, type, friction, source/target entity counts and body
names, suppression state. Region names are not unique in Mechanical; duplicate_names lists
the ones that are shared (set_contact_type(region_names=...) matches every region of a name).export_nodal_results tool
Write an evaluated result's node ids, coordinates (mm) and values to a .json file. The
analysis must be solved. The file states coordinate_unit, value_unit and whether the
quantity is signed. output_path must be inside MECHANICAL_MCP_ROOTS (default: the server's
working directory), end in .json, and not exist unless overwrite=true.
The file records which step it holds (`step`: load step, substep, time) and, on an analysis with
several load steps, load_step must be given so the exported step is explicit (setting it on the
result was not run against a real solve). Reading the result unit is cross-checked
(value_unit_verified).
Args: result_name (as shown in the tree), output_path, analysis_index, overwrite, load_steplinearize_path tool
Membrane + bending + peak linearization (ASME definition: peak = total - membrane -
bending) of an exported SIGNED stress component along a straight section line. Refuses
unsigned quantities (von Mises, stress intensity) unless allow_unsigned - linearizing an
absolute value is non-conservative. Needs numpy and scipy (pip install
ansys-mechanical-mcp[postproc]).
Args: nodal_file (.json from export_nodal_results, inside MECHANICAL_MCP_ROOTS), start_mm and
end_mm as "x,y,z" (3D line) or "a,b" in `plane` (xy, xz, yz; then the data must lie in one
plane or slice_mm must give the coordinate normal to the plane), samples (2-5000),
slice_mm/slice_tol_mm, allow_unsigned, allow_gaps (a line that crosses a hole or notch is an
error because the value would be interpolated across the void; true accepts it and reports
interpolated_across_gap), expect_component (x/y/z: error if the export holds another one).
snap_fraction (0-1: a line end that falls outside the mesh by less than this fraction of an
element, e.g. on a curved boundary, is extrapolated and reported in endpoint_adjustments; farther
out is an error), accept_direction_mismatch (a line that runs along a different axis than the
exported component is refused unless true). A gap is detected against the LOCAL element size
(median distance of the nearest node to its 6 nearest distinct nodes), after merging
coincident nodes; the error carries gap_diagnostics. value_unit is "unverified" unless the
export cross-checked it against the result's maximum.
Only the single exported scalar is linearized; nothing is combined from other components.
Large exports are limited by MECHANICAL_MCP_MAX_NODES and the run by
MECHANICAL_MCP_LINEARIZE_TIMEOUT_S.generate_report tool
Generate a simulation report (docx needs python-docx: pip install ansys-mechanical-mcp[report]).
output_path must be inside MECHANICAL_MCP_ROOTS (default: the server's working directory),
end in .docx or .txt matching fmt, and not exist unless overwrite=true.
Args: output_path, analysis_index, fmt (docx or txt), overwriterun_mechanical_script tool
DISABLED unless the server is started with MECHANICAL_MCP_ENABLE_SCRIPT=1. Run a custom
IronPython script inside Mechanical (full ACT API) with stock IronPython semantics, sharing
Mechanical's persistent globals. Args: scriptlist_named_selections tool
List all named selections with their entity counts and ObjectId. A name Mechanical holds but
cannot encode (an unpaired surrogate) comes back with \\\\uXXXX escapes; delete such a selection
with delete_named_selection(object_id=...).delete_named_selection tool
Delete every named selection with this name. Refused (with the list of dependents) if loads,
results, probes, contacts, point masses or mesh controls are scoped to it, because they would
be left without a scope; force=true deletes anyway. object_id (the id list_named_selections
reports) deletes that one selection whatever its name is, including a name that cannot be typed.
Args: name, force, object_idcreate_named_selection tool
Create a named selection from exactly one of: body_names (comma-separated exact body names),
body_prefix, entity_ids (geometry ids) or box_mm ("xmin,xmax,ymin,ymax,zmin,zmax" in mm, blank
= open; entities are chosen by CENTROID unless fully_inside=true) with entity_type
face/edge/vertex and optional body_name. An empty result creates nothing; an existing name is
refused unless replace=true (and then only if nothing is scoped to the old one). The response
gives the entity count. A body name that matches nothing is an error (nothing created) unless
allow_missing=true, which creates the selection from the others and lists `missing`.
Args: name, body_names, body_prefix, entity_ids, box_mm, entity_type, body_name, fully_inside,
replace, allow_missingsuppress_bodies tool
Suppress or unsuppress every body whose name starts with name_prefix. A prefix matching
nothing is an error. An empty prefix is refused: pass all_bodies=true to change every body.
Args: name_prefix, suppress (True=suppress, False=unsuppress), all_bodieslist_point_masses tool
List all Point Masses with CG (mm), mass (kg), pinball and scoped named selection. Values
are converted with Mechanical's own unit conversion, so they are right in any unit system.convert_prefix_to_point_mass tool
Convert all unsuppressed bodies whose name starts with body_name_prefix (required, not
empty) to a combined Point Mass, then create a Named Selection of all coplanar attachment
faces on the nearest structural surface. Everything is measured before anything changes;
on any failure the point mass, the selection and the suppression are undone. Refused if a
point mass for the same prefix already exists (converting again would double count the mass)
unless allow_duplicate=true. LIMIT: Mechanical gives only each body's PRINCIPAL moments of
inertia; they are used as Ixx, Iyy, Izz (inertia_basis: "principal"), exact only when the
principal axes are the global axes, and products of inertia are dropped; warnings say so.
Args: body_name_prefix, proximity_multiplier (0.1-100, default 3.0), allow_duplicate
Suppressing the bodies leaves loads, results, contacts or mesh controls scoped to their geometry with an
empty scope: they are listed (scope_loss) and the conversion is refused unless acknowledge_scope_loss=true.
Matched bodies that are not solids are neither converted nor suppressed; they are named in the warnings.convert_part_to_point_mass tool
Convert all unsuppressed bodies inside a named Part to a combined Point Mass, then create
a Named Selection of all coplanar attachment faces on the nearest structural surface.
Everything is measured before anything changes; on any failure it is all undone. Refused if
a point mass for the same part already exists unless allow_duplicate=true. LIMIT: only
principal moments of inertia are available (inertia_basis: "principal"); see
convert_prefix_to_point_mass. Args: part_name, proximity_multiplier (0.1-100), allow_duplicate
Suppressing the bodies leaves loads, results, contacts or mesh controls scoped to their geometry with an
empty scope: they are listed (scope_loss) and the conversion is refused unless acknowledge_scope_loss=true.
Matched bodies that are not solids are neither converted nor suppressed; they are named in the warnings.set_2d_behavior tool
Set how 2D (surface) geometry is analysed; an error for a model without 2D geometry.
Args: behavior (axisymmetric, plane_strain, plane_stress)set_body_mesh_size tool
Set a mesh sizing control on every body with this exact name (0.001 to 100000 mm). The
control is named 'MCP body size: <body>' and is updated, not duplicated, on a repeat call.
Args: body_name, element_size_mmset_nonlinear_settings tool
Load-step control for nonlinear static solves (numerical control only). ONLY the
settings you pass are changed; the values Mechanical holds afterwards are returned, and
everything is restored if one fails.
Args: analysis_index, large_deflection, auto_time_stepping, initial_substeps, min_substeps,
max_substeps (giving any substep also sets time-step definition to substeps),
number_of_steps (0 leaves it)
analysis_name / expect_analysis_type: choose the analysis by name, or refuse unless it is of this
type (e.g. "Static"). With several analyses in the model, analysis_index or analysis_name must be
given explicitly; every reply names the analysis it used ("analysis").set_contact_type tool
Set the type of contact regions. WARNING: with no filter this overwrites EVERY region in
the model, including ones you tuned by hand. Limit it with region_names (comma-separated
exact names) and/or only_if_currently (only regions of that type). Region names are not
unique in Mechanical: a shared name matches every region of that name (list_contact_regions
shows them, and a warning says so). The result lists only regions whose type really changed,
with the previous type, and counts those already of that type; all changes are undone if
one fails.
Suppressed regions are skipped (and listed in suppressed_regions_skipped) unless
include_suppressed=true (then they are changed and listed in suppressed_regions_changed).
Args: contact_type (bonded, no_separation, frictionless, rough, frictional),
friction_coefficient (0-10, needed for frictional), region_names, only_if_currently, include_suppressedadd_contact tool
Add a contact region between two sets of geometry. Each side is given by entity ids or a
bounding box in mm ("xmin,xmax,ymin,ymax,zmin,zmax", blank = open; entities are chosen by
CENTROID) plus an optional body name. Nothing is created on error. A region that already joins
exactly these entities is returned if its type (and friction) match (already_exists: true,
with its suppressed state); if they differ the call is refused with the differences unless
update_existing=true, which changes type/friction and reports `updated`. Args: contact_type (bonded, no_separation,
frictionless, rough, frictional), source_*, target_*, entity_type (face/edge),
friction_coefficient, reuse_existing, update_existingWhat we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 70 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 70 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file path HIGH3 findings in acp_inspect_cdb, acp_prepare_external_model, acp_save_model
- Requests any addressNo tool sends a request to an address the caller supplies — 70 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 70 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processes1 of 70 capabilities start processes; 69 more call code the scanner could not follow, where it may happen
- Tools that touch files54 of 70 capabilities touch files; 16 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 70 capabilities; 70 more call code the scanner could not follow, where it may happen
Where the code is: 70 handlers in 2 files at commit c24735666aca
acp_mcp_server.pyacp_launch, acp_status, acp_shutdown, acp_import_model, acp_save_model, acp_model_tree, acp_create_material, acp_create_fabric, acp_create_rosette, acp_create_oriented_selection_set, acp_create_layup, acp_create_solid_model +7mechanical_mcp_server.pyrunner, connect_to_mechanical, disconnect_from_mechanical, check_mechanical_connection, get_model_info, list_materials, assign_material, set_mesh_element_size, generate_mesh, get_mesh_statistics, add_fixed_support, add_frictionless_support +39
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests2 manifests: pyproject.toml, requirements.txt
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 2 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked; requirements.txt: 2 dependency lines carry no exact version, so the installed version was not checked; pin them or add a lockfile
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionmcp >=1.0,<2
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 70 capabilities; 70 more call code the scanner could not follow, where it may happen
- Environment variables68 capabilities read environment variables (often API keys)
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read (1 only in code no tool reaches)
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | mcp >=1.0,<2 |
| Servers in the code | 2 (ansys-acp-mcp, ansys-mechanical-mcp) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-10-24 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 3 catalogs (github_search, glama, mcp_toplist) |
|---|---|
| License | Apache-2.0 |
| Created | 2026-06-23 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.