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.
README
Abaqus MCP Server
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
.batfile execution viacmd.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
abaquscommand must be available) - The
mcpPython 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
- FastMCP — high-level MCP SDK with auto-generated JSON schemas from type annotations
- ODB extraction via generated scripts — the server generates temporary Python scripts that run under
abaqus python(which hasodbAccess); system Python cannot importodbAccess - Windows subprocess — Abaqus
.batfiles requirecmd.exe /c "call abaqus.bat ..."(noshell=True) - Workspace sandboxing —
security.validate_path()enforces all file ops stay within the workspace - Confirmation gates — destructive tools require
confirmed=Trueas 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, andclean_jobrequire explicitconfirmed=True- No arbitrary shell execution — all Abaqus calls use explicit argument lists
- Output is truncated to
ABAQUS_MCP_MAX_OUTPUT_CHARSto 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:
beam.inp— linear elastic beam with C3D8 elements- 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
.odbfile may be locked (job still running) — check withjob_statusfirst - 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。