openEMS electromagnetic FDTD simulation MCP server
  • TypeScript 90.8%
  • CSS 5.3%
  • Shell 2.2%
  • Dockerfile 1.4%
  • HTML 0.3%
Find a file
Erwan Lee Pesle 4223b63f8c
Some checks failed
ci.yml / Merge pull request #8 from vidimus-dev/feat/widget-compose-sync (push) Failing after 0s
Merge pull request #8 from vidimus-dev/feat/widget-compose-sync
feat(ui): add bidirectional @mcpview/compose portSync to widgets
2026-12-05 20:31:42 +08:00
.github/workflows ci: enable vidimus-dev GHCR Docker build (linux/amd64) and migrate toolchain refs 2026-12-05 15:35:31 +08:00
scripts ci: enable vidimus-dev GHCR Docker build (linux/amd64) and migrate toolchain refs 2026-12-05 15:35:31 +08:00
src feat(ui): add bidirectional @mcpview/compose portSync to widgets 2026-12-05 20:28:38 +08:00
tests fix: stat purity, rf-gates table, declared views, locked widget bundle, notices 2026-12-03 13:23:49 +08:00
.dockerignore feat: @casys/mcp-openems 0.1.0 — native openEMS 3D FDTD MCP server 2026-12-03 12:00:35 +08:00
.gitignore feat: @casys/mcp-openems 0.1.0 — native openEMS 3D FDTD MCP server 2026-12-03 12:00:35 +08:00
.release-please-manifest.json chore(ci): adopt superWorldSavior/engineering-toolchain@v1 2026-12-04 11:56:23 +08:00
CHANGELOG.md release: 0.2.1 2026-12-04 10:32:19 +08:00
deno.json release: 0.2.1 2026-12-04 10:32:19 +08:00
deno.lock feat: results viewer MCP App (0.2.0) 2026-12-03 12:34:39 +08:00
Dockerfile feat: @casys/mcp-openems 0.1.0 — native openEMS 3D FDTD MCP server 2026-12-03 12:00:35 +08:00
LICENSE feat: @casys/mcp-openems 0.1.0 — native openEMS 3D FDTD MCP server 2026-12-03 12:00:35 +08:00
mod.ts fix: stat purity, rf-gates table, declared views, locked widget bundle, notices 2026-12-03 13:23:49 +08:00
README.md fix: stat purity, rf-gates table, declared views, locked widget bundle, notices 2026-12-03 13:23:49 +08:00
release-please-config.json chore(ci): adopt superWorldSavior/engineering-toolchain@v1 2026-12-04 11:56:23 +08:00
renovate.json ci: enable vidimus-dev GHCR Docker build (linux/amd64) and migrate toolchain refs 2026-12-05 15:35:31 +08:00
server.ts feat: @casys/mcp-openems 0.1.0 — native openEMS 3D FDTD MCP server 2026-12-03 12:00:35 +08:00
THIRD_PARTY_NOTICES.txt fix: stat purity, rf-gates table, declared views, locked widget bundle, notices 2026-12-03 13:23:49 +08:00

@casys/mcp-openems

Standalone Layer-4 native openEMS (3D FDTD Maxwell Equations) Electromagnetic & Antenna MCP server for Casys Digital Thread, built with @mcpview/server and @mcpview/compose.

Tools & Code Mode Snippets

  • openems_simulate_blade_antenna (snippet: simulate_blade_antenna): 3D FDTD quarter-wave blade monopole antenna on a conductive carbon-fiber fuselage ground plane (S11, VSWR, resonant frequency, 10 dB bandwidth, qualification).
  • openems_simulate_radome_patch (snippet: simulate_radome_patch): 3D FDTD 1575.42 MHz (GPS L1 / Galileo E1) radome transmission / RF-shielding simulation (aramid, fiberglass, carbon) measuring S21 insertion loss and radome qualification.

Docker

docker build -t casys-mcp-openems:local .
docker run -d --name casys-mcp-openems -p 127.0.0.1:3030:3030 casys-mcp-openems:local
curl -s http://127.0.0.1:3030/health

Install

# Deno (JSR)
deno run --allow-read --allow-write --allow-run --allow-env --allow-net jsr:@casys/mcp-openems/server --port=3030
# Node >= 20 (npm)
npx @casys/mcp-openems --port=3030

Both need a local openEMS build with its Python bindings (openEMS, CSXCAD, numpy) on the host; the Docker image above ships one.

Widgets

Results are shown as small, individual MCP App widgets, one reading each, never a dashboard. Each widget is its own ui://mcp-openems/<widget> resource and adapts to the width its host grants (a Compose board snaps its resize handle between supportedWidths; a standalone host gets the widest). They work for both solver results (blade antenna and radome).

Widget (ui://mcp-openems/…) Kind Shows supportedWidths
rf-verdict stat PASS or FAIL with 1 to 3 headline numbers (S11, VSWR, or insertion loss) 280, 380, 520
rf-gates table Each qualification gate: requirement, reported value, pass or fail 320, 440, 600
rf-margin chart Each gated quantity as a marker against its limit (-10 dB, 2, 1.5 dB) 320, 440, 640
rf-case table Solver results, then inputs and numerics of the case, one row per quantity 340, 480, 680

Smallest width: the essential. Middle: the usual reading. Largest: the full detail of that one thing, with a provenance footer (engine, openEMS version, case SHA-256). The solver returns scalars, not the S11 sweep, so no frequency curve is drawn; rf-margin shows the best S11 over the sweep as a second marker at the largest width. The stat stays a verdict plus at most 3 numbers and a provenance line; the gate-by-gate matrix is the rf-gates table. openems_simulate_blade_antenna, openems_simulate_radome_patch and run_snippet advertise rf-verdict by default; a board selects another widget for the same result by resource URI. Every successful run_snippet result also carries _meta["io.mcpview/views"] (name, resourceUri, title, supportedWidths of each widget), so a Code Mode program can show one receipt in several widgets with api.panel(receipt.id, { view: "rf-gates" }). OPENEMS_WIDGETS (exported from mod.ts) lists URIs, kinds and supportedWidths for a board to read:

import { OPENEMS_WIDGETS } from "jsr:@casys/mcp-openems";
// { resourceUri: widget.uri, supportedWidths: widget.supportedWidths }

The qualification limits (ANTENNA_S11_MAX_DB, ANTENNA_VSWR_MAX, RADOME_LOSS_MAX_DB) live in src/qualification.ts; the solver scripts and the widgets both read them.

The widget bundle is reproducible: src/ui/widgets/deno.json pins exact versions with a minimumDependencyAge of one day, src/ui/widgets/deno.lock is committed, and the build runs deno bundle --lock --frozen. Each widget HTML embeds THIRD_PARTY_NOTICES.txt, which also ships in the JSR package and the npm bundle.

Rebuild the bundled HTML (src/ui/dist/<widget>/index.html) with deno task build:ui; deno task check:ui:bundle fails when a committed bundle is stale.