Quick start#
Launch PyMechanical-MCP#
Launch PyMechanical-MCP with the default STDIO transport:
ansys-mechanical-mcp
To run the server over streamable HTTP:
ansys-mechanical-mcp --transport http --http-host 127.0.0.1 --http-port 8080
Connect to your IDE or client#
PyMechanical-MCP works with multiple MCP-compatible clients. For setup information, see IDE and client configuration.
Claude Code
Visual Studio Code with Copilot
Claude Desktop
Other MCP-compatible clients
Follow the basic workflow#
There are three common ways to begin once the server is running.
Option 1: Launch a new Mechanical session (recommended).
Ask your assistant to call launch_mechanical.
Option 2: Connect to an existing Mechanical session.
Ask your assistant to call connect_to_mechanical with the host and port.
Option 3: Connect on startup.
Use --connect-on-startup when launching the MCP server:
ansys-mechanical-mcp --connect-on-startup --ip 127.0.0.1 --port 10000
Warning
When you use --connect-on-startup, PyMechanical-MCP locks the connection and
disables the launch_mechanical, connect_to_mechanical, and
disconnect_from_mechanical tools.
Tool availability before and after connecting#
Before connection, use offline-capable tools such as:
check_mechanical_installedcheck_mechanical_statuslist_mechanical_instancesget_guidelines_for
After you connect, session-dependent tools become available for scripting, file transfer, solving, and result export.
First workflow checklist#
check_mechanical_statuslaunch_mechanicalorconnect_to_mechanicalupload_file(geometry or script, as needed)run_python_script(model setup)solve_analysisget_model_info,export_results, and/orscreenshot
Next steps#
See Tools and capabilities for the complete tool reference.
See Best practices for workflow recommendations.
See Configuration for startup flags and environment settings.