Skip to main content

MCP server for Kratos Multiphysics: scaffold, run and post-process finite element simulations

Project description

Kratos MCP Server

CI Deploy docs Release PyPI Python License: MIT

An MCP server that lets AI assistants drive Kratos Multiphysics finite element simulations end to end:

  • Introspect the installation: applications, elements, conditions, constitutive laws, variables, solvers and their default parameters.
  • Scaffold simulation cases from templates: structural (static/dynamic/modal), thermal (transient/stationary) and fluid (transient incompressible) — ProjectParameters.json, Materials.json and structured MDPA meshes with named boundary regions.
  • Run simulations as managed background jobs (status, live logs, progress, cancel) that survive server restarts.
  • Post-process VTK results: summaries, point probes, convergence analysis.

31 tools, 7 resources and 4 guided prompts. See the full documentation in docs/ (VitePress).

Quick start

A local Kratos build is not required — the server can pip-install Kratos itself on first use.

Once published to PyPI, no clone needed — uvx fetches and runs it:

claude mcp add kratos -- uvx kratos-mcp-server

From a local checkout (current state, before the first PyPI release):

git clone https://github.com/loumalouomega/Kratos-MCP-Server
cd Kratos-MCP-Server
uv sync
claude mcp add kratos -- uv --directory "$PWD" run kratos-mcp

Then ask your assistant something like:

Check the Kratos installation — install it if it's missing — then set up a cantilever plate 1 m × 0.2 m fixed on the left with a 1 MN/m downward load on the right edge, run it, and report the tip deflection.

The assistant calls kratos_install the first time and reuses it afterwards. If you already have a compiled Kratos checkout, skip that and point KRATOS_ROOT at it instead (-e KRATOS_ROOT=/path/to/Kratos on the claude mcp add line) — see Installation.

Requirements

  • Python ≥ 3.10, uv
  • Kratos Multiphysics, either pip-installed via kratos_install (Linux/Windows x86_64 only — no macOS wheels) or a compiled build (tested with 10.4, StructuralMechanics / ConvectionDiffusion / FluidDynamics / LinearSolvers applications)

Architecture in one paragraph

Kratos is never imported in the server process — it prints a banner on import (which would corrupt the stdio JSON-RPC stream) and can abort the process on solver errors. Short operations run in a worker subprocess that returns JSON through a result file; simulations run detached with per-job directories under ~/.kratos-mcp/jobs/. See docs/guide/architecture.md.

Development

uv run pytest -m "not kratos"   # unit tests (no Kratos needed)
uv run pytest -m kratos          # integration tests against the real build
npm install && npm run docs:dev  # documentation site

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kratos_mcp_server-0.1.1.tar.gz (172.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kratos_mcp_server-0.1.1-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file kratos_mcp_server-0.1.1.tar.gz.

File metadata

  • Download URL: kratos_mcp_server-0.1.1.tar.gz
  • Upload date:
  • Size: 172.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kratos_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 82c981cdf7a74521738ee65b6df4fe36a654c49e5527b0d40e17aba1f6d3be9d
MD5 4d0aa52f551512051ed2a0b088d09378
BLAKE2b-256 04b817db3d35dc88e738a73f1e6555e33a4d4338de0bd5fbf4bd3e7a10ad85c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for kratos_mcp_server-0.1.1.tar.gz:

Publisher: release.yml on loumalouomega/Kratos-MCP-Server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kratos_mcp_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for kratos_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c76ebdda1e5af821c47a8370dc86f3c45e955ce79544ec138a5dc6f9a65a758
MD5 5997b63f0c4a744e54a899d7482f2073
BLAKE2b-256 6a1b753136380a13a6b046b9cedab2427d7129a03fb25b3728244a1e3b7476e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for kratos_mcp_server-0.1.1-py3-none-any.whl:

Publisher: release.yml on loumalouomega/Kratos-MCP-Server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page