Abaqus MCP
No description available
Ask AI about Abaqus MCP
Powered by Claude Β· Grounded in docs
I know everything about Abaqus MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Abaqus MCP Plugin v4.0
A plugin that enables communication between Abaqus/CAE and external AI assistants (or any MCP client) via file-based IPC.
What's New in v4.0
- Job management β list and submit Abaqus jobs remotely
- ODB inspection β open ODB files read-only and query steps, frames, instances
- Viewport capture β screenshot any Abaqus viewport as base64 image
- Richer model info β now includes loads, BCs, interactions, and assembly instances
- MCP resource β
abaqus://statusresource for real-time plugin status - Stale command cleanup β automatically removes commands older than 2 minutes
- Logging β all operations logged to
~/.abaqus-mcp/mcp.log - Version tracking β status.json and ping responses include plugin version
- GUI Status button β check plugin state from the Plug-ins menu
Architecture
βββββββββββββββ MCP protocol βββββββββββββββββ file IPC ββββββββββββββββ
β MCP Client β ββββββββββββββ> β mcp_server.py β βββββββββ> β Abaqus/CAE β
β (Cursor AI) β <ββββββββββββββ β (FastMCP) β <βββββββββ β (plugin.py) β
βββββββββββββββ βββββββββββββββββ ββββββββββββββββ
β
commands/*.json ββ> (plugin reads & deletes)
results/*.json <ββ (plugin writes)
status.json <ββ (heartbeat every 2s)
Features
- Execute Python scripts in Abaqus remotely
- Query model information (parts, materials, steps, loads, BCs, interactions)
- List and submit analysis jobs
- Inspect ODB result files
- Capture viewport screenshots
- Simple file-based communication (no sockets required)
- Non-blocking background mode (GUI stays responsive)
- GUI menu entries for start / stop / status control
- Works with any MCP-compatible client (Cursor, Claude Desktop, etc.)
Installation
1. Clone the repository
git clone https://github.com/Cai-aa/abaqus-mcp.git ~/.abaqus-mcp
2. Install Python dependencies (for the MCP server)
pip install mcp
3. (Optional) Auto-load plugin on Abaqus startup
# Windows
copy "$env:USERPROFILE\.abaqus-mcp\abaqus_v6.env.example" "$env:USERPROFILE\abaqus_v6.env"
# Linux/Mac
cp ~/.abaqus-mcp/abaqus_v6.env.example ~/abaqus_v6.env
4. (Optional) Install GUI plugin menu
# Windows
Copy-Item -Recurse "$env:USERPROFILE\.abaqus-mcp\abaqus_plugins\mcp_control" "$env:USERPROFILE\abaqus_plugins\mcp_control"
# Linux/Mac
cp -r ~/.abaqus-mcp/abaqus_plugins/mcp_control ~/abaqus_plugins/mcp_control
5. Configure your MCP client
Add to your Cursor / Claude Desktop MCP settings (.mcp.json):
{
"mcpServers": {
"abaqus-mcp-server": {
"command": "python",
"args": ["C:/Users/YourUsername/.abaqus-mcp/mcp_server.py"]
}
}
}
Usage
Start MCP (in Abaqus)
Experimental β non-blocking background thread (may be unstable on some Abaqus builds):
mcp_start() # GUI remains responsive if background worker is supported
Menu: Plug-ins β MCP β Start MCP (Background)
Alternative β cooperative loop (mostly responsive):
mcp_coop_loop()
Menu: Plug-ins β MCP β Start MCP (Cooperative)
Alternative β blocking mode:
mcp_loop() # blocks console
Menu: Plug-ins β MCP β Start MCP (Blocking)
| Mode | GUI Responsive | Stop Method |
|---|---|---|
Background (mcp_start()) | Yes (if supported) | mcp_stop() or menu |
Cooperative (mcp_coop_loop()) | Mostly yes | mcp_stop() or stop.flag |
Blocking (mcp_loop()) | No | stop.flag / interrupt |
For maximum reliability, use mcp_loop() in production sessions.
Check Status
mcp_status() # prints status to console
Menu: Plug-ins β MCP β MCP Status
Stop MCP
Option 1 β GUI menu: Plug-ins β MCP β Stop MCP
Option 2 β Abaqus console:
mcp_stop()
Option 3 β PowerShell:
echo $null > "$env:USERPROFILE\.abaqus-mcp\stop.flag"
Option 4 β Run stop_mcp.py from any Python environment.
MCP Tools
These tools are exposed to MCP clients via mcp_server.py:
| Tool | Description |
|---|---|
check_abaqus_connection | Verify Abaqus is running and plugin is responding |
execute_script | Execute a Python script inside Abaqus/CAE |
get_model_info | Get model details (parts, materials, steps, loads, BCs, etc.) |
list_jobs | List all analysis jobs in the session |
submit_job | Submit a job by name and wait for completion |
get_odb_info | Open an ODB file read-only and return metadata |
get_viewport_image | Capture a viewport screenshot as base64 |
ping | Test connection (returns version info) |
MCP Resources
| URI | Description |
|---|---|
abaqus://status | Real-time plugin status (running/stopped, version, uptime) |
File-Based IPC Protocol
Write a JSON command file into ~/.abaqus-mcp/commands/:
import json, os, time
command = {
'id': 'my_command',
'type': 'execute_script',
'script': 'print("Hello from Abaqus!")',
'timestamp': time.time(),
}
cmd_path = os.path.expanduser('~/.abaqus-mcp/commands/cmd_my_command.json')
with open(cmd_path, 'w') as f:
json.dump(command, f)
Result will appear at ~/.abaqus-mcp/results/my_command.json.
Command Types
| Type | Parameters | Description |
|---|---|---|
execute_script | script (str) | Execute Python script in Abaqus |
get_model_info | β | Get current model information |
list_jobs | β | List all defined jobs |
submit_job | job_name (str) | Submit and wait for a job |
get_odb_info | odb_path (str) | Read ODB metadata |
get_viewport_image | viewport_name, format | Capture viewport screenshot |
ping | β | Test connection |
stop | β | Request loop stop |
Directory Structure
~/.abaqus-mcp/
βββ abaqus_mcp_plugin.py # Abaqus-side plugin (runs inside CAE)
βββ mcp_server.py # MCP server (runs externally)
βββ stop_mcp.py # Helper to send stop signal
βββ abaqus_v6.env.example # Auto-load config template
βββ .mcp.json # MCP client config example
βββ abaqus_plugins/
β βββ mcp_control/
β βββ __init__.py
β βββ mcp_control_plugin.py
βββ commands/ # Incoming command files
βββ results/ # Outgoing result files
βββ scripts/ # Temporary script files
βββ screenshots/ # Temporary viewport captures
βββ status.json # Heartbeat status (updated every 2s)
βββ mcp.log # Operation log
βββ stop.flag # Stop signal file
Troubleshooting
- Plugin says "running" but no commands are consumed:
- Run
mcp_stop()thenmcp_start()again - Check
~/.abaqus-mcp/status.jsonβ timestamp should update every ~2s - Check
~/.abaqus-mcp/mcp.logfor errors
- Run
- Abaqus uses a different home directory:
Set this before loading the plugin.import os; os.environ['ABAQUS_MCP_HOME'] = r'C:\Users\YourName\.abaqus-mcp' - Commands timing out:
- Stale commands (>2 min) are auto-cleaned
- Ensure the plugin is in
runningstate viamcp_status()
- GUI plugin not showing:
- Verify
~/abaqus_plugins/mcp_control/exists and containsmcp_control_plugin.py - Restart Abaqus/CAE
- Verify
License
MIT License
