Skip to content
MCP server
Registry

DualSPHysics MCP Server

Agent toolchain for the DualSPHysics SPH solver: case creation, runs, post-processing, validation.

DualSPHysics MCP scores 62 (Good), licensed MIT and written in Python. It installs as a local process. It declares 8 tools. Filed under Uncategorized. GitHub shows 1 stars. Package registries report about 21 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by vegetableno1MITPython1 stars
Trust score
62Good
Trust score 62 of 100, Good

Good trust

62 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 62 comes from

22 + 15 + 1 + 10 + 4 + 10 = 62. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance15 / 20

How recently the repository saw a commit or release.

Maintenance: 15 of 20 points.
Popularity1 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 1 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "vegetableno1-dualsphysics-mcp": {      "command": "uvx",      "args": [        "dualsphysics-mcp"      ],      "env": {        "DSPH_GENCASE": "",        "DSPH_SOLVER": "",        "DSPH_PARTVTK": "",        "DSPH_MEASURETOOL": "",        "DSPH_JOBS_DIR": "",        "DSPH_OMP_THREADS": ""      }    }  }}

Environment variables

NameRequiredNotes
DSPH_GENCASEOptionalPath to the GenCase_linux64 executable (auto-discovered if unset)
DSPH_SOLVEROptionalPath to the DualSPHysics CPU solver executable (auto-discovered if unset)
DSPH_PARTVTKOptionalPath to the PartVTK_linux64 executable (auto-discovered if unset)
DSPH_MEASURETOOLOptionalPath to the MeasureTool_linux64 executable (auto-discovered if unset)
DSPH_JOBS_DIROptionalDirectory for simulation job outputs (defaults to ./jobs)
DSPH_OMP_THREADSOptionalOpenMP threads for the CPU solver (defaults to CPU count)

Tools8Tool docs quality grade C

All capabilities
  • Find the four DualSPHysics tools on this machine: resolved path, provenance (env var, PATH, scan), version, solver feature flags; install hints when one is missing.

  • Describe a 2D dam-break experiment in plain parameters and get a GenCase Def.xml back — no XML by hand, no solver needed. Returns a particle-count estimate for self-checking.

  • Read a case file back as a summary: dp, domain, column/tank/obstacle, timing, gauges, particle estimate.

  • Change parameters of an existing case (in place or to a savepath), re-validating the merged result.

  • Poll a job: state, t/tmax, percent, the solver's Time/Sec throughput and projected finish, Run.out tail.

  • Probe the solution at points and get CSV time series back (comma separator enforced for deterministic parsing).

  • Start the CPU solver in the background (jobs/ directory, Run.out, Part.bi4) and return a jobid immediately.

  • Reconstruct the dam-tip surge front from the CSV and score it against the embedded Koshizuka & Oka (1996) series: per-time errors + MAE/RMSE/max.

About

DualSPHysics MCP

Language: English | 中文

Listed on mcpservers.org vegetableno1/DualSPHysics-mcp MCP server CI

Design, run, and verify DualSPHysics simulations from an AI agent — not just stare at them.

Ten Model Context Protocol tools wrap a local DualSPHysics SPH toolchain end to end: design cases as structured parameters (no hand-written XML, no solver needed to iterate), run them as background CPU jobs with progress, throughput and the solver's own ETA on tap, post-process into ParaView-ready VTK and CSV time series, and verify a 2D dam-break against the Koshizuka & Oka (1996) experiment with per-time errors and MAE / RMSE / max.

The server only launches the DualSPHysics command-line tools as subprocesses; DualSPHysics itself is not distributed here — it is free LGPL-2.1-or-later software, this package neither links nor redistributes its code or binaries, so the MIT licence carries no extra obligations. If you publish work using DualSPHysics, cite Dominguez et al. (2022), Computational Particle Mechanics 9:867–895, doi:10.1007/s40571-021-00404-2.

Tools

ToolWhat it does
check_environmentFind the four DualSPHysics tools on this machine: resolved path, provenance (env var, PATH, scan), version, solver feature flags; install hints when one is missing.
create_caseDescribe a 2D dam-break experiment in plain parameters and get a GenCase *_Def.xml back — no XML by hand, no solver needed. Returns a particle-count estimate for self-checking.
edit_caseChange parameters of an existing case (in place or to a save_path), re-validating the merged result.
describe_caseRead a case file back as a summary: dp, domain, column/tank/obstacle, timing, gauges, particle estimate.
gencaseDiscretise the case into Case.xml + Case.bi4 (plus preview VTK) and report the real particle counts.
run_caseStart the CPU solver in the background (jobs/ directory, Run.out, Part_*.bi4) and return a job_id immediately.
job_statusPoll a job: state, t/tmax, percent, the solver's Time/Sec throughput and projected finish, Run.out tail.
partvtkTurn Part_*.bi4 output into VTK particle files for ParaView; filters and variables pass through.
measure_toolProbe the solution at points and get CSV time series back (comma separator enforced for deterministic parsing).
validate_dambreakReconstruct the dam-tip surge front from the CSV and score it against the embedded Koshizuka & Oka (1996) series: per-time errors + MAE/RMSE/max.

Working chain: check_environment → create_case → describe_case → gencase → run_case → poll job_status → partvtk + measure_tool → validate_dambreak. Vocabulary, three guards and particle-estimate arithmetic: docs/case-generation.md.

Domain contracts

Behaviours of the wrapped tools that their -h output does not tell you:

  • Geometry outside the domain box is silently clipped by GenCase (exit 0, no warning) — create_case containment-checks every domain.
  • DualSPHysics CSVs default to semicolon separators; measure_tool forces commas unless the caller passes their own -csvsep.
  • MeasureTool points files reject leading # comment lines; MeasureTool errors print on stdout, not stderr.
  • Time/Sec in Run.out is wall-clock seconds per simulated second — not steps/second; the row tail is the solver's projected finish.
  • Run.out row formats differ between solver v5.0/v5.2 and v5.4; the parser handles both.

All fourteen contracts (formats, exit codes): docs/domain-contracts.md.

Install

Python 3.10+. The binaries are discovered from DSPH_* environment variables, PATH, or conventional install roots (/opt, /usr/local, ~/softwares, ~, cwd → <root>/DualSPHysics*/bin/linux).

uv sync                 # or: python -m venv .venv && .venv/bin/pip install -e .

Getting the solver (the GitHub repository ships GenCase / PartVTK / MeasureTool prebuilt but not the solver):

  1. Full package from https://dual.sphysics.org/downloads/, or
  2. git clone https://github.com/DualSPHysics/DualSPHysics and build the CPU solver with make -f Makefile_cpu (g++ only, no CUDA needed), then copy the prebuilt tools from bin/linux/.

Configure through environment variables (no .env parsing; see .env.example — the same paths appear in examples/mcp_config.example.json):

DSPH_GENCASE=/home/<user>/softwares/DualSPHysics/bin/linux/GenCase_linux64
DSPH_SOLVER=/home/<user>/softwares/DualSPHysics/bin/linux/DualSPHysics5.4CPU_linux64
DSPH_PARTVTK=/home/<user>/softwares/DualSPHysics/bin/linux/PartVTK_linux64
DSPH_MEASURETOOL=/home/<user>/softwares/DualSPHysics/bin/linux/MeasureTool_linux64
DSPH_JOBS_DIR=/abs/path/to/jobs     # optional, default ./jobs
DSPH_OMP_THREADS=8                  # optional, default all cores

Run

.venv/bin/python mcp_server.py    # hub-style entry point (stdio)
.venv/bin/dualsphysics-mcp        # console script
uvx dualsphysics-mcp              # published on PyPI

Client registration templates: examples/mcp_config.example.json:

{ "mcpServers": { "dualsphysics-mcp": { "command": "uvx", "args": ["dualsphysics-mcp"] } } }
claude mcp add dualsphysics-mcp -- /abs/repo/path/.venv/bin/python /abs/repo/path/mcp_server.py

Example: 2D dam-break validation (Koshizuka & Oka 1996)

examples/dambreak_val2d/ holds the showcase: the official validation layout (dp = 0.01 m; 1 m × 2 m water column in a 4 m × 3 m tank; TimeMax = 2 s, TimeOut = 0.01 s; Verlet / Wendland / artificial viscosity 0.02 / Fourtakas DDT 0.1), regenerated by gen_dambreak_val2d.py (MIT), a surge-front MeasureTool points file (401 points along z = 0.03 m), and the digitised experiment.

Measured on this case (GenCase v5.4.354 / solver v5.4.355, 8 CPU threads, i5-10210U):

QuantityValue
Total particles21,001 (fluid 20,000 + bound 1,001)
Part files201 (Part_0000 … Part_0200)
Solver wall time (TimeMax = 2 s)≈ 14 min
Dam-tip MAE vs experiment (0.09–0.75 s)0.220 m (22.0 % of the column); RMSE 0.240 m
Dam-tip error, early collapse (t ≤ 0.2 s)within ±0.01–0.16 m
Wall impactfront pins at 3.98 m at t ≈ 0.67 s

Simulated surge front vs the 1996 experiment

The residual is SPH physics, not a measurement artefact: the front extraction tracks the solver's own SWL gauge (mean deviation 8 mm < 10 mm point spacing), and the experiment ends at X/a ≈ 4.13 — beyond the 4 m tank — so the comparison saturates after wall impact (validate_dambreak notes impact_time_s).

Agent transcript:

check_environment()                                  # all four tools found
gencase("examples/dambreak_val2d/CaseDambreakVal2D_Def.xml")
  -> particle_counts: total=21001 fluid=20000 bound=1001
run_case("<out>/CaseDambreakVal2D")                  # returns job_id
job_status(job_id)                                   # poll until percent=100
partvtk(job_id=job_id)                               # 201 fluid VTK files
measure_tool(job_id=job_id, points_file="examples/dambreak_val2d/points_damtip.txt")
validate_dambreak(csv_path="<measure csv>", points_file="examples/dambreak_val2d/points_damtip.txt")

validate_dambreak reports per-time errors plus MAE / RMSE / max in metres and as % of the 1 m column. The figure comes from examples/make_validation_figure.py; examples/render_dambreak.py turns the same run's Part_*.vtk into an MP4 animation (dev dependencies).

Tests

uv run pytest -q          # or: .venv/bin/python -m pytest
uv run ruff check .

The suite is green without any solver installed (discovery, command construction, log-fixture parsing, validation math, case generation, stdio end-to-end). Tests marked solver exercise a real local toolchain and auto-skip otherwise.

Contents

  • src/dualsphysics_mcp/ — MCP server, tool discovery and config, error codes, the ten tools in tools/.
  • examples/ — validation case, create_case_demo.py, figure + animation scripts, client template.
  • tests/ — pytest suite (solver tests auto-skip).

Repository rules

  • Committed: source, tests, examples, documentation, templates.
  • Not committed: DualSPHysics binaries or sources (LGPL work stays out), virtual environments, .env, job outputs and generated results.
  • Experiment values in examples/dambreak_val2d/ are digitised facts cited to Koshizuka & Oka (1996) as shipped with the DualSPHysics examples; the generated case XML and all code here are original MIT content — details in CONTRIBUTING.md.

Frequently asked questions

What is DualSPHysics MCP Server?

Agent toolchain for the DualSPHysics SPH solver: case creation, runs, post-processing, validation.

How do I install DualSPHysics MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. DualSPHysics MCP Server runs locally from the PyPI package dualsphysics-mcp with the command uvx dualsphysics-mcp.

Is DualSPHysics MCP Server free and open source?

Yes. DualSPHysics MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does DualSPHysics MCP Server support remote (HTTP) connections?

No remote endpoint is listed for DualSPHysics MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does DualSPHysics MCP Server provide?

DualSPHysics MCP Server provides 8 tools, including check_environment, create_case, describe_case, and edit_case. See the full tool list for descriptions and parameters.

How is DualSPHysics MCP Server's trust score calculated?

DualSPHysics MCP Server scores 62 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server