Abaqus MCP Server

Abaqus MCP Server

Enables Claude Code to interact with Abaqus FEM software for model generation, job submission, log monitoring, and result extraction from ODB files.

Category
Visit Server

README

Abaqus MCP Server

Python License MCP Tests

A local stdio MCP server that enables Claude Code to interact with Abaqus FEM software โ€” model generation, job submission, log monitoring, and result extraction from ODB files.

๐ŸŽ“ Ideal for simulation automation, parametric studies, post-processing pipelines, and teaching FEM scripting through natural language.

โœจ Features

  • 11 MCP tools covering the full Abaqus workflow โ€” from script generation to result extraction
  • Workspace sandboxing โ€” all file operations are scoped to a configurable directory
  • ODB extraction via generated Abaqus Python scripts (no direct binary parsing โ€” uses odbAccess)
  • Security-first โ€” no arbitrary shell execution, path traversal blocked, confirmation required for destructive operations
  • Windows support โ€” correctly handles Abaqus .bat file execution via cmd.exe /c call
  • Output truncation โ€” prevents token blowout in LLM context windows
  • 85 tests across unit, mocked integration, and MCP protocol layers

๐Ÿ“‹ Requirements

  • Python 3.10+
  • Abaqus (tested with Abaqus 2025; the abaqus command must be available)
  • The mcp Python SDK (โ‰ฅ1.28.0) is installed automatically as a dependency

๐Ÿš€ Quick Start

# Clone the repository
git clone https://github.com/YOUR_USERNAME/abaqus-mcp-server.git
cd abaqus-mcp-server

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Copy and edit environment config (optional)
copy .env.example .env

# Run the server
abaqus-mcp serve

๐Ÿ”Œ Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "abaqus": {
      "type": "stdio",
      "command": "python",
      "args": ["-m", "abaqus_mcp_server.cli", "serve"],
      "env": {
        "ABAQUS_COMMAND": "abaqus",
        "ABAQUS_MCP_WORKSPACE_DIR": "./abaqus_work"
      },
      "timeout": 600000
    }
  }
}

Or with Claude Code, add to your project's .mcp.json:

{
  "mcpServers": {
    "abaqus": {
      "type": "stdio",
      "command": "python",
      "args": ["-m", "abaqus_mcp_server.cli", "serve"],
      "env": {
        "ABAQUS_COMMAND": "D:\\SIMULIA\\Commands\\abaqus.bat",
        "ABAQUS_MCP_WORKSPACE_DIR": "${CLAUDE_PROJECT_DIR:-.}/abaqus_work"
      }
    }
  }
}

โš™๏ธ Configuration

All settings via environment variables (prefix ABAQUS_MCP_):

Variable Default Description
ABAQUS_COMMAND auto-detect Path to Abaqus launcher (abaqus.bat)
ABAQUS_MCP_WORKSPACE_DIR ./abaqus_work Workspace root directory
ABAQUS_MCP_MAX_CPUS 4 Maximum CPUs per job
ABAQUS_MCP_SCRIPT_TIMEOUT 300 Script execution timeout (seconds)
ABAQUS_MCP_JOB_TIMEOUT 3600 Job execution timeout (seconds)
ABAQUS_MCP_MAX_OUTPUT_CHARS 20000 Max chars in a single tool output
ABAQUS_MCP_ALLOW_OVERWRITE false Allow overwriting existing files
ABAQUS_MCP_LOG_LEVEL WARNING Server-side logging level

๐Ÿ› ๏ธ Tools

Tool Description Confirm?
check_environment Verify Abaqus installation, Python paths, and workspace status
validate_workspace Create or validate workspace directory structure
generate_script Generate Abaqus Python modeling scripts (cantilever, static, modal, contact)
run_script Execute Python scripts via abaqus python with timeout control
submit_job Submit an .inp file for FEM analysis โœ“
job_status Check job progress from .sta and .lck files
read_job_logs Read .sta/.msg/.dat/.log with automatic error/warning extraction
extract_odb_summary Extract ODB metadata โ€” steps, frames, instances, field outputs
extract_field_output Extract field output (S, U, E, PEEQ, RF, etc.) as CSV with statistics
extract_history_output Extract history output (ALLIE, ALLSE, RF, etc.) as time-value CSV
clean_job Remove intermediate files, preserving .odb/.inp/.cae โœ“

๐Ÿ—๏ธ Architecture

src/abaqus_mcp_server/
โ”œโ”€โ”€ app.py                  # FastMCP singleton โ€” all tools register here
โ”œโ”€โ”€ cli.py                  # argparse entry point
โ”œโ”€โ”€ config.py               # pydantic Settings (ABAQUS_MCP_ prefix)
โ”œโ”€โ”€ security.py             # Workspace sandboxing & path validation
โ”œโ”€โ”€ abaqus_cli.py           # Abaqus subprocess abstraction (all calls go here)
โ”œโ”€โ”€ log_parser.py           # .sta/.msg/.dat parsers
โ”œโ”€โ”€ odb_script_templates.py # Generate Abaqus Python scripts for ODB extraction
โ”œโ”€โ”€ constants.py            # Status strings, file extensions, error keywords
โ””โ”€โ”€ tools/                  # 11 MCP tool implementations (one per file)

Key Design Decisions

  1. FastMCP โ€” high-level MCP SDK with auto-generated JSON schemas from type annotations
  2. ODB extraction via generated scripts โ€” the server generates temporary Python scripts that run under abaqus python (which has odbAccess); system Python cannot import odbAccess
  3. Windows subprocess โ€” Abaqus .bat files require cmd.exe /c "call abaqus.bat ..." (no shell=True)
  4. Workspace sandboxing โ€” security.validate_path() enforces all file ops stay within the workspace
  5. Confirmation gates โ€” destructive tools require confirmed=True as an explicit user gate

๐Ÿ”’ Security

  • All file paths are validated against the workspace directory
  • Path traversal (../../) is blocked
  • Dangerous shell characters (;, |, &, `, $, etc.) are rejected
  • submit_job, run_script, and clean_job require explicit confirmed=True
  • No arbitrary shell execution โ€” all Abaqus calls use explicit argument lists
  • Output is truncated to ABAQUS_MCP_MAX_OUTPUT_CHARS to prevent context overflow

๐Ÿงช Testing

# Run all tests
python -m pytest tests/ -v

# Run a specific area
python -m pytest tests/test_security.py -v

# Run with coverage
python -m pytest tests/ --cov=abaqus_mcp_server --cov-report=html

Test Layers

Layer What Requires Abaqus
Unit security, config, log parsers No
Mocked integration AbaqusCLI, ODB extraction No
MCP protocol Server subprocess, tool listing No
Live integration Real Abaqus calls Yes

๐Ÿ“ Example: Cantilever Beam

examples/simple_beam/ contains a complete cantilever beam analysis:

  1. beam.inp โ€” linear elastic beam with C3D8 elements
  2. Ask Claude Code: "Submit the beam.inp and extract the maximum Mises stress"

The server will: validate the workspace โ†’ submit the job โ†’ check status โ†’ extract ODB summary โ†’ extract field output.

๐Ÿ› Troubleshooting

Abaqus not found

Set ABAQUS_COMMAND to the full path:

set ABAQUS_COMMAND=D:\SIMULIA\Commands\abaqus.bat

ODB extraction fails

  • The .odb file may be locked (job still running) โ€” check with job_status first
  • Abaqus Python must be able to read the workspace directory
  • The generated temp scripts run under abaqus python, not system Python

Path traversal errors

All file paths must be relative to ABAQUS_MCP_WORKSPACE_DIR.

๐Ÿค Contributing

Contributions are welcome! See CONTRIBUTING.md for development setup, project structure, and guidelines.

๐Ÿ“„ License

MIT โ€” see LICENSE for details.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured