@casys/mcp-sysml-toolkit 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +74 -2
- package/mcp-sysml-toolkit.mjs +58570 -0
- package/package.json +10 -4
- package/ui-dist/architecture-tree/index.html +541 -0
- package/ui-dist/impact-graph/index.html +541 -0
- package/ui-dist/sysml-verdict/index.html +541 -0
- package/ui-dist/z3-constraints/index.html +541 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Casys
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@casys/mcp-sysml-toolkit`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Standalone Level-2 `@mcpview` MCP server wrapping **`sysml-toolkit`** (`sysmlv2` CLI + **Z3** SMT
|
|
4
|
+
solver) as a deterministic Layer-4 SysML v2 compiler, formal constraint verifier, parameter
|
|
5
|
+
evaluator, and change-impact engine — with **4 native interactive `@mcpview` widgets** inspired by
|
|
6
|
+
SysON viewers, with zero Java/Eclipse SysON or Postgres dependency.
|
|
7
|
+
|
|
8
|
+
## Capabilities
|
|
9
|
+
|
|
10
|
+
- **Deterministic SysML v2 compilation & Z3 formal verification**: runs
|
|
11
|
+
`sysmlv2 check --format json`, `convert --to compact-json`, `eval`, and `verify --solve` (Z3) in
|
|
12
|
+
isolated temp workspaces with strict timeouts and SHA-256 source/snapshot provenance.
|
|
13
|
+
- **Zero-hallucination contract states**: always reports literal `valid` / `invalid` /
|
|
14
|
+
`unavailable`, literal `satisfied` / `violated` / `undecided` / `error` per constraint, and
|
|
15
|
+
literal provenance (`verified-solver` only when Z3 actually ran; `deterministic-analysis`
|
|
16
|
+
otherwise).
|
|
17
|
+
- **Direct parameter handoff for Code Mode chains**: `read_params` returns exact typed attribute
|
|
18
|
+
values keyed by name so downstream CAD, FEA, FMI, and MDO snippets read directly from `.sysml`
|
|
19
|
+
without duplicating constants.
|
|
20
|
+
- **AST-driven dependency & change-impact analysis**: extracts `FeatureReferenceExpression` links
|
|
21
|
+
and `PartUsage` composition edges to trace modified attributes across derived attributes,
|
|
22
|
+
constraints, parent composite parts, and downstream solver domains.
|
|
23
|
+
- **4 native `@mcpview` widgets**
|
|
24
|
+
(`ui://mcp-sysml-toolkit/{sysml-verdict,architecture-tree,z3-constraints,impact-graph}`) with full
|
|
25
|
+
`part.selected` ↔ `part.focus` and `requirement.selected` ↔ `requirement.focus` Compose Board
|
|
26
|
+
synchronization.
|
|
27
|
+
|
|
28
|
+
## Tools & Level-2 Code Mode Snippets
|
|
29
|
+
|
|
30
|
+
| MCP Tool | Code Mode Snippet | Role |
|
|
31
|
+
| ------------------------ | ------------------ | ------------------------------------------------------------------- |
|
|
32
|
+
| `sysml_check_and_verify` | `check_and_verify` | Compile, inspect architecture, verify with Z3, optional diff/impact |
|
|
33
|
+
| `sysml_read_params` | `read_params` | Evaluate & return exact typed attribute values keyed by name |
|
|
34
|
+
| `sysml_eval_model` | `eval_model` | Evaluate SysML v2 features & ad-hoc KerML query expressions |
|
|
35
|
+
| `sysml_analyze_impact` | `analyze_impact` | Traverse dependency graph from `changed_attributes` |
|
|
36
|
+
|
|
37
|
+
## Native Widgets (`ui://mcp-sysml-toolkit/*`)
|
|
38
|
+
|
|
39
|
+
| Widget URI | Kind | Emits | Accepts |
|
|
40
|
+
| ------------------------------------------ | ----- | --------------------------------------- | --------------------------------- |
|
|
41
|
+
| `ui://mcp-sysml-toolkit/sysml-verdict` | stat | `part.selected`, `requirement.selected` | `part.focus`, `requirement.focus` |
|
|
42
|
+
| `ui://mcp-sysml-toolkit/architecture-tree` | chart | `part.selected`, `requirement.selected` | `part.focus` |
|
|
43
|
+
| `ui://mcp-sysml-toolkit/z3-constraints` | table | `requirement.selected`, `part.selected` | `requirement.focus`, `part.focus` |
|
|
44
|
+
| `ui://mcp-sysml-toolkit/impact-graph` | chart | `part.selected`, `requirement.selected` | `part.focus`, `requirement.focus` |
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
| Variable | Purpose |
|
|
49
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| `SYSMLV2_BIN` | Path to `sysmlv2` binary (also auto-discovers `PATH`, `~/.cargo/bin/sysmlv2`, or sibling `../sysml-toolkit/target/{release,debug}/sysmlv2`) |
|
|
51
|
+
| `SYSMLV2_LIB_DIR` | Path to OMG `sysml.library` directory or bundle (optional) |
|
|
52
|
+
| `Z3_BIN` | Path to `z3` binary (also auto-discovers `PATH` and `/opt/homebrew/bin/z3`) |
|
|
53
|
+
| `HOST`, `PORT` | HTTP bind address (default `127.0.0.1:3035`) |
|
|
54
|
+
| `MCP_BEARER_TOKEN` | Optional static Bearer token enforced on `POST /mcp` |
|
|
55
|
+
|
|
56
|
+
## Quick start
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
deno task build:ui
|
|
60
|
+
deno task ci:check
|
|
61
|
+
deno task serve # http://127.0.0.1:3035/mcp
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Docker (`casys-mcp-sysml-toolkit`)
|
|
65
|
+
|
|
66
|
+
The provided `Dockerfile` ships `denoland/deno:2.9.6` + `z3` on port `3035`. Mount a Linux `sysmlv2`
|
|
67
|
+
binary (and optional OMG `sysml.library`) under `/opt/sysml`:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
docker build -t casys-mcp-sysml-toolkit .
|
|
71
|
+
docker run --rm -p 3035:3035 \
|
|
72
|
+
-v /path/to/linux/sysmlv2:/opt/sysml/sysmlv2:ro \
|
|
73
|
+
-v /path/to/sysml.library:/opt/sysml/sysml.library:ro \
|
|
74
|
+
casys-mcp-sysml-toolkit
|
|
75
|
+
```
|