Skip to main content
A

dsh-aspen-plugin

alizen37/dsh-aspen-plugin

Open an Aspen Plus V14 case, run the simulation, read and write flowsheet tree nodes, list streams and blocks, and save the result. Contributes an MCP server with 8 tools (aspen_status, aspen_open_case, aspen_run, aspen_get, aspen_set, aspen_list, aspen_save, aspen_close) through ctx.mcpManager.register(). Windows only; needs a local Aspen Plus V14 install and its Sentinel license service.

Install

dsh plugin --profile web add github:alizen37/dsh-aspen-plugin

README

dsh-aspen-plugin

Drive Aspen Plus V14 from DeepSeek Harness. The plugin contributes one MCP server through the host's MCP manager and exposes eight tools:

ToolPurpose
aspen_statusLocate aspenplus.exe, report pywin32/COM availability and whether a document is open
aspen_open_caseOpen a .bkp case, optionally run it
aspen_runRun the current simulation and report convergence
aspen_getRead one or more flowsheet tree paths (\Data\Streams\1\Output\RES_TEMP)
aspen_setWrite a tree node (block inputs are writable; stream inputs are restricted on this build)
aspen_listList child nodes of a tree path, optionally with values
aspen_saveSave the open document
aspen_closeClose the document

How it registers (official path)

index.js is a cordis plugin:

export const name = 'dsh-aspen-plugin'
export const inject = ['mcpManager']

export function apply(ctx) {
  ctx.mcpManager.register('aspen', { transport: 'stdio', command: <python>, args: [...], cwd: <plugin dir> })
}

The bundle patch cordis.patch.yml only mounts the plugin:

- insert:
    - id: dsh-aspen-plugin
      name: 'dsh-aspen-plugin'

Do not add a row naming @deepseek-ai/dsh-mcp-client: that legacy form resolves the client from the profile's node_modules, where an older copy can lack its @deepseek-ai/dsh-* peers, and the loader drops the row silently.

All paths (interpreter, server script, cwd) are derived from import.meta.url, so the package is machine-independent. DSH_ASPEN_PYTHON overrides the interpreter.

Install

Copy the package into <DSH_HOME>/profiles/<profile>/node_modules/dsh-aspen-plugin, list it in that profile's package.json under dependencies and dsh.profile.bundles, then restart DSH. Tools appear as mcp__aspen__*.

Install from the tarball

tar -xzf dsh-aspen-plugin-0.1.0.tgz
cp -r package/* <DSH_HOME>/profiles/<profile>/node_modules/dsh-aspen-plugin/

Then add the package to that profile's package.json under dependencies and dsh.profile.bundles, and restart DSH. (npm/pnpm can also consume the tarball with npm install <path-to-tgz> when installing into a fresh profile.)

Permissions and prerequisites

  • Aspen Plus V14 installed with a working Sentinel RMS licence (the licence service must be running).
  • A logged-in, unlocked desktop session: Aspen is a GUI application and its COM server needs a window station.
  • The host process (not a sandboxed shell) must be able to start aspenplus.exe. Starting Aspen inside a workspace-write file sandbox fails with CO_E_SERVER_EXEC_FAILURE (0x80080005).
  • The Python dependencies (pywin32, comtypes) are vendored under deps/ and loaded via sys.path + os.add_dll_directory; the bundled DSH Python works as-is.

Known limitation

On this installation, stream input nodes reject writes with AE_UNDERSPEC through COM (VASetValue), while block inputs write normally. Work around it by authoring the case in Aspen or by writing block-level specifications.

Licence

MIT.

Related plugins