Metadata-Version: 2.4
Name: su2-mcp
Version: 0.1.0
Summary: An MCP server around SU2 workflows
Author-email: The Design Research Collective <ask-drc@cmu.edu>
Maintainer-email: Mayank Dixit <mayankd@andrew.cmu.edu>, Christopher McComb <ccm@cmu.edu>
Project-URL: Homepage, https://github.com/cmudrc/su2-mcp
Project-URL: Repository, https://github.com/cmudrc/su2-mcp
Project-URL: Issues, https://github.com/cmudrc/su2-mcp/issues
Project-URL: Documentation, https://cmudrc.github.io/su2-mcp/
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=1.22.0
Requires-Dist: pydantic>=2.9.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: pytest-cov>=4.1; extra == "dev"
Requires-Dist: mypy>=1.11; extra == "dev"
Requires-Dist: ruff>=0.6.0; extra == "dev"
Requires-Dist: sphinx>=8.0; extra == "dev"
Requires-Dist: sphinx-rtd-theme>=3.0.0; extra == "dev"
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: twine>=5.1.0; extra == "dev"
Requires-Dist: pre-commit>=3.8.0; extra == "dev"
Provides-Extra: su2
Requires-Dist: SU2; extra == "su2"
Dynamic: license-file

# su2-mcp

`su2-mcp` exposes SU2 session lifecycle, config editing, solver execution, and
results inspection through an MCP server.

## Features

- Session lifecycle management with per-session working directories.
- Config helpers for reading, parsing, and updating SU2 `.cfg` files.
- Mesh upload and automatic `MESH_FILENAME` synchronization.
- Optional STEP -> SU2 mesh conversion via `gmsh` (`generate_mesh_from_step`).
- Solver wrappers for `SU2_CFD` and `SU2_DEF` with timeout/missing-binary
  handling.
- Result-file listing, base64 download, history CSV parsing, and surface sampling.

## Install

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
```

## Run the Server

### StdIO (default)

```bash
su2-mcp --transport stdio
```

### HTTP transports

```bash
su2-mcp --transport http --host 0.0.0.0 --port 8002 --path /mcp
su2-mcp --transport streamable-http --host 0.0.0.0 --port 8002 --streamable-http-path /mcp
```

### Server-Sent Events (SSE)

```bash
su2-mcp --transport sse --host 0.0.0.0 --port 8000 --mount-path / --sse-path /sse
```

Programmatic entrypoints are available from `su2_mcp.main`.

## Development

```bash
make dev
make lint
make type
make test
make docs
```

Full local CI-style gate:

```bash
make ci
```

## Checking SU2 binaries

The MCP tool `get_su2_status` reports availability of common SU2 binaries
(`SU2_CFD`, `SU2_CFD_MPI`, `SU2_DEF`).

## Optional SU2 dependency extra

```bash
pip install .[su2]
```

## System dependencies

The Python package is pure Python, but some tools rely on external executables:

- `run_su2_solver` / `generate_deformed_mesh`: requires SU2 binaries on `PATH`
- `generate_mesh_from_step`: requires `gmsh` on `PATH`
