OpenModelica physical systems simulation MCP server
  • TypeScript 97.8%
  • JavaScript 1%
  • Dockerfile 0.4%
  • Modelica 0.3%
  • Shell 0.3%
  • Other 0.2%
Find a file
Erwan Lee Pesle bad80622da
Some checks failed
Check / deno (push) Waiting to run
Check / openmodelica-amd64 (push) Waiting to run
Check / openmodelica-arm64 (push) Waiting to run
docker.yml / Merge pull request #12 from vidimus-dev/feat/level2-code-mode-snippets (push) Failing after 0s
Merge pull request #12 from vidimus-dev/feat/level2-code-mode-snippets
feat(code-mode): harmonize mcp-modelica to Level-2 @mcpview/compose snippets
2026-12-05 17:49:21 +08:00
.github/workflows ci: add vidimus-dev GHCR Docker workflow and migrate namespace refs 2026-12-05 15:35:42 +08:00
docs Merge remote-tracking branch 'origin/main' into codex/modelica-runtime-4-20260908 2026-09-08 11:43:41 +08:00
models feat: add resumable Modelica evidence lifecycle 2026-08-11 22:21:06 +08:00
scenarios feat: add resumable Modelica evidence lifecycle 2026-08-11 22:21:06 +08:00
scripts Migrate Modelica image publication and verification to personal GHCR [skip ci] 2026-10-05 23:01:08 +08:00
src feat(code-mode): upgrade to @mcpview/server and add Level-2 snippets 2026-12-05 17:47:29 +08:00
tests feat(code-mode): upgrade to @mcpview/server and add Level-2 snippets 2026-12-05 17:47:29 +08:00
.dockerignore feat(viewer): adopt compact MCP View v2 surfaces 2026-08-31 19:02:46 +08:00
.gitignore fix(release): keep audited view checkout clean 2026-08-31 23:51:55 +08:00
CHANGELOG.md chore(release): prepare 0.6.5 2026-09-08 11:48:33 +08:00
CITATION.cff chore(release): prepare 0.6.5 2026-09-08 11:48:33 +08:00
deno.json feat(code-mode): upgrade to @mcpview/server and add Level-2 snippets 2026-12-05 17:47:29 +08:00
deno.lock feat(code-mode): upgrade to @mcpview/server and add Level-2 snippets 2026-12-05 17:47:29 +08:00
Dockerfile chore: pin Deno runtime to 2.9.6 2026-08-29 00:15:56 +08:00
LICENSE feat: add approved CoffeeMachine Modelica MCP 2026-07-30 19:27:49 +08:00
mod.ts feat: attest qualified Modelica runtime execution 2026-09-08 11:37:39 +08:00
README.md ci: add vidimus-dev GHCR Docker workflow and migrate namespace refs 2026-12-05 15:35:42 +08:00
SECURITY.md fix: embed qualified kit assets for JSR 2026-08-25 00:52:29 +08:00
server.ts feat(code-mode): upgrade to @mcpview/server and add Level-2 snippets 2026-12-05 17:47:29 +08:00

@casys/mcp-modelica

JSR CI License: MIT

A bounded Modelica provider for approved simulation kits, exact run evidence, and small MCP App views. It runs OpenModelica; it does not accept arbitrary source, scripts, commands, or paths.

Recorded MCS01 Modelica execution in the MCP App viewer

This is the shipped viewer rendering the recorded MCS01 SliderMotion capture—not a mock dashboard. The App keeps exited · 0, ready-for-review, and the recorded publication/cleanup states literal; it does not turn execution into a pass, proof, or requirement verdict.

approved kit + bounded parameters
              ↓
        OpenModelica run
              ↓
     sealed hashes + artifacts
              ↓
       one focused MCP view

What it provides

  • Qualified CoffeeMachine and LinearThermalRamp kits with reviewed parameters and scenarios.
  • Streamable HTTP and native stdio MCP transports.
  • Immutable run ledgers, exact text resources, resumable requests, and bounded CSV summaries.
  • Separate run and run-list MCP Apps built from the shared MCP View component kit.
  • A strict adapter for recorded Digital Thread modelica-admitted-execution-capture/2.0 sessions.

succeeded means OpenModelica produced a result. Engineering judgement belongs to a separate constraint or requirement evaluator.

Run it

The container includes OpenModelica 1.27.0, Modelica Standard Library 4.1.0, and Deno 2.9.6:

mkdir -p modelica-runs
docker run --rm --name mcp-modelica \
  --publish 127.0.0.1:3016:3016 \
  --volume "$PWD/modelica-runs:/runs" \
  ghcr.io/vidimus-dev/mcp-modelica@${MODELICA_IMAGE_DIGEST:?set from verified evidence}

Connect a Streamable HTTP MCP client to http://127.0.0.1:3016/mcp; the process health probe is http://127.0.0.1:3016/health. After the paired GHCR image publication has succeeded, resolve the immutable GHCR index digest for ghcr.io/vidimus-dev/mcp-modelica:0.6.5 and set MODELICA_IMAGE_DIGEST from that verified evidence. Deploy that digest rather than the mutable tag.

With the same OpenModelica/MSL runtime already installed, JSR can launch either transport:

deno run -A jsr:@casys/mcp-modelica@0.6.5/server --port=3016
deno run -A jsr:@casys/mcp-modelica@0.6.5/server --stdio

First useful call

Discover the qualified model, scenario, units, defaults, and bounds with modelica_kit_list_recorded, then submit only reviewed overrides:

{
  "model_id": "coffee-machine-v1",
  "scenario_id": "heat-up-nominal",
  "parameter_overrides": {
    "heater_power": { "value": 1500, "unit": "W" },
    "initial_water_temperature": { "value": 20, "unit": "degC" }
  },
  "timeout_ms": 30000
}

Use the resumable manifest → template → submit flow when the caller needs a durable request id and crash-safe readback. Exact tool and envelope compatibility is documented in Contracts and evidence.

Viewer model

The package ships self-contained run and run-list HTML resources. The default run surface is one compact semantic object; metrics, parameters, provenance, artifacts, and warnings remain available as App-owned components for a composing host.

Recorded sessions are read-only projections. A whiteboard host supplies the exact session after the MCP Apps handshake and grants no provider or solver authority. See Recorded viewer sessions for the manifest, schemas, MCS01 identity, component catalog, and literal unavailable states.

Evidence boundary

  • Every persisted artifact is read back and checked against its recorded byte length and SHA-256.
  • Source, scenario projection, compiler schema, generated script, diagnostics, CSV, and evidence identities stay distinct.
  • Missing, changed, ambiguous, or noncanonical evidence fails closed.
  • A hash or successful process exit is not a physical requirement verdict.

The provider/runtime boundary, qualified kits, resource URIs, storage limits, and Digital Thread relationship live in Provider and runtime.

Development

deno task check
deno task fmt
deno task lint
deno task test

Viewer rebuilding, real OpenModelica gates, generated assets, the documentation capture, and release workflows are in Development and release.

Documentation

Guide Contents
Contracts and evidence Frozen, recorded, resumable, error, resource, and digest contracts
Recorded viewer sessions MCP App identity, sessions, MCS01 capture, components, and host rules
Provider and runtime Qualified kits, isolation, storage, container, and product boundary
Development and release Checkout, UI build, real OMC verification, capture, and publishing
Changelog Release history
Security policy Vulnerability reporting

MIT licensed. Citation metadata is available in CITATION.cff.