turboai
README.md
<!-- header:start -->
<p align="center">
<img src="assets/banner.png" alt="turboai-agent" width="100%">
</p>
<p align="center">
<a href="https://github.com/ignaciofuertecarrasco/turboai-agent/actions/workflows/ci.yml"><img src="https://github.com/ignaciofuertecarrasco/turboai-agent/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
<img src="https://img.shields.io/badge/Python-3.12-3776AB?logo=python&logoColor=white" alt="Python 3.12">
<img src="https://img.shields.io/badge/MCP-server-111827" alt="MCP server">
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-16a34a" alt="license MIT"></a>
</p>
<p align="center">
<sub>Part of <a href="https://ignaciofuertecarrasco.github.io/cax-portfolio/"><b>One turbine vane, the whole CAX chain</b></a>: eight small open-source projects around one public turbine benchmark</sub><br>
<sub><a href="https://github.com/ignaciofuertecarrasco/TurboAI">CFD</a> · <a href="https://github.com/ignaciofuertecarrasco/openfoam-viscous-work">viscous work</a> · <a href="https://github.com/ignaciofuertecarrasco/turboai-surrogates">surrogates</a> · <a href="https://github.com/ignaciofuertecarrasco/turboai-shape-ml">shape ML</a> · <a href="https://github.com/ignaciofuertecarrasco/turboai-damage">damage</a> · <b>agent</b> · <a href="https://github.com/ignaciofuertecarrasco/vane-thermomech">CAD → FEA → CAM</a> · <a href="https://github.com/ignaciofuertecarrasco/cax-components">components</a></sub>
</p>
<!-- header:end -->
**A Model Context Protocol (MCP) server that gives an LLM agent a turbine-vane simulation toolbox:
mesh generation, OpenFOAM CFD, aero-thermal boundary conditions for FEA, millisecond surrogates, an inverse
operating-point search and a defect assessment.**
<!-- glance:start -->
## At a glance
| **9** | **ms → min** | **±σ** | **MCP** |
|:-:|:-:|:-:|:-:|
| typed tools: mesh, CFD, heat transfer, surrogates, defects | surrogate answers or a full OpenFOAM run | uncertainty on every surrogate answer | works with any Model Context Protocol client |
<!-- glance:end -->
The agent decides *what* to compute; the tools do the physics. Each tool is a thin, documented wrapper around
a command of the [TurboAI](https://github.com/ignaciofuertecarrasco/TurboAI) projects, with typed arguments, the validity
envelope written in its description, and JSON results with paths to the figures.
```
LLM agent (any MCP client)
│ "Which inlet angle keeps the loss below 5 % at exit Mach 0.95? Check it with CFD."
▼
turboai_mcp.py ── find_operating_point ──► GP surrogates (turboai-surrogates) ~1 ms
── run_cfd ───────────────► gmsh + OpenFOAM (TurboAI) ~3 min
── assess_defect ─────────► hybrid model (turboai-damage) ~0.1 s
── aerothermal_boundary_conditions ─► T_aw and h tables for FEA ~10 min
```
## Tools
| tool | what it does | cost |
|---|---|---|
| `environment_check` | OpenFOAM version, Python stack, CPU resources | s |
| `generate_mesh` | periodic cascade mesh with a y+ ≈ 1 boundary layer; cell count and preview | s |
| `run_cfd` | RANS simulation at (P0, T0, M2is, inlet angle): loss, exit angle, mass flow, loading plot | minutes |
| `aerothermal_boundary_conditions` | adiabatic wall temperature and heat transfer coefficient at engine conditions, as the table a thermal FEA reads | minutes |
| `predict_performance` | surrogate prediction with standard deviations, inside the training envelope | ms |
| `find_operating_point` | operating point that meets any subset of targets (loss, angle, mass flow, Zweifel) | s |
| `assess_defect` | loss change caused by a bump or dent of given height and position, without CFD | ms |
| `dataset_status` | progress of a CFD campaign | ms |
| `validation_summary` | CFD against the VKI experiments | ms |
Design choices that matter for an agent:
* **Envelope in the description.** `predict_performance` states the ranges it was trained on; the server
instructions tell the agent to switch to `run_cfd` outside them.
* **Uncertainty in every surrogate answer**, so the agent can decide when a CFD check is needed.
* **Expensive tools say so** (minutes), and return file paths rather than large arrays.
* **No hidden state.** Every call is reproducible from its arguments.
## Quick start
The server needs the core repository (OpenFOAM wrapper and environment script) and, for the surrogate tools,
the model repositories installed in the same Python environment:
```bash
git clone https://github.com/ignaciofuertecarrasco/TurboAI ../TurboAI # or set TURBOAI_CORE=/path/to/TurboAI
pip install -r requirements.txt # MCP Python SDK 2.x
python mcp_server/turboai_mcp.py # stdio server
```
Client configuration (any MCP client: desktop assistants, IDEs, agent frameworks), see `mcp_server/mcp.example.json`:
```json
{
"mcpServers": {
"turboai": {
"command": "python",
"args": ["mcp_server/turboai_mcp.py"],
"env": {"TURBOAI_CORE": "/path/to/TurboAI"}
}
}
}
```
On Windows the server calls the tools inside WSL (Ubuntu) through the core's `scripts/ofenv.sh`; on Linux it
calls them directly.
## Repository layout
```
turboai-agent/
├── mcp_server/
│ ├── turboai_mcp.py the MCP server: tool definitions, validity envelope, calls into the solvers
│ └── mcp.example.json client configuration
├── tests/test_server.py the server imports without OpenFOAM and exposes the documented tools
└── requirements.txt MCP Python SDK
```
<!-- footer:start -->
## The series
| # | Project | Question |
|:-:|---|---|
| 1 | [TurboAI](https://github.com/ignaciofuertecarrasco/TurboAI) | OpenFOAM CFD of a transonic vane, checked against the wind tunnel, with a Python API |
| 2 | [openfoam-viscous-work](https://github.com/ignaciofuertecarrasco/openfoam-viscous-work) | Viscous heating in the rhoSimpleFoam energy equation, added as an fvOption |
| 3 | [turboai-surrogates](https://github.com/ignaciofuertecarrasco/turboai-surrogates) | How few CFD runs does a millisecond surrogate need? |
| 4 | [turboai-shape-ml](https://github.com/ignaciofuertecarrasco/turboai-shape-ml) | Gaussian processes or a graph network over blade shape? Design checked by CFD |
| 5 | [turboai-damage](https://github.com/ignaciofuertecarrasco/turboai-damage) | Where does a 0.4 mm defect hurt, and can a model tell without CFD? |
| 6 | **turboai-agent** (this one) | The toolbox as typed tools for an LLM agent (MCP) |
| 7 | [vane-thermomech](https://github.com/ignaciofuertecarrasco/vane-thermomech) | CAD → mesh → thermal, static and modal FEA of the cooled vane, CAM, ML data set |
| 8 | [cax-components](https://github.com/ignaciofuertecarrasco/cax-components) | CFD, FEA and a differentiable surrogate as Tesseract components |
Overview page: https://ignaciofuertecarrasco.github.io/cax-portfolio/
## License
MIT, see [LICENSE](LICENSE). The LS-89 geometry and measurements are from T. Arts et al., VKI TN-174 (1990).
<!-- footer:end -->
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues