Skip to main content
Glama
Zhangyoupeng1996

Codex MCP Abaqus

Codex MCP Abaqus

Utilities and examples for driving Abaqus through a file-based MCP bridge from Codex or other MCP clients.

This project collects the patched Abaqus MCP plugin, MCP stdio server, startup scripts, and a classic finite element example verified on Abaqus 2022.

What Is Included

  • src/abaqus_mcp_plugin.py
    Abaqus/CAE kernel-side plugin. It polls command JSON files, executes Abaqus Python code, submits jobs, and writes result JSON files.

  • src/mcp_server.py
    MCP server exposing tools such as check_abaqus_connection, execute_script, get_model_info, list_jobs, and submit_job.

  • scripts/start_abaqus_mcp_loop.py
    noGUI worker launcher script. Recommended for stable background simulation.

  • examples/abaqus_cantilever_classic.py
    Classic 3D cantilever beam static bending example.

  • examples/abaqus_tensile_bar_classic.py
    Classic 3D displacement-controlled tensile bar example.

  • examples/show_tensile_result_viewport.py
    Visible Abaqus/CAE viewport startup script for the tensile ODB result.

  • docs/USAGE.md
    Setup and operating notes.

  • docs/TENSILE_MCP_WORKFLOW.md
    End-to-end notes for generating the tensile project, querying it through MCP, and displaying the result in the Abaqus viewport.

Related MCP server: abaqus-mcp

Use Abaqus noGUI for simulation automation:

abaqus cae noGUI=scripts\start_abaqus_mcp_loop.py

Running MCP inside the Abaqus GUI with Cooperative mode works, but it can make the GUI sluggish because the GUI thread is used for command polling. For most batch simulations, keep the Abaqus window closed and let noGUI produce .cae, .inp, .odb, and summary files.

Quick Start

  1. Install the MCP server dependency:

python -m pip install -r requirements.txt
  1. Configure the MCP client to run:

[mcp_servers.abaqus]
command = 'python'
args = ['D:\path\to\Codex_MCP_Abaqus\src\mcp_server.py']
cwd = 'D:\path\to\Codex_MCP_Abaqus'

[mcp_servers.abaqus.env]
ABAQUS_MCP_HOME = 'D:\path\to\Codex_MCP_Abaqus'
  1. Start Abaqus noGUI worker:

set ABAQUS_MCP_HOME=D:\path\to\Codex_MCP_Abaqus
abaqus cae noGUI=D:\path\to\Codex_MCP_Abaqus\scripts\start_abaqus_mcp_loop.py
  1. Check connection from the MCP client:

mcp__abaqus.check_abaqus_connection

Verified Example

The included cantilever example uses:

  • Geometry: 100 mm x 10 mm x 10 mm

  • Material: linear elastic steel, E = 210000 MPa, nu = 0.3

  • Element: C3D8R

  • Boundary condition: fixed left end

  • Load: vertical surface traction on the right end, equivalent total force 1000 N

Typical result:

  • Maximum displacement: about 2.037 mm

  • Maximum Mises stress: about 471 MPa

The included tensile example uses:

  • Geometry: 100 mm x 10 mm x 10 mm

  • Material: linear elastic steel, E = 210000 MPa, nu = 0.3

  • Element: C3D8R

  • Boundary condition: fixed left end

  • Loading: right-end prescribed axial displacement U1 = 1 mm

Typical result:

  • Engineering strain: 0.01

  • Nominal stress: about 2100 MPa

  • Apparent modulus: about 210000 MPa

To display the tensile result in a visible Abaqus/CAE viewport after generating the ODB:

abaqus cae startup=examples\show_tensile_result_viewport.py

Notes

The plugin in this repository includes compatibility fixes for Abaqus 2022's Python 2 kernel:

  • Unicode-safe JSON and text writes

  • Captured stdout/stderr for execute_script

  • Stale heartbeat diagnostics in the MCP server

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A server that enables programmatic interaction with an already running Abaqus/CAE GUI application, allowing users to execute Python scripts and retrieve message logs through the Model Context Protocol (MCP).
    105
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables controlling a live Abaqus/CAE session through natural language, allowing model inspection, job submission, ODB analysis, and viewport capture.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables an AI assistant to drive Abaqus/CAE through file IPC—sending Python commands, querying model info, submiting jobs, and capturing viewport screenshots—so finite element models can be built and solved without manual GUI interaction.
    2
    -
  • A
    license
    C
    quality
    A
    maintenance
    Enables AI assistants to control and automate Abaqus/CAE simulations via MCP, including model query, job management, ODB inspection, KPI extraction, capsule tracking, physics contract validation, report generation, and viewport capture. It also supports noGUI batch mode, dual transport, and integration with Codex/Claude clients.
    110
    3
    MIT