@modudraft/mcp 0.19.0 → 0.20.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 +13 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ Every MCP tool is listed by default. If that is too much context for your client
|
|
|
88
88
|
| `import` | Read and scan the repo, import files, apply env values | `read_file`, `scan_project`, `import_file`, `import_directory`, `apply_env_to_nodes` |
|
|
89
89
|
| `export` | Mermaid, PlantUML, draw.io, Terraform, K8s, write files, generate docs and runbooks | `export_mermaid`, `export_plantuml`, `export_drawio`, `export_terraform`, `export_k8s_yaml`, `export_to_file`, `generate_docs`, `generate_runbook` |
|
|
90
90
|
| `analysis` | Validate, diff, cross-diagram suggestions, clone | `validate_diagram`, `diff_diagram`, `find_shared_services`, `suggest_connections`, `clone_diagram`, `suggest_architecture` |
|
|
91
|
-
| `project` | Watch a repo for drift, generate sequences from the API | `watch_project`, `check_project_drift`, `unwatch_project`, `generate_sequence_from_api` |
|
|
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
93
|
|
|
94
94
|
- `MODUDRAFT_TOOLSETS="core"` lists the core tools only; `"sequences,api"` lists core plus those groups; `"all"` (or unset) lists everything.
|
|
@@ -96,6 +96,10 @@ Every MCP tool is listed by default. If that is too much context for your client
|
|
|
96
96
|
- `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
97
|
- Calling any tool by name always works, even when it isn't listed: the server loads its group and runs it.
|
|
98
98
|
|
|
99
|
+
### Upgrading to 0.20.0
|
|
100
|
+
|
|
101
|
+
- Adds the `sync_project` tool and the `modudraft-mcp check` command. Nothing is removed. See [Repo sync and CI drift check](#repo-sync-and-ci-drift-check).
|
|
102
|
+
|
|
99
103
|
### Upgrading to 0.19.0
|
|
100
104
|
|
|
101
105
|
- Snapshots are now server versions. `snapshot_diagram` saves a named version in the diagram's Version history (visible to teammates in the web app), `list_snapshots` lists the versions, and `restore_snapshot` restores one (`snapshot_id` is a version id or a version number). Parameter names are unchanged. The restore is saved as a new version and the state before it stays in the history (the previous version), so it can be undone.
|
|
@@ -403,6 +407,14 @@ Items from other files are never touched. Existing items without import history
|
|
|
403
407
|
|
|
404
408
|
`check_project_drift` only reports; it no longer consumes the drift. Drift stays reported until you pass `acknowledge: true`. Re-importing a modified file with `import_file` also clears it for that file; a new file stays reported as added until you acknowledge. A truncated scan (too many files) is flagged in the result.
|
|
405
409
|
|
|
410
|
+
## Repo sync and CI drift check
|
|
411
|
+
|
|
412
|
+
`sync_project` compares the files in your repo with a diagram and brings the diagram up to date. It previews by default; the same engine powers the `check` command and the GitHub Action, so CI can tell you when the diagram has drifted from the code.
|
|
413
|
+
|
|
414
|
+
**CI drift check.** The same engine powers `npx @modudraft/mcp check` and the `modudraft/drift-check` GitHub Action, which compare docker-compose, Kubernetes, Terraform, OpenAPI, Prisma, SQL and more with a diagram on every pull request (exit `0` in sync, `1` drift with `--on-drift fail`, `2` error). A file that fails to parse is reported and removes nothing. Supported files, `modudraft.json`, flags, keys and example workflows: https://modudraft.com/docs/ci
|
|
415
|
+
|
|
416
|
+
**`sync_project`** inputs: `diagram_id`, `dir`, `files`, `dry_run` (default `true`), `remove_missing`, `write_config`. With `dry_run: false` it writes once through the normal save path, so the change is recorded in version history (it may merge with an earlier version from the same key within 10 minutes). Applying is refused when the sources came only from a scan. `write_config: true` writes `modudraft.json` (also during a preview), keeps existing entries, writes `{ path, node }` when a node was used, and skips files that errored. With no diagram id and no config the tool answers: "Pass diagram_id, or add modudraft.json (sync_project with write_config: true)".
|
|
417
|
+
|
|
406
418
|
## Workspaces and local files
|
|
407
419
|
|
|
408
420
|
`list_diagrams`, `search_diagrams` and `get_org_context` cover every workspace you belong to; `create_diagram` and `clone_diagram` accept `workspace_id`. The API lists at most 500 diagrams (newest first); when `list_diagrams` hits that cap it returns `{ diagrams, truncated: true, note }`.
|