- TypeScript 90.8%
- CSS 5.3%
- Shell 2.2%
- Dockerfile 1.4%
- HTML 0.3%
|
Some checks failed
ci.yml / Merge pull request #8 from vidimus-dev/feat/widget-compose-sync (push) Failing after 0s
feat(ui): add bidirectional @mcpview/compose portSync to widgets |
||
|---|---|---|
| .github/workflows | ||
| scripts | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| .release-please-manifest.json | ||
| CHANGELOG.md | ||
| deno.json | ||
| deno.lock | ||
| Dockerfile | ||
| LICENSE | ||
| mod.ts | ||
| README.md | ||
| release-please-config.json | ||
| renovate.json | ||
| server.ts | ||
| THIRD_PARTY_NOTICES.txt | ||
@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 FDTD1575.42 MHz(GPS L1 / Galileo E1) radome transmission / RF-shielding simulation (aramid,fiberglass,carbon) measuringS21insertion 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.