ETABS Desktop MCP Server
# ETABS Desktop MCP Server
A Model Context Protocol (MCP) server that connects Large Language Models (LLMs) to CSI ETABS via local Windows COM automation on desktop engineering workstations.
This server enables AI assistants (like Claude, Cursor, etc.) to:
- Create, open, and save ETABS models
- Define materials, sections, and structural geometry
- Apply loads and assign properties
- Run structural analysis and design checks
- Extract analysis results and design summaries
- Query and modify ETABS database tables
It uses the `comtypes` library in Python to interact directly with the ETABSv1 COM API, providing a seamless bridge between modern AI and legacy Windows COM applications.
## Prerequisites
- **Windows OS** (required for COM integration โ `comtypes` does not work on macOS/Linux)
- **CSI ETABS** installed (supports v19, v20, v21, v22, and **v23**)
- **Python 3.10+**
- **uv** (recommended) or **pip**
> ๐ For a complete walkthrough of CSI OAPI connection mechanisms, offline / air-gapped workstation setup, and troubleshooting, see the [ETABS 23 Integration Guide](ETABS_23_INTEGRATION_GUIDE.md).
## Repository Layout
```
ETABS-mcp/
โโโ pyproject.toml # build config & entry point
โโโ README.md
โโโ etabs_mcp_config.json # runtime config (units, auto-connect, โฆ)
โโโ src/
โ โโโ etabs_mcp/
โ โโโ __init__.py
โ โโโ server.py # FastMCP entry point (run via `etabs-mcp`)
โ โโโ etabs_connection.py # COM singleton manager
โ โโโ helpers.py # shared utils, units, response formatting
โ โโโ tools/
โ โโโ __init__.py
โ โโโ analysis.py
โ โโโ assignments.py
โ โโโ database_tables.py
โ โโโ design.py
โ โโโ generic_api.py
โ โโโ loads.py
โ โโโ model_control.py
โ โโโ model_geometry.py
โ โโโ properties.py
โ โโโ results.py
โ โโโ seismic.py # IS 1893 modal + RSA + drift
โ โโโ selection.py
โ โโโ stiffness_modifiers.py # ACI 318 + IS 456 cracked-section presets
โ โโโ stories_grids.py
```
## Installation
1. Clone the repo and install the package in editable mode:
```bash
git clone https://github.com/adhokshajakalal-coder/etabs-desktop-mcp.git
cd etabs-desktop-mcp
pip install -e .
```
Or with `uv`:
```bash
uv pip install -e .
```
2. Verify the entry point is registered:
```bash
etabs-mcp --help
```
(The server itself only starts speaking MCP over stdio, so don't expect
pretty output โ just confirm the command exists.)
## Configuration for MCP Clients
### Claude Desktop
Add this to your `claude_desktop_config.json` (usually at
`%APPDATA%\Claude\claude_desktop_config.json` on Windows):
```json
{
"mcpServers": {
"etabs": {
"command": "etabs-mcp",
"args": []
}
}
}
```
If `etabs-mcp` is not on your PATH, use the full path to the script, e.g.:
```json
{
"mcpServers": {
"etabs": {
"command": "python",
"args": ["-m", "etabs_mcp.server"]
}
}
}
```
Make sure you run this Python from the same virtual environment where you
installed the package.
### Cursor
In Cursor settings โ Features โ MCP, add a new server:
- **Type:** `command`
- **Name:** `ETABS`
- **Command:** `etabs-mcp` (or the full path to your venv's script)
### Claude Code / other stdio MCP clients
```bash
claude mcp add etabs -- etabs-mcp
```
## Tool Categories
The server exposes **69 tools** grouped by domain:
| Category | Tools | Key functions |
|---|---|---|
| **Model Control** | 6 | `etabs_get_status`, `etabs_new_model`, `etabs_open_model`, `etabs_save_model`, `etabs_close_model`, `etabs_set_units` |
| **Geometry** | 7 | `etabs_add_point`, `etabs_add_frame`, `etabs_add_area`, `etabs_get_all_*`, `etabs_delete_object` |
| **Stories & Grids** | 4 | story/grid definition and retrieval |
| **Properties** | 7 | materials, frame sections (I, tube, concrete), area sections, rebar |
| **Assignments** | 6 | frame section, releases, area section, diaphragm, pier/spandrel labels |
| **Stiffness Modifiers** | 3 | ACI 318-19 + **IS 456:2000** cracked-section presets for beams/columns/walls/slabs |
| **Loads** | 7 | patterns, cases (Linear/Modal/RSA/Nonlinear), combinations, point/frame/area loads |
| **Analysis** | 4 | run solver, case status, active DOF, delete results |
| **Results** | 5 | displacements, frame forces, reactions, base reactions |
| **๐ Seismic** | **7** | **IS 1893:2016 modal + RSA + drift check** (see below) |
| **Design** | 4 | steel & concrete design, code setting, summary results |
| **Database Tables** | 4 | full interactive access to ETABS tables |
| **Selection** | 4 | select objects, groups, named selections |
| **Generic API** | 1 | `etabs_call_api` โ escape hatch for all 1,300+ ETABS methods |
---
### ๐ Seismic Module โ IS 1893:2016 / ASCE 7 / EC8
The new `seismic.py` module adds 7 tools for complete response spectrum workflow:
| Tool | Purpose |
|---|---|
| `etabs_define_modal_case` | Eigenvector/Ritz case; max modes, shift value |
| `etabs_define_response_spectrum` | RSA case โ CQC/SRSS, eccentricity, scale factors |
| `etabs_get_modal_results` | Periods, frequencies, mass participation; auto-checks IS 1893 Cl. 7.7.5a 90% mass rule |
| `etabs_get_story_drifts` | Inter-storey drift ratios with IS 1893 Cl. 7.11.1 h/250 check |
| `etabs_get_story_forces` | Storey shear and overturning moments per floor |
| `etabs_set_is1893_seismic_params` | Computes ETABS scale factor from Zone/I/R/soil; step-by-step workflow guide |
| `etabs_check_is1893_drift` | Full X+Y direction drift compliance report with PASS/FAIL per storey |
**IS 1893:2016 RSA workflow (6 steps):**
```
1. etabs_set_is1893_seismic_params(zone="III", I=1.2, R=5.0) โ get scale factor
2. Define IS 1893 spectrum function in ETABS (manually or via etabs_call_api)
3. etabs_define_modal_case("MODAL", max_modes=36)
4. etabs_run_analysis()
5. etabs_get_modal_results("MODAL") โ verify โฅ 90% mass (Cl. 7.7.5a)
6. etabs_define_response_spectrum("EQX", scale_x=SF) + "EQY"
7. etabs_check_is1893_drift("EQX", "EQY") โ PASS/FAIL report
```
### Stiffness Modifiers (ACI 318 presets)
The server ships with baked-in ACI 318-19 Table 6.6.3.1.1(a) cracked-section
factors, so an LLM can apply them to a whole model in one tool call.
**One-shot for all four categories** โ call `etabs_apply_aci_stiffness_modifiers`
with either explicit names or named ETABS groups per category:
```jsonc
// Apply ACI defaults to all members via groups
{
"beam_group": "BEAMS",
"column_group": "COLUMNS",
"wall_group": "WALLS",
"slab_group": "SLABS"
}
```
Defaults applied:
| Category | Preset | Modifiers |
|---|---|---|
| Beams | `aci_beam` | I = 0.35 Ig, torsion = 0.20 |
| Columns | `aci_column` | I = 0.70 Ig, A = 0.70 Ag |
| Walls | `aci_wall` | I = 0.70 Ig, A = 0.70 Ag (uncracked) |
| Slabs | `aci_slab` | I = 0.25 Ig |
**Granular tools** for finer control:
- `etabs_assign_frame_stiffness_modifiers` โ apply to specific frames with any
of the presets `aci_beam`, `aci_beam_conservative`, `aci_column`,
`aci_column_conservative`, `aci_spandrel`, `aisc_beam`, `is456_beam`,
`is456_column`, `is456_beam_seismic`, `is456_shear_wall` โ or pass individual
`area / m2 / m3 / torsion / mass / weight` values to override.
- `etabs_assign_area_stiffness_modifiers` โ apply to specific areas with any of
the presets `aci_wall`, `aci_wall_cracked`, `aci_slab`, `aci_slab_joist`,
`aci_drop_panel`, `steel_deck`, `is456_wall`, `is456_wall_cracked`,
`is456_slab`, `is456_flat_slab`, `is456_ribbed_slab` โ or override individual
`f11 / f22 / f12 / m11 / m22 / m12 / v13 / v23` values.
> **Note on modifier ordering.** Frame modifiers are passed to ETABS as
> `[Area, M2, M3, Torsion, M2_weight, M3_weight, Mass, Weight]` and area
> modifiers as `[F11, F22, F12, M11, M22, M12, V13, V23]`. The Python tool
> exposes them as named parameters so you never transpose them by accident.
> If your ETABS version uses a different ordering, use `etabs_call_api` with
> `interface_path="FrameObj"` and `method_name="SetModifiers"` to pass the
> raw array directly.
## Capabilities, Limitations & Precautions
### What Can Be Done
- **End-to-End Modeling:** Create/open/save `.EDB` models, set units, define materials (e.g., `M30`), frame sections, and slab/wall area sections.
- **3D Geometry & Supports:** Place columns, beams, braces, and slabs, and assign base restraints via `etabs_call_api` (`PointObj.SetRestraint`).
- **Loads & Seismic Setup:** Define `Dead`, `Live`, `SDL`, and `Quake` load patterns, apply area/frame/point loads, apply ACI 318 / IS 456 stiffness modifiers, and compute **IS 1893:2016** seismic scale factors (`etabs_set_is1893_seismic_params`).
- **Analysis & Extraction:** Run structural/modal analysis (`etabs_run_analysis`) and extract modal periods, frequencies, mass participation ratios, story drifts, story forces, and reactions.
- **Direct OAPI Escape Hatch:** Call any ETABS COM method not covered by a dedicated tool using `etabs_call_api`.
### What Cannot Be Done Automatically
- **Automatic GUI Viewport Refresh:** Objects added via the OAPI do not appear in the ETABS GUI until `View.RefreshView(0, True)` is called via `etabs_call_api` (or **Restore Full View** is clicked manually in ETABS).
- **ETABS 23 COM API Gaps:** Some high-level methods are not exposed in the ETABS 23 COM interface (for example, `LoadPatterns.AutoSeismic` does not expose `SetIS1893_2016`, `Func.FuncRS` does not expose `SetUser` / `SetIS1893_2016`, and `EditGeneral.ReplicateLinear` is unavailable). Configure those items directly in the ETABS GUI or via `etabs_call_api` equivalents.
- **Automated Engineering Sign-Off:** AI-generated models, member sizes, load assumptions, and code checks must always be reviewed and verified by a qualified structural engineer.
### Precautions
1. **Save Before Running Analysis:** ETABS requires the model to have a saved `.EDB` file path before `etabs_run_analysis` can execute.
2. **Unlock Before Editing:** Once analysis finishes, ETABS locks the model (`model_is_locked: true`). Unlock the model before modifying geometry, sections, or loads.
3. **Verify Supports & Units:** Confirm units (e.g., `kN_m_C`) at model creation and ensure base joints are properly restrained so the structure is not a mechanism during modal analysis.
4. **Verify Modal Mass Participation:** Per **IS 1893:2016 Cl. 7.7.5a**, confirm cumulative modal mass participation reaches at least **90%** in both principal horizontal directions.
## Architecture
This uses the [FastMCP](https://github.com/jlowin/fastmcp) framework.
Communication with the LLM happens over **stdio** while communication with
ETABS happens via **Windows COM** (using `comtypes`).
The server attempts to automatically attach to a running instance of ETABS
when started. If it cannot, the LLM can trigger `etabs_new_model` to launch a
fresh instance in the background.
## Troubleshooting
| Symptom | Fix |
|---|---|
| `ModuleNotFoundError: No module named 'etabs_mcp'` | Run `pip install -e .` from the repo root (where `pyproject.toml` lives). |
| `comtypes` import error on macOS/Linux | This is expected โ the server only runs on Windows. |
| ETABS won't auto-attach | Start ETABS manually, then call `etabs_get_status`. |
| `ConnectionError: Cannot launch ETABS` | Set `etabs_executable_path` in `etabs_mcp_config.json` to the full path of `ETABS.exe`. |
| Model created, but ETABS GUI viewports are blank | Call `etabs_call_api` with `interface_path="View"`, `method_name="RefreshView"`, `arguments=[0, True]` (or click **Restore Full View** in ETABS). |
| AI agent cannot connect while firewall outbound rule is active | See [Firewall & Offline / Air-Gapped Workstations](#firewall--offline--air-gapped-workstations) below. |
### Firewall & Offline / Air-Gapped Workstations
> **Note:** Always ensure ETABS is properly licensed per your organization's licensing agreements. When operating in secure offline or air-gapped engineering environments or restricting `ETABS.exe` with Windows Defender Firewall outbound rules, follow the steps below so COM/OAPI and the local MCP server communicate reliably without interruption.
**Why this happens:** Blocking all outbound traffic for `ETABS.exe` in Windows Defender Firewall can prevent the MCP server / AI agent from attaching to or communicating with the running ETABS instance while the rule is active.
**Recommended Startup Sequence (When Using an Outbound Block Rule):**
1. **Launch ETABS** with your outbound firewall rule **enabled**.
2. Wait until ETABS has **fully loaded** to the start screen or an open model.
3. **Disable (turn off) the outbound rule** in Windows Defender Firewall.
4. **Connect / run your AI agent** (verify with `etabs_get_status`).
5. Once your session is finished and ETABS is closed, **re-enable** the outbound rule if needed.
**Alternative (No Toggling Required):** Scope your Windows Firewall outbound rule to block only external/public IP ranges while allowing local loopback (`127.0.0.1`, `::1`) and local subnet traffic so COM/OAPI and local MCP communication are not interrupted.
## โ๏ธ Disclaimer
* **Trademarks:** ETABS, SAPFire, and CSi are registered trademarks of Computers and Structures, Inc. (CSi). All product and company names are trademarksโข or registeredยฎ trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
* **Independent Open-Source Tool:** This project is an independent, community-driven Model Context Protocol (MCP) interface and is neither affiliated with, maintained by, nor officially endorsed by Computers and Structures, Inc.
* **No Proprietary Binaries or Bypass Mechanisms:** This repository contains zero proprietary binaries, cracks, keygens, patched executables, or bypass mechanisms. It functions exclusively as an automation bridge communicating with locally installed software via standard, documented Microsoft Windows COM automation and CSi OAPI.
## License
MIT License. See [LICENSE](LICENSE) for details.
TDQS
Scored across 69 tools
Most tools map to a distinct resource+action, but several clusters overlap: etabs_get_story_drifts vs etabs_check_is1893_drift both report drift, and etabs_apply_aci_stiffness_modifiers largely duplicates the two category-specific modifier tools. The design tools also fragment (run_steel_design/run_concrete_design plus get_design_results_summary with a design_type switch), and 'SelectedObjects' as an item_type option blurs the line with etabs_select_objects.
Strong, predictable etabs_<verb>_<noun> snake_case pattern throughout, with matching parameter conventions (name, item_type, replace). Minor deviations like etabs_call_api, etabs_get_selected, and etabs_add_to_group break the noun pattern, but readability and grouping remain clear.
69 tools is very heavy and forces the agent to navigate a large surface, even though the underlying ETABS domain is genuinely broad. Convenience wrappers (apply_aci_stiffness_modifiers, check_is1893_drift) add redundancy on top of already-covered primitives, and etabs_call_api already provides an escape hatch for uncovered API methods.
Core lifecycle is well covered: model open/save/close, geometry creation and listing, sections/materials, load patterns/cases/combos, loads, analysis, results, design, and groups. However, most define_* tools have no matching delete/modify operation (materials, sections, load patterns, load cases, groups), and objects support add/delete but no property editing beyond assignment calls.