@modudraft/mcp 0.23.3 → 0.24.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/README.md +33 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,12 +90,28 @@ Every MCP tool is listed by default. If that is too much context for your client
|
|
|
90
90
|
| `analysis` | Validate, diff, cross-diagram suggestions, clone | `validate_diagram`, `diff_diagram`, `find_shared_services`, `suggest_connections`, `clone_diagram`, `suggest_architecture` |
|
|
91
91
|
| `project` | Watch a repo for drift, sync a diagram with the repo, generate sequences from the API | `watch_project`, `check_project_drift`, `unwatch_project`, `sync_project`, `generate_sequence_from_api` |
|
|
92
92
|
| `history` | Server version history (snapshots) and the edit log | `snapshot_diagram`, `list_snapshots`, `restore_snapshot`, `get_edit_log` |
|
|
93
|
+
| `security` | Threat model: trust zones, data classes, STRIDE threats, the Markdown report | `get_security_view`, `suggest_threats`, `add_threat`, `update_threat`, `delete_threat`, `set_trust_zone`, `set_data_class`, `export_threat_model` |
|
|
93
94
|
|
|
94
95
|
- `MODUDRAFT_TOOLSETS="core"` lists the core tools only; `"sequences,api"` lists core plus those groups; `"all"` (or unset) lists everything.
|
|
95
96
|
- A value made only of unknown names keeps the default (everything) and prints a warning on stderr.
|
|
96
97
|
- `load_toolset(name)` adds a group at runtime and sends a tools-changed notification. If your client doesn't refresh tools after `load_toolset`, set `MODUDRAFT_TOOLSETS` instead.
|
|
97
98
|
- Calling any tool by name always works, even when it isn't listed: the server loads its group and runs it.
|
|
98
99
|
|
|
100
|
+
### Upgrading to 0.24.0
|
|
101
|
+
|
|
102
|
+
- New `security` toolset for threat modeling the Architecture tab (file format 2.12.0). Deploy the web app and API first: a diagram with threats needs a web app that reads file format 2.12.0.
|
|
103
|
+
- `set_trust_zone` sets a boundary's trust zone (`internet`, `dmz`, `internal`, `restricted`, `third-party`). Items inside take its zone.
|
|
104
|
+
- `set_data_class` sets the data class (`public`, `internal`, `pii`, `credentials`, `payment`) of an arrow or a data store, plus `encrypted` (arrows, in transit) or `encrypted_at_rest` (data stores). These fields are set only here; `update_edge` and `update_node` are unchanged.
|
|
105
|
+
- `get_security_view` returns the zones, each component's tool, archetype and zone, each arrow's protocol, data class and encryption, and the threats.
|
|
106
|
+
- `suggest_threats` runs the same STRIDE rules as the web app's "Suggest threats" and adds the new suggestions. Running it again never adds a duplicate and never brings back a threat marked `not-applicable`.
|
|
107
|
+
- `add_threat`, `update_threat` and `delete_threat` edit the threat list. Threats the agent adds are marked `source: agent`.
|
|
108
|
+
- `export_threat_model` returns the Markdown report, or writes it to a `.md` file under your project folders with `path`.
|
|
109
|
+
- The workflow the tools describe: set zones and data classes, run `suggest_threats`, call `get_security_view` and add threats specific to each component's tool and archetype (the rules are generic and don't know a technology's own weaknesses), then review each suggestion and fill in mitigations and owners, and export the report.
|
|
110
|
+
- Threat edits are sent as targeted threat ops, so they don't overwrite concurrent canvas edits in the web app.
|
|
111
|
+
- `clone_diagram` now points a cloned diagram's threats at the cloned items. Clients below 0.24.0 keep threats on their writes, but their `clone_diagram` copies threats with the original target ids, so the copy's threats show "target removed". Upgrade before cloning a diagram that has a threat model.
|
|
112
|
+
- Threat text is capped: title 200 characters, description and mitigation 2000, owner 100. `add_threat` and `update_threat` refuse longer text with a message naming the field.
|
|
113
|
+
- With more than one Architecture tab, the first tab that gets a threat holds the model; the web app, the report and these tools all follow it.
|
|
114
|
+
|
|
99
115
|
### Upgrading to 0.23.3
|
|
100
116
|
|
|
101
117
|
- The "MODUDRAFT_API_KEY is not set" message now links to the same API keys page as the expired and revoked key messages (`/account?section=api-keys`) instead of `/dashboard`.
|
|
@@ -158,7 +174,7 @@ Every MCP tool is listed by default. If that is too much context for your client
|
|
|
158
174
|
Besides tools, the server offers MCP resources and prompts, for clients that support them.
|
|
159
175
|
|
|
160
176
|
- **Resources:** each diagram is readable as plain-text line art at `modudraft://diagram/<id>` (the architecture tab, the same output as `render_diagram_text`). `resources/list` returns your 50 most recently edited diagrams; any diagram id you can reach can be read by URI.
|
|
161
|
-
- **Prompts:** `map_repo` (optional `path`) scans a repository and imports what it finds; `check_drift` (`diagram_id`) checks a diagram against the project code; `review_diagram` (`diagram_id`) validates a diagram and lists its issues. Each is one message that names the toolset to load.
|
|
177
|
+
- **Prompts:** `map_repo` (optional `path`) scans a repository and imports what it finds; `check_drift` (`diagram_id`) checks a diagram against the project code; `review_diagram` (`diagram_id`) validates a diagram and lists its issues; `threat_model` (`diagram_id`) builds a STRIDE threat model and exports the report. Each is one message that names the toolset to load.
|
|
162
178
|
|
|
163
179
|
### Upgrading to 0.17.0
|
|
164
180
|
|
|
@@ -368,6 +384,22 @@ The old `request_body`, `request_format`, `body`, `body_format` and top-level `r
|
|
|
368
384
|
| `get_org_context` | Get cached org context - existing tools, protocols, naming patterns |
|
|
369
385
|
| `refresh_org_context` | Force a refresh of the org context cache |
|
|
370
386
|
|
|
387
|
+
### Threat model
|
|
388
|
+
*(toolset: `security`)*
|
|
389
|
+
|
|
390
|
+
Threats live on the Architecture tab (one threat model per diagram). Run `suggest_threats` first, then add threats specific to each component's tool and archetype, then fill in mitigations.
|
|
391
|
+
|
|
392
|
+
| Tool | Description |
|
|
393
|
+
|---|---|
|
|
394
|
+
| `get_security_view` | Boundaries with their trust zones; each component's tool, archetype, effective zone and (data stores) data class and encryption at rest; each arrow's protocol, data class and encryption in transit; the threats (`targetRemoved: true` when the item was deleted) |
|
|
395
|
+
| `suggest_threats` | Run the Modudraft STRIDE rules and add the new suggestions (status `suggested`). Returns the count and titles. Safe to re-run: no duplicates, and a `not-applicable` threat never comes back |
|
|
396
|
+
| `add_threat` | Add a threat (`source: agent`): `title`, `stride` (S T R I D E), `target` (`{ kind: "node" \| "edge" \| "boundary" \| "diagram", id }`), optional `severity`, `status`, `description`, `mitigation`, `owner` |
|
|
397
|
+
| `update_threat` | Change any field of a threat; an empty string clears `description`, `mitigation` or `owner` |
|
|
398
|
+
| `delete_threat` | Delete a threat (for a rule suggestion that doesn't apply, prefer status `not-applicable`) |
|
|
399
|
+
| `set_trust_zone` | Set or clear a boundary's trust zone: `internet`, `dmz`, `internal`, `restricted`, `third-party` |
|
|
400
|
+
| `set_data_class` | Set `data_class` on an arrow or a data store, plus `encrypted` (arrows) or `encrypted_at_rest` (data stores) |
|
|
401
|
+
| `export_threat_model` | The Markdown threat-model report (same as the web app's download), or write it to a `.md` file with `path` |
|
|
402
|
+
|
|
371
403
|
---
|
|
372
404
|
|
|
373
405
|
## Example prompts
|