delft3d-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
delft3d-mcp is a Windows Model Context Protocol (MCP) server for Deltares Delft3D. It lets MCP-compatible desktop clients build grids, interpolate bathymetry, edit model inputs, launch local or MPI simulations, read NEFIS binary outputs, and control Delft3D desktop windows.
What it covers
Memory-mapped 32-bit and 64-bit NEFIS reader (
trim-*,trih-*,wavm-*), Transfinite Interpolation (TFI) curvilinear grid builder, Winslow elliptic orthogonalizer, parallel bathymetry interpolation (idw,nearest,cell_average), and a non-blockingtri-diaglog scanner written in Rust (delft3d_core).48 tools covering RGFGRID, QUICKIN, DIDO, Delft3D-FLOW (2D/3D and morphology), Delft3D-WAVE (SWAN), Delft3D-WAQ, Delft3D-PART, TIDE, WES, RTC, and QUICKPLOT.
Pre-run validation that estimates Courant (CFL) numbers, checks
(M, N)grid and bathymetry dimensions, and verifies referenced attribute files before a run starts.Direct process execution (
shell=False) ford_hydro.exe,mpiexec.exe -localonly, coupledwave.exe <mdw> 1,delwaq.exe, anddelpar.exewith output routed to job logs so MCPstdioJSON-RPC framing stays intact.Sandboxed file access limited to registered project folders (
WorkspaceRegistry), with atomic writes and automatic backups saved under.d3d_mcp_backups/.
Related MCP server: resinsight
Typical workflow
flowchart LR
A["1. Register workspace\nproject_init_workspace"] --> B["2. Build & check grid\ngrid_create_rect / curvilinear\ngrid_orthogonalize"]
B --> C["3. Interpolate bathymetry\nbathy_interpolate_xyz\n(idw / tin / cell_average)"]
C --> D["4. Set up model & boundaries\nflow_update_mdf\nflow_set_boundaries (.bnd/.bct/.bcc/.bch)"]
D --> E["5. Validate inputs\nsim_validate\n(CFL, MNKmax, file refs)"]
E --> F["6. Run simulation\nsim_start -> sim_status -> sim_tail_log"]
F --> G["7. Read & plot results\npost_extract_timeseries / map_slice\npost_convert_netcdf_gis / post_plot_snapshot"]Architecture
flowchart TD
Client["MCP Client (Desktop IDE / Assistant)"] <-->|"JSON-RPC 2.0 (stdio)"| Server["Python 3.12 MCP Host (48 Tools, 4 Resources, 3 Prompts)"]
subgraph Security["Safety and logging"]
Server --> Guard["Workspace Sandbox Guard (blocks traversal and system dirs)"]
Server --> Backup["Atomic writer and .d3d_mcp_backups snapshots"]
Server --> Log["Stderr and rotating file logger"]
end
subgraph Layer1["Layer 1: Rust PyO3 core and domain parsers"]
Server --> Rust["Rust extension (delft3d_core.pyd via PyO3, rayon, memmap2)"]
Rust --> Mesh["GRD / ENC / TEKAL (.ldb/.spl/.pol) + TFI & elliptic smoother"]
Rust --> Bathy["Parallel XYZ -> DEP interpolator (top-K IDW, nearest, cell average)"]
Rust --> Nefis["Memory-mapped NEFIS reader (trim / trih / wavm)"]
Server --> Domain["Domain parsers (MDF, MDW, BND, BCT, BCC, BCH, MOR, SED, INP, RTC)"]
end
subgraph Layer2["Layer 2: Direct kernel runner"]
Server --> Val["Pre-run validator (CFL estimate and dimension check)"]
Server --> JobMgr["Async job manager with PID-reuse guard"]
JobMgr -->|"shell=False"| Exes["d_hydro.exe, mpiexec.exe -localonly, wave.exe, delwaq.exe, delpar.exe"]
Rust --> Tail["tri-diag and log progress scanner"]
end
subgraph Layer3["Layer 3: Windows desktop GUI bridge"]
Server --> UIA["Qt5 UIA (invoke/toggle) + Win32 PrintWindow + PostMessage"]
UIA --> Apps["RGFGRID, QUICKIN, DIDO, d3d_menu, QUICKPLOT, VSI, Flow/Wave GUIs"]
endDelft3D version compatibility
Delft3DPaths.discover() checks DELFT3D_ROOT, D3D_HOME, and standard Windows install paths (C:\Program Files\Deltares\Delft3D*, C:\Program Files (x86)\Deltares\Delft3D*, C:\Delft3D*).
Delft3D version or mode | Directory layout | Status | What works |
Delft3D 4.05.xx to 4.07.02+ (modern installer / OSS) |
| Full support | All 48 tools: FLOW, MPI, coupled WAVE ( |
Delft3D 4.01.xx to 4.04.xx (classic |
| Compatible (auto-detected) | Falls back to classic binary paths ( |
Headless / file-only workstation (no Delft3D installed) |
| Pre- and post-processing | Grid building ( |
Installation
From the precompiled wheel (dist/public/)
uv tool install --python 3.12 --force .\delft3d_mcp-1.0.0-cp312-cp312-win_amd64.whlFrom a local clone
uv sync --python 3.12 --all-groupsMCP client configuration (mcp_config.json or claude_desktop_config.json)
{
"mcpServers": {
"delft3d": {
"command": "D:\\AI Project\\delft3d-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "delft3d_mcp"],
"env": {
"DELFT3D_ROOT": "C:\\Program Files\\Deltares\\Delft3D 4.07.02"
}
}
}
}DELFT3D_ROOT is optional. When omitted, the server scans local Deltares install folders automatically.
Tool reference (48 tools)
1. Project and workspace safety (5 tools)
Tool | Key parameters | What it does |
|
| Registers and activates a sandboxed project folder. |
|
| Reports the detected Delft3D version/layout and lists |
|
| Lists files matching a glob pattern inside the workspace. |
|
| Saves a timestamped snapshot in |
|
| Restores files from a saved backup snapshot. |
2. Grid generation and RGFGRID tools (10 tools)
Tool | Key parameters | What it does |
|
| Reads |
|
| Creates a rectangular or rotated |
|
| Builds a curvilinear grid from 2 opposing splines or 4 curves using TFI and Winslow elliptic smoothing. |
|
| Smooths an existing |
|
| Subdivides grid cells by |
|
| Computes orthogonality cosine, M/N smoothness ratios, aspect ratio, and min/max |
|
| Shifts, scales, or rotates a grid, or masks nodes inside/outside |
|
| Reads or writes |
|
| Reads/writes TEKAL files ( |
|
| Exports |
3. Bathymetry and QUICKIN tools (5 tools)
Tool | Key parameters | What it does |
|
| Reads |
|
| Interpolates |
|
| Fills |
|
| Edits depths within a 1-based |
|
| Computes wet surface area and water volume, combines two |
4. Delft3D-FLOW and morphology (7 tools)
Tool | Key parameters | What it does |
|
| Parses |
|
| Updates or adds |
|
| Writes |
|
| Writes observation points ( |
|
| Writes dry cell points ( |
|
| Reads or writes morphology ( |
|
| Generates Domain Decomposition ( |
5. WAVE, WAQ, PART, TIDE, WES, and RTC (5 tools)
Tool | Key parameters | What it does |
|
| Reads or writes Delft3D-WAVE |
|
| Reads or replaces numbered sections ( |
|
| Searches water-quality processes in |
|
| Generates or updates Delft3D-PART |
|
| Writes |
6. Simulation runner and job manager (6 tools)
Tool | Key parameters | What it does |
|
| Checks missing file references, |
|
| Starts a non-blocking run, writes |
|
| Returns status ( |
|
| Scans |
|
| Stops a running job and its child MPI/WAVE processes after verifying process names. |
|
| Runs short Delft3D CLI utilities synchronously. |
7. NEFIS post-processing, NetCDF, and skill checks (6 tools)
Tool | Key parameters | What it does |
|
| Lists groups, dimensions, and elements inside a NEFIS |
|
| Extracts time-series arrays (such as |
|
| Extracts spatial slices ( |
|
| Exports NEFIS data directly to NetCDF4 ( |
|
| Calculates RMSE, MAE, bias, Pearson |
|
| Saves 150-DPI PNG plots of grids, bathymetry, or time series headlessly. |
8. Windows desktop GUI bridge (4 tools)
Tool | Key parameters | What it does |
|
| Launches a Delft3D GUI program with the required Qt and plugin environment variables. |
|
| Lists open Delft3D windows and optionally dumps the Qt5 UI Automation tree. |
|
| Runs menu items, toggles toolbar buttons, reads the cursor status bar, or clicks/drags on the OpenGL canvas. |
|
| Captures a Delft3D window to PNG via Win32 |
Security
Every path is resolved and checked with Path.is_relative_to(workspace_root) before reading or writing. System locations (C:\Windows, C:\Program Files, drive roots like C:\, and the Delft3D install directory) are blocked from workspace registration. Process termination checks executable names against a kernel allowlist (d_hydro.exe, mpiexec.exe, wave.exe, delwaq.exe, delpar.exe) to avoid killing unrelated programs on PID reuse. No Deltares binaries or GPL files are bundled in this repository.
Author and license
Maintained by Diky Dwi Anggara Permadi (@dikydwi442-byte) under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for aerospace calculations: orbital mechanics, ephemeris, DSN operations, ...
Remote MCP for Dutch KLIC-melding utility data, maps, and dig-safe workflows.
Global CAD/BIM, industrial engineering (FEM, CFD) and property tools via one MCP endpoint.
MCP server for the GDEX (Geoscience Data Exchange) data portal: datasets, files, metrics, subsetting
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients like Codex to control Ansys Workbench and ICEM CFD locally, executing scripts, managing projects, and running simulations.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to watch and drive a running ResInsight, query reservoir simulation models, and render pictures and plots without touching the GUI.GPL 3.0
- AlicenseBqualityCmaintenanceEnables an MCP-compatible AI client to control CADFEKO, the FEKO solver, and POSTFEKO by running Lua API scripts, launching asynchronous jobs, tracking progress, and exporting S11, impedance, Touchstone, model files, and images.9MIT
- AlicenseBqualityCmaintenanceEnables AI assistants and other MCP clients to build and configure DEM studies, control simulation runs, and retrieve curves, grid-function statistics, and selections.25MIT