An MCP server that exposes structural analysis calculations to AI agents using established open-source Python engineering libraries.
This project is an early-stage Model Context Protocol server for basic structural engineering calculations. The MVP focuses on deterministic, unit-explicit tools for section properties, gross concrete section summaries, and a simple beam under uniformly distributed load.
It uses these libraries as dependencies and integration targets:
sectionpropertiesconcretepropertiesPyniteFEA/ PyNite
It does not fork those projects.
This is an analysis and educational tool, not a certified design tool.
Outputs must be checked by a competent engineer before use. The server does not replace professional judgement, project-specific review, or independent verification. It does not currently perform code checks to Australian Standards, Eurocodes, ACI, AISC, or any other design standard. Code compliance checks are future roadmap items only.
Calculates gross geometric properties for a solid rectangular section.
Inputs:
width_mmdepth_mm
Outputs:
area_mm2centroid_x_mmcentroid_y_mmixx_mm4iyy_mm4j_mm4notes
Example tool call:
{
"name": "calculate_rectangle_section_properties",
"arguments": {
"width_mm": 300,
"depth_mm": 600
}
}Calculates a gross rectangular concrete section summary. This does not include reinforcement, cracking, capacity, interaction diagrams, or design-standard checks.
Inputs:
width_mmdepth_mmconcrete_strength_mpa
Outputs:
gross_area_mm2centroid_x_mmcentroid_y_mmgross_ixx_mm4gross_iyy_mm4notes
Example tool call:
{
"name": "calculate_rectangular_concrete_section_summary",
"arguments": {
"width_mm": 300,
"depth_mm": 600,
"concrete_strength_mpa": 32
}
}Analyses a simply supported beam with a vertical uniformly distributed load over the full span.
Assumptions:
- Simply supported beam.
- Vertical UDL over full span.
- Linear elastic analysis.
- No self-weight unless included in
udl_kn_per_m. - No load combinations, shear deformation, lateral effects, or code checks.
Inputs:
span_mudl_kn_per_melastic_modulus_mpaixx_mm4
Outputs:
reaction_left_knreaction_right_knmax_shear_knmax_moment_knmmax_deflection_mmnotes
Example tool call:
{
"name": "analyse_simple_beam_udl",
"arguments": {
"span_m": 6.0,
"udl_kn_per_m": 12.0,
"elastic_modulus_mpa": 200000,
"ixx_mm4": 85000000
}
}Prerequisites:
- Python 3.11 or newer.
- A Python environment capable of installing
sectionproperties,concreteproperties,PyniteFEA, andmcp.
Install from a local checkout:
git clone https://github.com/Elandu/structural-analysis-mcp.git
cd structural-analysis-mcp
python -m venv .venv
.\.venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"On macOS or Linux, activate the environment with:
source .venv/bin/activateRun tests:
pytestRun linting:
ruff check .Run formatting:
ruff format .Run the MCP server locally over stdio:
structural-analysis-mcpEquivalent module form:
python -m structural_analysis_mcpExample client configuration:
{
"mcpServers": {
"structural-analysis": {
"command": "structural-analysis-mcp",
"args": []
}
}
}For a local editable checkout where the console script is not on PATH, use the Python module:
{
"mcpServers": {
"structural-analysis": {
"command": "python",
"args": ["-m", "structural_analysis_mcp"]
}
}
}examples/simple_beam_udl.mdwalks through the simple beam UDL calculation and closed-form validation.
- Early-stage MVP.
- Gross section properties only for the first section tools.
- No certified design checks.
- No Australian Standards, Eurocode, ACI, or AISC compliance checks.
- No load combinations.
- No reinforced concrete interaction diagrams yet.
- No steel section database yet.
- No unit conversion system yet; inputs must use the units named in each field.
- No external APIs are called.
See ROADMAP.md. Planned work includes additional section geometry tools, steel section support, reinforced concrete interaction diagrams, 2D frame analysis, load combinations, unit handling, result diagrams, report-ready output, validation examples against published references, and optional Australian Standards examples.
Contributions are welcome. Please read CONTRIBUTING.md before opening an issue or pull request.
Good first contributions include:
- More validation examples.
- More section geometry tools.
- Better unit handling.
- Tests for edge cases and invalid inputs.
- Documentation for MCP client setup.
MIT. See LICENSE.