Getting started
The Kratos MCP Server connects AI assistants (Claude Code, Claude Desktop, or any MCP client) to Kratos Multiphysics, the open-source multiphysics finite element framework.
A local Kratos build is optional — if none is configured, the assistant can pip-install Kratos into the server's own environment on the spot via the kratos_install tool (Linux/Windows x86_64 only; macOS needs a local build).
Once connected, an assistant can carry a simulation through its whole lifecycle:
- Check the environment —
kratos_check_installationreports the Kratos version and which applications are compiled; if it's missing,kratos_installpip-installs it on demand. - Create a mesh —
mdpa_create_structured_meshwrites a line, rectangle or box mesh with named boundary regions (left,right,xmin, ...). - Scaffold the case —
create_projectrenders ProjectParameters.json and Materials.json from a template (structural_static,thermal_transient,fluid_transient, ...). - Add boundary conditions —
add_boundary_conditioninserts fixes, loads, fluxes or inlet/outlet conditions into the parameters file. - Validate —
validate_casecatches missing files, bad model part references and invalid solver settings before anything runs. - Run —
run_simulationstarts a background job;job_status,job_logsandjob_cancelmanage it. - Inspect results —
results_list,results_summary,results_probeandresults_convergenceread the VTK output and the solver log.
Five-minute setup
git clone <this-repo> Kratos-MCP-Server
cd Kratos-MCP-Server
uv sync
claude mcp add kratos -- uv --directory "$PWD" run kratos-mcpNo KRATOS_ROOT needed yet — the assistant can pip-install Kratos itself on first use. (If you already have a compiled checkout, pass -e KRATOS_ROOT=/path/to/Kratos instead; see Installation.)
Then, in Claude Code:
Check the Kratos installation — if it's missing, install it — then set up and run a cantilever plate (1 m × 0.2 m, fixed on the left, 1 MN/m downward line load on the right) and report the tip deflection.
The assistant will chain the tools above and answer with the deflection — for the setup in the cantilever tutorial it is about 0.43 mm downward, within a few percent of beam theory.
What you need
| Requirement | Notes |
|---|---|
| Python ≥ 3.10 + uv | server runtime |
| Kratos, one of: | |
— pip-installed via kratos_install | Linux/Windows x86_64 only; no setup needed beforehand |
| — a compiled build | bin/Release inside KRATOS_ROOT; needed on macOS or for custom builds — see Installation |
| Kratos applications | StructuralMechanics, ConvectionDiffusion, FluidDynamics, LinearSolvers cover all templates |
| Node 18+ | only for building this documentation |
Where to go next
- Installation — environment variables, MKL, verifying the setup
- Connecting a client — Claude Code, Claude Desktop and generic MCP configuration
- Tool reference — every tool with parameters and examples
- Tutorials — worked structural and thermal examples