1. Conduid
  2. Science
  3. ol-dwsim-mcp-server
MCP server · Science

ol-dwsim-mcp-server

Model Context Protocol server for DWSIM chemical process simulation

Unclaimed science
37Low

Scored 5 months ago · breakdown

About ol-dwsim-mcp-server

ol-dwsim-mcp-server is an MCP server in the Science category: model Context Protocol server for DWSIM chemical process simulation.

Install

uvx
uvx ol-dwsim-mcp-server
pip
pip install ol-dwsim-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about ol-dwsim-mcp-server

Powered by Claude · Grounded in docs

I know everything about ol-dwsim-mcp-server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

OntoLedgy DWSIM Interop Services

Windows only. Runs DWSIM in-process via pythonnet, so it requires a DWSIM build with the full Windows desktop runtime (Windows 10/11 or Windows Server with Desktop Experience). macOS support is being explored. Linux is not currently supported.

Exposes DWSIM as a Model Context Protocol (MCP) server. AI assistants and other MCP clients can call canonical thermodynamics operations — flash calculations, phase properties, compound lookups — against a live DWSIM engine. Licensed under AGPL-3.0-or-later.

Implements the SimulatorAdapter protocol defined by ol-simulator-interop-services, making this one adapter among several planned for the same protocol (DWSIM now; Rust thermo kernel, HYSYS, UniSim planned).


Install

From PyPI (recommended for end users)

For a full non-developer setup, run the one-command installer. It installs the Python tool, downloads and configures the tested DWSIM v9.0.5-mcp binaries unless you pass -DwsimPath, and configures detected MCP clients. Supports default Windows PowerShell 5.1 and PowerShell 7+.

irm https://raw.githubusercontent.com/OntoLedgy/ol_dwsim_interop_services/develop/install.ps1 | iex

To pass installer parameters, download the script first:

irm https://raw.githubusercontent.com/OntoLedgy/ol_dwsim_interop_services/develop/install.ps1 -OutFile install.ps1
.\install.ps1 -DwsimPath "C:\Program Files\DWSIM"

Installer parameters:

Parameter Use
-DwsimPath <path> Use an existing local DWSIM directory instead of downloading the tested build. The directory must directly contain DWSIM.Interfaces.dll, DWSIM.Thermodynamics.dll, and DWSIM.SharedClasses.dll; version differences from v9.0.5-mcp may cause runtime issues.
-SkipUvInstall Skip uv installation when uv is already available.
-UsePipx Install or uninstall ol-dwsim-mcp-server with pipx instead of uv tool.
-SkipMcpConfig Skip automatic Claude Code, Codex CLI, and VS Code Copilot MCP configuration.
-McpClients <Claude|Codex|Copilot|All> Limit automatic MCP configuration to selected clients. Defaults to All.
-Uninstall Remove the installed tool and DWSIM MCP client configuration.

Install via pipx or uv tool so the dwsim-mcp command lands on the system PATH — MCP clients like Claude Desktop need to be able to launch it without inheriting a venv:

pipx install ol-dwsim-mcp-server
# or
uv tool install ol-dwsim-mcp-server

Plain pip install ol-dwsim-mcp-server into a venv also works, but you'll need to reference the venv's dwsim-mcp.exe by absolute path when configuring MCP clients (see Connecting to AI assistants).

All three install modes pull the prebuilt DwsimWorker.dll bundled in the wheel. DWSIM's own engine binaries can't be redistributed — you supply those yourself:

  1. Use an existing DWSIM install. Set DWSIM_PATH to your DWSIM directory (e.g. C:\Program Files\DWSIM9) and run dwsim-mcp run.
  2. Build DWSIM from source. Clone DanWBR/dwsim, build, and point DWSIM_PATH at the build output.

Full setup in mcp_service/dwsim_worker/SETUP.md.

From a GitHub Release

Each tag publishes three assets on the Releases page:

Asset Use when
ol_dwsim_mcp_server-<version>-py3-none-any.whl Standard install — pip install <wheel-path>
ol-dwsim-mcp-server-<version>-source.zip Inspecting or redistributing source (AGPL §13)
DwsimWorker-<version>.zip Standalone .NET worker payload without the Python wrapper

The DWSIM version each release links against is listed in the release notes as a compatibility row.

From a cloned checkout (development)

Run from a local clone if you're modifying the server, stress-testing before a release, or can't use pipx/uv tool. The server depends on the sibling ol_simulator_interop_services package; uv installs it as an editable local dependency via [tool.uv.sources] pointing at a sibling checkout.

1. Clone both repos side-by-side. The relative path ../../../ol_simulator_interop_services from mcp_service/server/pyproject.toml must resolve to the interop package's repo root:

# A parent directory for both
mkdir C:\dev\ontoledgy ; cd C:\dev\ontoledgy

git clone https://github.com/OntoLedgy/ol_simulator_interop_services.git
git clone https://github.com/OntoLedgy/ol_dwsim_interop_services.git

This gives you C:\dev\ontoledgy\ol_simulator_interop_services and C:\dev\ontoledgy\ol_dwsim_interop_services — the uv source path resolves correctly.

2. Set up the Python environment:

cd ol_dwsim_interop_services\mcp_service\server
uv sync

uv sync installs all runtime deps plus an editable install of the local ol-simulator-interop-services. It also registers the dwsim-mcp entry point in .venv\Scripts\.

3. Build the .NET worker (full .NET prerequisites listed under Development):

cd ..\dwsim_worker
.\build.bat

4. Configure DWSIM. Copy mcp_service/dwsim_worker/dwsim.config.json.sample to dwsim.config.json (gitignored) and set dwsim_path to your DWSIM install or build folder — see mcp_service/dwsim_worker/SETUP.md for detail.

5. Verify and run:

cd ..\server
.\.venv\Scripts\dwsim-mcp.exe doctor
.\.venv\Scripts\dwsim-mcp.exe run

6. Point an MCP client at the checkout. Use the absolute-path variant in Connecting to AI assistants, with command set to C:\dev\ontoledgy\ol_dwsim_interop_services\mcp_service\server\.venv\Scripts\dwsim-mcp.exe.

Edits to Python source are picked up immediately (editable install). Edits to shared/property_packages.toml or C# code require build.bat again so the new artifacts land in DwsimWorker/bin/Debug/.

For deeper contributor workflow (tests, linting, release flow), see the Development section below.


Uninstall

For a non-developer uninstall from PowerShell:

irm https://raw.githubusercontent.com/OntoLedgy/ol_dwsim_interop_services/develop/install.ps1 -OutFile install.ps1; .\install.ps1 -Uninstall

If you originally installed with -UsePipx, add -UsePipx to the uninstall command.


Quick start

Verify the install

dwsim-mcp doctor

Reports Python version, pythonnet status, DWSIM discovery, and missing prerequisites.

Run the MCP server

dwsim-mcp run

Defaults to stdio transport — the shape Claude Desktop, VS Code Copilot, and Codex CLI expect. For HTTP/SSE, pass --transport http or --transport sse.

See the release info

dwsim-mcp version

Prints package name, version, commit SHA, source URL, and license — the AGPL §13 source offer, also exposed at runtime via the release://info MCP resource.


Connecting to AI assistants

Platform Configuration file Format
Claude Desktop %APPDATA%\Claude\claude_desktop_config.json JSON
VS Code Copilot settings.json or mcp.json JSON
OpenAI Codex CLI %USERPROFILE%\.codex\config.toml (or ~/.codex/config.toml) TOML

The config form depends on how you installed the server. Codex CLI uses TOML; Claude Desktop and VS Code use JSON.

If installed with pipx or uv tool install — dwsim-mcp is on PATH and the host can launch it by name.

Claude Desktop / VS Code Copilot (JSON):

{
  "mcpServers": {
    "dwsim": {
      "command": "dwsim-mcp",
      "args": ["run"]
    }
  }
}

OpenAI Codex CLI (TOML, append to ~/.codex/config.toml):

[mcp_servers.dwsim]
command = "dwsim-mcp"
args = ["run"]

If installed with pip install into a venv, or running from a cloned checkout — use the absolute path to the venv's dwsim-mcp.exe so the host's subprocess doesn't need a PATH entry or venv activation.

Claude Desktop / VS Code Copilot (JSON):

{
  "mcpServers": {
    "dwsim": {
      "command": "C:\\path\\to\\your\\.venv\\Scripts\\dwsim-mcp.exe",
      "args": ["run"]
    }
  }
}

OpenAI Codex CLI (TOML):

[mcp_servers.dwsim]
command = "C:\\path\\to\\your\\.venv\\Scripts\\dwsim-mcp.exe"
args = ["run"]

Detailed per-platform setup in docs/resources/getting-started.md.


Architecture

This adapter is the concrete DWSIM implementation of the canonical SimulatorAdapter protocol. DWSIM's .NET Framework engine is loaded in-process via pythonnet — no separate worker process, no HTTP hop.

LLM agent / MCP client
        |
        v
+--[ ol_thermodynamics_agent_services ]--+
|   MCP tools, routing, provenance       |
+----------------------------------------+
        |
        v
+--[ ol_simulator_interop_services ]-----+
|   canonical domain model + protocol    |
+----------------------------------------+
        |
   +----+----+----------+---------+
   v         v          v         v
 [Rust]   [DWSIM]   [HYSYS]   [UniSim]
 kernel   adapter   adapter    adapter
            ^
            |
         this repo

Polyglot layout:

  • mcp_service/server/ — Python MCP server (FastMCP + pythonnet CLR loader).
  • mcp_service/dwsim_worker/ — .NET Framework 4.8 worker hosting the DWSIM engine.
  • shared/property_packages.toml — single source of truth for the property-package inventory consumed by both Python and .NET sides.

Project structure

ol_dwsim_interop_services/
├── shared/                           # Cross-language configuration
│   └── property_packages.toml        # Canonical property-package inventory
├── mcp_service/
│   ├── server/                       # Python MCP server (ol-dwsim-mcp-server wheel)
│   │   ├── dwsim_mcp_server/         # Main Python package
│   │   └── tests/                    # unit / integration / smoke / cli tests
│   └── dwsim_worker/                 # .NET Framework 4.8 worker
│       ├── DwsimWorker/              # C# class library (DwsimWorker.dll)
│       └── DwsimWorker.Tests/        # xUnit test project
├── prebuilt/                         # Beta-tester setup script + bundled binaries
├── docs/                             # MCP tool reference, architecture, deployment
└── scripts/                          # Build + packaging helpers

Key features

  • Model Context Protocol — standard stdio, HTTP, and SSE transports via FastMCP.
  • CAPE-OPEN — phase properties surfaced with the same semantics other chemical-engineering tools expect.
  • In-process DWSIM — pythonnet loads DwsimWorker.dll into the server process; sub-millisecond overhead per call.
  • Session-based — each MCP session gets an isolated DWSIM flowsheet; sessions are cleanly torn down on disconnect.
  • Capability-gated tool surface — adapter declares SUPPORTED_TOOLS; the agent layer only advertises what's actually wired (no lying about create_session or get_diagnostics).
  • Single source of truth for property packages — edit shared/property_packages.toml, rebuild; Python and .NET both pick up the change.
  • AGPL §13 source offer — every running instance self-identifies commit SHA, source URL, and license via CLI, startup log, and release://info MCP resource.
  • Observability — structured logs, OpenTelemetry traces at every tool boundary, Prometheus-style metrics.

Development

Prerequisites

Install uv (Windows, PowerShell)

irm https://astral.sh/uv/install.ps1 | iex

If execution policy blocks the pipe:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
$uv = "$env:TEMP\uv-install.ps1"
irm https://astral.sh/uv/install.ps1 -OutFile $uv
Unblock-File $uv
& $uv

Verify: uv --version.

Build from source

git clone https://github.com/OntoLedgy/ol_dwsim_interop_services.git
cd ol_dwsim_interop_services

# Python environment
cd mcp_service\server
uv sync
.\.venv\Scripts\Activate.ps1

# .NET worker
cd ..\dwsim_worker
.\build.bat

build.bat handles framework/SDK versioning — use it instead of dotnet build directly to avoid mismatch errors.

DWSIM binaries setup

The worker needs DWSIM's compiled engine DLLs next to it. Copy from a local DWSIM build:

$src = "..\..\dwsim\DWSIM\bin\x64\Debug"    # adjust to your DWSIM clone
$dest = "mcp_service\dwsim_worker\dwsim_binaries\x64\Debug"
New-Item -ItemType Directory -Path $dest -Force | Out-Null
Copy-Item "$src\*.dll" $dest -Force
Copy-Item "$src\data" "$dest\data" -Recurse -Force
Copy-Item "$src\ThermoCS" "$dest\ThermoCS" -Recurse -Force

Or copy mcp_service/dwsim_worker/dwsim.config.json.sample to dwsim.config.json (gitignored) and set dwsim_path to your DWSIM build folder.

Full step-by-step in mcp_service/dwsim_worker/SETUP.md.

Running tests

# Python
cd mcp_service\server
.\.venv\Scripts\python.exe -m pytest tests/unit tests/cli -q

# Live-DWSIM integration (requires DwsimWorker.dll built + DWSIM binaries)
.\.venv\Scripts\python.exe -m pytest tests/integration -q -m live_dwsim

# C# (from mcp_service\dwsim_worker after build.bat)
# Always use vstest via build.bat's output — never `dotnet test` directly.

Adding a property package

Edit shared/property_packages.toml, then .\build.bat. Both the Python adapter (tomllib at import time) and the .NET worker (Tomlyn in a static constructor) pick the change up at next startup. A live-DWSIM alignment test asserts the canonical, worker, and runtime inventories agree.


Related repositories

Repository Layer Role
ol_thermodynamics_agent_services Agent (top) MCP tool schemas, backend routing, provenance
ol_simulator_interop_services Interop (middle) Canonical domain model, SimulatorAdapter protocol, registries
ol_thermodynamics_kernel (planned) Adapter Native Rust thermo kernel via PyO3

Architecture reference


AGPL-3.0 source offer

Every running ol-dwsim-mcp-server instance exposes the exact source metadata for that deployment: package name, version, commit SHA, source repository URL, and license. Three surfaces advertise this to satisfy AGPL §13:

  1. MCP resource release://info — any connected client can fetch it.
  2. CLI dwsim-mcp version — operator-facing.
  3. Stderr startup event — a single JSON line emitted at server boot, event name dwsim_mcp_server_started.

See LICENSE for the full AGPL-3.0-or-later text.


License

OntoLedgy's contributions in this repository are dual-licensed:

  1. Open source — AGPL-3.0-or-later. See LICENSE for the full text and NOTICE for copyright and attribution.
  2. Commercial — a separate proprietary license is available from OntoLedgy Ltd. for OntoLedgy's contributions only. See COMMERCIAL.md for scope, exclusions, and terms.

Copyright (c) 2018-2026 OntoLedgy Ltd.

Important — DWSIM scope. This repository links to DWSIM, an upstream chemical process simulator licensed under GPL-3.0 by its maintainers. DWSIM is not owned by OntoLedgy and cannot be relicensed by us. The commercial license offered here covers OntoLedgy's own code (the MCP server, the DwsimWorker glue source, and OntoLedgy-authored build/test/doc material) but does not relicense DWSIM or any compiled artifact (e.g. DwsimWorker.dll) to the extent it embeds or links DWSIM .NET assemblies. See COMMERCIAL.md for the three practical paths to a fully proprietary deployment.

Why AGPL? MCP servers are reachable by network clients (HTTP/SSE transports), and even stdio servers are often proxied over the network by their MCP hosts. AGPL §13 ensures that modifications to a network-reachable instance have their source made available to those users — closing the "SaaS loophole" in plain GPL. GPLv3 §13 explicitly permits combining GPLv3 code (DWSIM) with AGPLv3 code.

DWSIM is licensed under GPLv3. See the DWSIM repository for more information.


Contributing

See CONTRIBUTING.md for development guidelines, code standards, and PR flow.

Acknowledgments

  • DWSIM — open-source chemical process simulation by Daniel Medeiros.
  • CAPE-OPEN — industry interoperability standards for process simulators.
  • Model Context Protocol — by Anthropic.
  • FastMCP — by Jeremiah Lowin.
  • pythonnet — Python ↔ .NET CLR bridge.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About ol-dwsim-mcp-server

How do I install ol-dwsim-mcp-server?

Run uvx ol-dwsim-mcp-server, then add the server to your MCP client's configuration.

Is ol-dwsim-mcp-server safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is ol-dwsim-mcp-server still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.