An MCP (Model Context Protocol) server designed to interact with an already running Abaqus/CAE Graphical User Interface (GUI). It allows for the execution of Python scripts within the Abaqus environment and retrieval of messages from the Abaqus message log/area, all through MCP tools.
English | 中文
An MCP (Model Context Protocol) server designed to interact with an already running Abaqus/CAE Graphical User Interface (GUI). It allows for the execution of Python scripts within the Abaqus environment and retrieval of messages from the Abaqus message log/area, all through MCP tools.
This server uses GUI automation techniques (pywinauto
) to control the Abaqus/CAE application.
pywinauto
and Abaqus GUI interaction).Install the required Python packages using pip:
pip install -r requirements.txt
(See requirements.txt
for the list of dependencies, primarily mcp[cli]
, pywinauto
, pygetwindow
, psutil
, pywin32
.)
Navigate to the server's directory and run:
python mcp_server.py
The server will start and be ready to accept MCP requests.
execute_script_in_abaqus_gui
python_code (str)
: The Python script content (Abaqus Scripting Interface commands) to be executed.str
- A message indicating the outcome of the script submission attempt (e.g., "Script submitted for execution...").get_abaqus_gui_message_log
tool after allowing time for the script to run.get_abaqus_gui_message_log
str
- The extracted text from the message area, or an error/status message if retrieval fails.abaqus_scripting_strategy
execute_script_in_abaqus_gui
and get_abaqus_gui_message_log
) together effectively. It explains the workflow for script execution and result verification, tool assumptions, and troubleshooting tips. It is highly recommended that LLM agents consult this prompt before attempting to use the tools.pywinauto
provides a good level of abstraction, issues can still arise.get_abaqus_gui_message_log
tool fails to retrieve messages accurately, or if execute_script_in_abaqus_gui
has trouble with the "Run Script" dialog, you may need to use a UI inspection tool (e.g., pywinauto.inspect
module's InspectDialog
or py_inspect.py
script, FlaUInspect for UIA backend) to identify the correct properties (AutomationId, Name, ClassName, ControlType) of the target UI elements in your Abaqus version. These properties can then be used to refine the search logic in mcp_server.py
.time.sleep()
calls and uses pywinauto
's Timings.slow()
to better handle Abaqus's potentially slow UI response times. These might need adjustment in some environments.abaqus-mcp-gui-server/
├── mcp_server.py # The main MCP server script
├── requirements.txt # Python dependencies
└── README.md # This documentation file
This project is intended for learning, research, and specific automation tasks. When using Abaqus software, always adhere to the licensing terms provided by Dassault Systèmes.
{ "mcpServers": { "abaqus-mcp-server": { "command": "python", "args": [ "mcp_server.py" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories