This MCP server provides a bridge between Model Context Protocol (MCP) clients and an already running Abaqus/CAE GUI session. It allows you to execute Python scripts within Abaqus and retrieve message log output through automation, making it ideal for integrating Abaqus modeling capabilities with LLM agents or other MCP-compatible systems.
Install the required Python packages using pip:
pip install -r requirements.txt
Key dependencies include:
Before starting the server, ensure:
Launch the server by running:
python mcp_server.py
The server will initialize and wait for MCP requests.
This tool allows you to run Python code in the active Abaqus session:
# Example of using the execute_script_in_abaqus_gui tool
execute_script_in_abaqus_gui('''
from part import *
from material import *
from section import *
from assembly import *
from step import *
from interaction import *
from load import *
from mesh import *
from optimization import *
from job import *
from sketch import *
from visualization import *
from connectorBehavior import *
# Create a new model
mdb.Model(name='Model-1')
print('Model created successfully')
''')
Important: This tool only submits the script to Abaqus but doesn't return the execution results. You must use the message log tool (described below) to check for output or errors.
After executing a script, use this tool to retrieve output from Abaqus:
# Example of retrieving the message log
message_log = get_abaqus_gui_message_log()
print(message_log)
execute_script_in_abaqus_guiget_abaqus_gui_message_log to check for output or error messagesIf the message log retrieval fails to work properly:
If script execution fails:
Remember to distinguish between errors from the MCP tools themselves versus errors reported within the Abaqus message log from your script execution.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "abaqus-mcp-server" '{"command":"python","args":["mcp_server.py"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"abaqus-mcp-server": {
"command": "python",
"args": [
"mcp_server.py"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"abaqus-mcp-server": {
"command": "python",
"args": [
"mcp_server.py"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect