@radicaltools/mcp 0.1.1 → 0.3.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.
Files changed (161) hide show
  1. package/README.md +52 -26
  2. package/dist/chunk-Z7THA3L5.js +3200 -0
  3. package/dist/elkLayout-TAUBPPVN.js +8 -0
  4. package/dist/hub-catalogue/concern/concern-api-evolution.radical +935 -0
  5. package/dist/hub-catalogue/concern/concern-architecture-style.radical +1112 -0
  6. package/dist/hub-catalogue/concern/concern-authentication.radical +685 -0
  7. package/dist/hub-catalogue/concern/concern-authorization.radical +1464 -0
  8. package/dist/hub-catalogue/concern/concern-availability.radical +804 -0
  9. package/dist/hub-catalogue/concern/concern-backend-stack.radical +1118 -0
  10. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1304 -0
  11. package/dist/hub-catalogue/concern/concern-capacity.radical +802 -0
  12. package/dist/hub-catalogue/concern/concern-communication-style.radical +1202 -0
  13. package/dist/hub-catalogue/concern/concern-data-consistency.radical +1081 -0
  14. package/dist/hub-catalogue/concern/concern-data-store.radical +960 -0
  15. package/dist/hub-catalogue/concern/concern-decomposition.radical +1143 -0
  16. package/dist/hub-catalogue/concern/concern-deployment.radical +952 -0
  17. package/dist/hub-catalogue/concern/concern-encryption.radical +1055 -0
  18. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1340 -0
  19. package/dist/hub-catalogue/concern/concern-infrastructure.radical +1151 -0
  20. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1079 -0
  21. package/dist/hub-catalogue/concern/concern-messaging.radical +940 -0
  22. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +864 -0
  23. package/dist/hub-catalogue/concern/concern-observability.radical +1048 -0
  24. package/dist/hub-catalogue/concern/concern-personal-data.radical +1434 -0
  25. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1153 -0
  26. package/dist/hub-catalogue/concern/concern-secrets.radical +1026 -0
  27. package/dist/hub-catalogue/concern/concern-supply-chain.radical +1312 -0
  28. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1306 -0
  29. package/dist/hub-catalogue/concern/concern-test-strategy.radical +1193 -0
  30. package/dist/index.js +22690 -6064
  31. package/package.json +1 -1
  32. package/dist/chunk-KI4NVSTU.js +0 -1763
  33. package/dist/elkLayout-WC6AXWOG.js +0 -185
  34. package/dist/hub-catalogue/adr/adr-api-versioning.radical +0 -53
  35. package/dist/hub-catalogue/adr/adr-auth-strategy.radical +0 -53
  36. package/dist/hub-catalogue/adr/adr-caching-strategy.radical +0 -59
  37. package/dist/hub-catalogue/adr/adr-data-consistency-model.radical +0 -40
  38. package/dist/hub-catalogue/adr/adr-data-store.radical +0 -47
  39. package/dist/hub-catalogue/adr/adr-deployment-strategy.radical +0 -53
  40. package/dist/hub-catalogue/adr/adr-event-schema-evolution.radical +0 -53
  41. package/dist/hub-catalogue/adr/adr-integration-style.radical +0 -50
  42. package/dist/hub-catalogue/adr/adr-ledger-reconciliation-strategy.radical +0 -38
  43. package/dist/hub-catalogue/adr/adr-llm-provider-strategy.radical +0 -40
  44. package/dist/hub-catalogue/adr/adr-marketplace-payments-model.radical +0 -39
  45. package/dist/hub-catalogue/adr/adr-multi-region.radical +0 -60
  46. package/dist/hub-catalogue/adr/adr-multi-tenancy-strategy.radical +0 -41
  47. package/dist/hub-catalogue/adr/adr-observability.radical +0 -59
  48. package/dist/hub-catalogue/adr/adr-realtime-transport.radical +0 -38
  49. package/dist/hub-catalogue/adr/adr-tech-stack.radical +0 -45
  50. package/dist/hub-catalogue/adr/adr-zero-trust-network.radical +0 -40
  51. package/dist/hub-catalogue/blueprint/bp-ai-assistant-platform.radical +0 -1641
  52. package/dist/hub-catalogue/blueprint/bp-analytical-data-platform.radical +0 -1428
  53. package/dist/hub-catalogue/blueprint/bp-ecommerce-platform.radical +0 -1989
  54. package/dist/hub-catalogue/blueprint/bp-fintech-ledger-platform.radical +0 -1701
  55. package/dist/hub-catalogue/blueprint/bp-marketplace-platform.radical +0 -1792
  56. package/dist/hub-catalogue/blueprint/bp-realtime-collaboration.radical +0 -1421
  57. package/dist/hub-catalogue/blueprint/bp-saas-b2b-platform.radical +0 -1713
  58. package/dist/hub-catalogue/fitness-function/ff-accessibility-scan.radical +0 -34
  59. package/dist/hub-catalogue/fitness-function/ff-ai-eval-gate.radical +0 -52
  60. package/dist/hub-catalogue/fitness-function/ff-api-contract.radical +0 -36
  61. package/dist/hub-catalogue/fitness-function/ff-capacity-load-test.radical +0 -67
  62. package/dist/hub-catalogue/fitness-function/ff-carbon-footprint-guard.radical +0 -62
  63. package/dist/hub-catalogue/fitness-function/ff-change-failure-rate.radical +0 -45
  64. package/dist/hub-catalogue/fitness-function/ff-chaos-resilience-test.radical +0 -53
  65. package/dist/hub-catalogue/fitness-function/ff-cost-efficiency-guard.radical +0 -64
  66. package/dist/hub-catalogue/fitness-function/ff-coupling-guard.radical +0 -45
  67. package/dist/hub-catalogue/fitness-function/ff-data-integrity-check.radical +0 -51
  68. package/dist/hub-catalogue/fitness-function/ff-data-residency.radical +0 -43
  69. package/dist/hub-catalogue/fitness-function/ff-dependency-rules.radical +0 -37
  70. package/dist/hub-catalogue/fitness-function/ff-deploy-frequency.radical +0 -46
  71. package/dist/hub-catalogue/fitness-function/ff-dr-drill-success.radical +0 -52
  72. package/dist/hub-catalogue/fitness-function/ff-duplication-guard.radical +0 -53
  73. package/dist/hub-catalogue/fitness-function/ff-error-budget.radical +0 -59
  74. package/dist/hub-catalogue/fitness-function/ff-fail-safe-verification.radical +0 -34
  75. package/dist/hub-catalogue/fitness-function/ff-infra-drift.radical +0 -34
  76. package/dist/hub-catalogue/fitness-function/ff-latency-slo.radical +0 -59
  77. package/dist/hub-catalogue/fitness-function/ff-lead-time.radical +0 -44
  78. package/dist/hub-catalogue/fitness-function/ff-ledger-balance-integrity.radical +0 -45
  79. package/dist/hub-catalogue/fitness-function/ff-license-compliance.radical +0 -43
  80. package/dist/hub-catalogue/fitness-function/ff-mttr.radical +0 -45
  81. package/dist/hub-catalogue/fitness-function/ff-noisy-neighbor-guard.radical +0 -66
  82. package/dist/hub-catalogue/fitness-function/ff-sast-scan.radical +0 -35
  83. package/dist/hub-catalogue/fitness-function/ff-scale-out-verification.radical +0 -66
  84. package/dist/hub-catalogue/fitness-function/ff-security-scan.radical +0 -45
  85. package/dist/hub-catalogue/fitness-function/ff-startup-shutdown-check.radical +0 -66
  86. package/dist/hub-catalogue/fitness-function/ff-sync-convergence-test.radical +0 -45
  87. package/dist/hub-catalogue/fitness-function/ff-test-coverage.radical +0 -43
  88. package/dist/hub-catalogue/fitness-function/ff-web-vitals.radical +0 -57
  89. package/dist/hub-catalogue/pattern/pattern-anti-corruption-layer.radical +0 -88
  90. package/dist/hub-catalogue/pattern/pattern-api-gateway.radical +0 -168
  91. package/dist/hub-catalogue/pattern/pattern-bff.radical +0 -179
  92. package/dist/hub-catalogue/pattern/pattern-bulkhead.radical +0 -114
  93. package/dist/hub-catalogue/pattern/pattern-circuit-breaker.radical +0 -219
  94. package/dist/hub-catalogue/pattern/pattern-cqrs.radical +0 -195
  95. package/dist/hub-catalogue/pattern/pattern-crdt-sync.radical +0 -200
  96. package/dist/hub-catalogue/pattern/pattern-event-driven.radical +0 -210
  97. package/dist/hub-catalogue/pattern/pattern-event-sourced-ledger.radical +0 -211
  98. package/dist/hub-catalogue/pattern/pattern-hexagonal.radical +0 -196
  99. package/dist/hub-catalogue/pattern/pattern-microservices.radical +0 -262
  100. package/dist/hub-catalogue/pattern/pattern-rag-pipeline.radical +0 -213
  101. package/dist/hub-catalogue/pattern/pattern-rate-limiter.radical +0 -114
  102. package/dist/hub-catalogue/pattern/pattern-saga.radical +0 -208
  103. package/dist/hub-catalogue/pattern/pattern-sidecar.radical +0 -123
  104. package/dist/hub-catalogue/pattern/pattern-strangler-fig.radical +0 -227
  105. package/dist/hub-catalogue/pattern/pattern-transactional-outbox.radical +0 -209
  106. package/dist/hub-catalogue/requirement/req-accessibility.radical +0 -48
  107. package/dist/hub-catalogue/requirement/req-ai-autonomous-resolution.radical +0 -51
  108. package/dist/hub-catalogue/requirement/req-ai-groundedness.radical +0 -45
  109. package/dist/hub-catalogue/requirement/req-ai-human-handoff.radical +0 -46
  110. package/dist/hub-catalogue/requirement/req-alerting.radical +0 -52
  111. package/dist/hub-catalogue/requirement/req-api-response-time.radical +0 -51
  112. package/dist/hub-catalogue/requirement/req-api-standard.radical +0 -45
  113. package/dist/hub-catalogue/requirement/req-audit-logging.radical +0 -43
  114. package/dist/hub-catalogue/requirement/req-auth-response-time.radical +0 -45
  115. package/dist/hub-catalogue/requirement/req-auth.radical +0 -43
  116. package/dist/hub-catalogue/requirement/req-autoscaling.radical +0 -62
  117. package/dist/hub-catalogue/requirement/req-availability.radical +0 -50
  118. package/dist/hub-catalogue/requirement/req-backward-compatibility.radical +0 -46
  119. package/dist/hub-catalogue/requirement/req-batch-job-completion.radical +0 -50
  120. package/dist/hub-catalogue/requirement/req-carbon-efficiency.radical +0 -64
  121. package/dist/hub-catalogue/requirement/req-centralised-logging.radical +0 -45
  122. package/dist/hub-catalogue/requirement/req-ci-pipeline-time.radical +0 -43
  123. package/dist/hub-catalogue/requirement/req-code-complexity.radical +0 -43
  124. package/dist/hub-catalogue/requirement/req-config-propagation.radical +0 -45
  125. package/dist/hub-catalogue/requirement/req-data-integrity.radical +0 -35
  126. package/dist/hub-catalogue/requirement/req-data-retention.radical +0 -44
  127. package/dist/hub-catalogue/requirement/req-db-query-response.radical +0 -44
  128. package/dist/hub-catalogue/requirement/req-disaster-recovery.radical +0 -59
  129. package/dist/hub-catalogue/requirement/req-distributed-tracing.radical +0 -45
  130. package/dist/hub-catalogue/requirement/req-encryption.radical +0 -49
  131. package/dist/hub-catalogue/requirement/req-error-rate.radical +0 -45
  132. package/dist/hub-catalogue/requirement/req-error-recovery.radical +0 -34
  133. package/dist/hub-catalogue/requirement/req-event-schema-compatibility.radical +0 -37
  134. package/dist/hub-catalogue/requirement/req-fail-safe-default.radical +0 -55
  135. package/dist/hub-catalogue/requirement/req-fast-startup-graceful-shutdown.radical +0 -69
  136. package/dist/hub-catalogue/requirement/req-gdpr-erasure.radical +0 -44
  137. package/dist/hub-catalogue/requirement/req-graceful-degradation.radical +0 -39
  138. package/dist/hub-catalogue/requirement/req-health-checks.radical +0 -43
  139. package/dist/hub-catalogue/requirement/req-iac.radical +0 -36
  140. package/dist/hub-catalogue/requirement/req-idempotency.radical +0 -47
  141. package/dist/hub-catalogue/requirement/req-input-validation.radical +0 -37
  142. package/dist/hub-catalogue/requirement/req-least-privilege.radical +0 -47
  143. package/dist/hub-catalogue/requirement/req-ledger-immutability.radical +0 -38
  144. package/dist/hub-catalogue/requirement/req-mfa.radical +0 -36
  145. package/dist/hub-catalogue/requirement/req-ml-extraction-accuracy.radical +0 -42
  146. package/dist/hub-catalogue/requirement/req-onboarding-time.radical +0 -42
  147. package/dist/hub-catalogue/requirement/req-page-load-time.radical +0 -59
  148. package/dist/hub-catalogue/requirement/req-payout-latency.radical +0 -46
  149. package/dist/hub-catalogue/requirement/req-presence-latency.radical +0 -46
  150. package/dist/hub-catalogue/requirement/req-rate-limiting.radical +0 -45
  151. package/dist/hub-catalogue/requirement/req-report-generation.radical +0 -44
  152. package/dist/hub-catalogue/requirement/req-resource-efficiency.radical +0 -64
  153. package/dist/hub-catalogue/requirement/req-resource-headroom.radical +0 -53
  154. package/dist/hub-catalogue/requirement/req-resource-isolation.radical +0 -37
  155. package/dist/hub-catalogue/requirement/req-search-response-time.radical +0 -44
  156. package/dist/hub-catalogue/requirement/req-secrets-management.radical +0 -45
  157. package/dist/hub-catalogue/requirement/req-task-success-rate.radical +0 -42
  158. package/dist/hub-catalogue/requirement/req-test-coverage.radical +0 -42
  159. package/dist/hub-catalogue/requirement/req-throughput.radical +0 -55
  160. package/dist/hub-catalogue/requirement/req-vulnerability-scanning.radical +0 -52
  161. package/dist/hub-catalogue/requirement/req-zero-downtime-deploy.radical +0 -39
package/README.md CHANGED
@@ -4,15 +4,21 @@ This local stdio MCP server lets Codex read and edit one Radical **Markdown mode
4
4
 
5
5
  ## Install and connect
6
6
 
7
- Use Node.js 20.11 or newer. Run the published server without cloning this repository:
7
+ Use Node.js 20.11 or newer. The quickest way to connect an agent is the CLI's guided setup, which writes the entry below into each agent's configuration and checks that the server answers:
8
+
9
+ ```sh
10
+ npx @radicaltools/cli setup /absolute/path/to/my-model
11
+ ```
12
+
13
+ To do it by hand, run the published server without cloning this repository:
8
14
 
9
15
  ```sh
10
16
  npx -y @radicaltools/mcp --folder /absolute/path/to/my-model
11
17
  ```
12
18
 
13
- For reproducible setups, pin a version, for example `@radicaltools/mcp@0.1.1`.
19
+ For reproducible setups, pin a version, for example `@radicaltools/mcp@0.2.0`.
14
20
  To connect a coding agent, use `npx` as the command, with
15
- `["-y", "@radicaltools/mcp@0.1.1", "--folder", "/absolute/path/to/my-model"]`
21
+ `["-y", "@radicaltools/mcp@0.2.0", "--folder", "/absolute/path/to/my-model"]`
16
22
  as its arguments. On Windows, use `npx.cmd` as the command and an absolute Windows
17
23
  folder path. The server waits for MCP messages on stdin and prints no banner to stdout.
18
24
 
@@ -42,23 +48,33 @@ Launch Studio with `npm run dev:web` from the repository root, open it in Chromi
42
48
  The server binds to one folder at launch, then reads it afresh for every tool call. Its tools are the shared AI tool catalogue from `@radical/common/ai/tools`, the one Studio's AI chat and Radical Forge use, minus the canvas-only `set_active_view` and `focus_node` and the destructive `reset_diagram`. It provides:
43
49
 
44
50
  - `get_model_summary` (counts, views, sequences, milestones, presentations, the modelling rules Studio's chat and Forge follow, and the metamodel rules) and `search_model` (a small query language, including `LIST SEQUENCES` and `GET SEQUENCE`);
45
- - the `forge_*` tools: a Radical Forge run with the agent's model. After every step the server writes where the run stands to `.radical/forge-run.json` (next to the selection, also out of git), and marks it closed when the client goes away, so Studio open on the folder can show it on its Forge button;
51
+ - the `forge_*` tools: a Radical Forge run with the agent's model, ending with a Review stage over the whole model. Each stage may fill gaps in earlier stages, but only by asking: `forge_propose_refinement` checks a proposal and returns exactly what it would write, for the agent to show the user, and `forge_answer_refinement` writes it only if the user accepts (while a stage is open the server refuses direct writes to earlier stages, and every write while a proposal waits for its answer). `forge_complete_stage` lists what the stage refined, with the gaps the completeness rules still find. In a folder with no base from git, `forge_start` saves the model as it was before the run to `.radical/base.json`, so Studio's Changes on branch shows the run. After every step the server writes where the run stands to `.radical/forge-run.json` (next to the selection, also out of git), and marks it closed when the client goes away, so Studio open on the folder can show it on its Forge button;
46
52
  - `get_issues`: every rule the model breaks now, as the Validation list in Studio's metamodel editor shows it. A write is refused when it brings in a new error; the warnings it brings in (a state machine without an initial state, a reference to no node, …) come back with its result, since a model is often incomplete while it is being built;
47
53
  - `get_selection`: what is selected on Studio's canvas for this folder (the view on screen, each selected node in full, selected relations), so you can say "fix the selected mockup" instead of naming it. Studio writes it to `.radical/selection.json` in the model folder whenever the selection or the view changes, and clears it when you switch to another model; `.radical/` carries its own `.gitignore`, and the file is not part of the model, so writing it never conflicts with model edits;
48
- - `add_`, `update_` and `delete_` tools for nodes and relations, and `move_node` to change a node's parent (it keeps the node's canvas position and enforces the metamodel's `allowedParents`). A reference property (a transition's `event` and `raises`) takes node ids or tempIds from the same connection and refuses a node of the wrong type;
49
- - `create_view`, `update_view` (name, kind, linked sequence, hidden relations), `set_view_nodes` and `delete_view`;
54
+ - `get_changes`: what changed in the model since its version in git, for an agent asked to implement a change made in the model. It lists the elements and relations added, removed and changed (uncommitted edits included), each changed field with its old and new value, and each element with its place and its relations, such as the component that satisfies a requirement and the scenarios that verify it. Views, positions, sizes and folding are left out. `since` names the branch, tag or commit to compare with; by default it is the merge base with the default branch (`origin/main`), so every model change on the branch counts. `radical diff` prints the same list. Without `since` it also saves that base to `.radical/base.json`, for Studio to show the same changes (Changes on branch);
55
+ - `add_`, `update_` and `delete_` tools for nodes and relations, and `move_node` to change a node's parent (the node keeps its canvas position where it lies inside the new parent and clear of its new siblings, else it is placed beside them and what lies round the grown parent makes room; it enforces the metamodel's `allowedParents`). A reference property (a transition's `event` and `raises`) takes node ids or tempIds from the same connection and refuses a node of the wrong type;
56
+ - `create_view`, `update_view` (name, folder in the list of views, line style, kind, linked sequence, hidden relations, elements shown open or folded, filter chain, or `viewpoint`: one of the metamodel's viewpoints, whose kind and chain the view then follows, with `subject` the element it draws for a viewpoint that draws one, such as a state machine or a system's containers; `null` keeps them for the view alone), `set_view_nodes`, `order_views` (the order of views, and so of their folders) and `delete_view`;
50
57
  - `create_sequence`, `update_sequence` and `delete_sequence`: ordered relation flows that a `dynamic` view plays;
51
58
  - `create_presentation`, `update_presentation` and `delete_presentation`: slides over views, which Studio frames to fit the whole view or the slide's `focus` elements (several slides can zoom onto parts of one view), showing the current model or a `milestone`;
52
59
  - `list_milestones`, `create_milestone`, `update_milestone`, `delete_milestone` and `compare_milestones`: named copies of the model at phases of the system ("As-is", "Target 2027"). `create_milestone` saves the current model as the latest one and `compare_milestones` lists what changed; no tool loads a milestone over the current model, which stays in Studio's timeline;
53
- - `upsert_node_type`, `delete_node_type`, `upsert_relation_type` and `delete_relation_type`. A built-in metamodel is copied to a `…-custom` id on the first edit, because Studio replaces built-in metamodels with their preset on load. After a metamodel change (from these tools or from Studio) the server re-advertises the node and relation tool schemas;
54
- - `smart_layout`, for All elements or one static or dynamic view (`viewId`), which then gets its own saved positions;
55
- - `align_nodes` (a row or a column, with `keepOrder` to keep the listed order), `grid_nodes` (`columns` columns, filled row by row) and `remove_alignment`, for All elements or one view (`viewId`). Studio and `smart_layout` keep these rules in every later layout.
60
+ - `upsert_viewpoint` and `delete_viewpoint`: viewpoints of the metamodel, a view type and a filter chain under a name (given as `pipeline` or copied from a view with `fromViewId`), in a `group` such as `C4` or `Requirements`, and with `subjectTypes` drawing one element of those types per view. Studio's New view offers them, and the views of a type follow its changes; a deleted type leaves its views their kind and chain. They do not copy a built-in metamodel: a model keeps its own viewpoints when Studio swaps the preset in;
61
+ - `upsert_node_type`, `delete_node_type`, `upsert_relation_type` and `delete_relation_type`. A type takes a `description` (what it is; the wiki view shows it), a relation type also `forwardLabel` and `inverseLabel` (how it reads in a sentence from its source and from its target). A built-in metamodel is copied to a `…-custom` id on the first edit, because Studio replaces built-in metamodels with their preset on load. A type cannot be deleted while elements or relations of it remain, in the model or in a milestone, or while a viewpoint or a view's filter chain names it. After a metamodel change (from these tools or from Studio) the server re-advertises the node and relation tool schemas;
62
+ - `smart_layout`, for All elements or one static view (`viewId`), which then gets its own saved positions; a dynamic view plays its sequence and, like a table or a wiki, has no canvas layout;
63
+ - `align_nodes` (a row or a column, with `keepOrder` to keep the listed order), `grid_nodes` (`columns` columns, filled row by row) and `remove_alignment`, for All elements or one static view (`viewId`). Studio and `smart_layout` keep these rules in every later layout.
56
64
 
57
65
  These use Studio's shared schemas and model rules. Besides counts, `get_model_summary` returns the metamodel context message the other tool descriptions refer to: each type's property keys and enum options, allowed parents, cardinality and relation pairs. The server's MCP instructions tell clients to call it first. New nodes are placed inside their parent below its header (root nodes to the right of the existing ones), and every parent a change adds to, moves or removes from is refitted to its children. `smart_layout` runs Studio's Smart Layout over the whole model (the **All elements** arrangement) and saves the result; views with their own saved positions keep them. On a large model it can take minutes: a client that sends a progress token gets a progress notification per step, and a cancelled call (or a client that disconnects) stops at the next step without writing anything. The server exits when the client closes its end. Writes also update `defaultPositions`, which Studio restores when you switch back to **All elements**. `add_node` returns the persisted real ID, and a `tempId` can be used in later calls on the same MCP connection. Newly added nodes appear in Studio's **All elements** view until a view lists them. The server refreshes its model data per call.
58
66
 
59
- Writes preserve unrelated files and the existing `radical.md` text. A tool reports success only after the changed model files are written. If a file changed between the server's read and write, it returns a conflict without writing. Studio's external-change reload no longer queues an autosave of the loaded data. After such a reload Studio highlights what changed for about five seconds (new and changed elements badged, removed ones as ghosts; layout alone shows nothing), so you can follow an agent at work.
67
+ Writes preserve unrelated files and the existing `radical.md` text. A tool reports success only after the changed model files are written. After such a reload Studio highlights what changed for about five seconds (new and changed elements badged, removed ones as ghosts; layout alone shows nothing), so you can follow an agent at work.
68
+
69
+ ### Working alongside Studio
70
+
71
+ You can keep editing in Studio while an agent writes the same folder. Neither side overwrites the other:
60
72
 
61
- For now, keep Studio in **viewer use while the MCP client writes**. Folder writes span several files, and Studio and MCP do not share a cross-process transaction lock. Editing the same folder simultaneously from both can still race; the stamp check only catches changes visible before a write begins. Single `.radical` JSON files, snapshots (milestones), browser commands, and remote HTTP MCP are not supported by this server.
73
+ - **Merged, not refused.** If a file changed between a call's read and its write (Studio saved, you edited a file, git pulled), the server merges its change with that edit, element by element and field by field, and says so in the result (`Merged with edits made in the folder while the call ran …`). Where both changed the same value, the folder's is kept and the result names it, so the agent can check it with `search_model`. Studio merges its own saves the same way. A change only to positions or sizes merges silently. A file that no longer reads as a model (git conflict markers, a half-written file) is not merged over: the call writes nothing and names the file.
74
+ - **Two writers at once.** Two servers on one folder (Claude Desktop and Claude Code), or a server and the desktop app, write it one at a time: each takes the folder's turn in `.radical/write.lock` for its check and its write, so the second finds the first one's change and merges with it. A turn left by a process that is gone, or held for 15 seconds, is taken over. Studio in a browser does not take turns; it merges as above.
75
+ - **Taking turns.** After each write the server marks the folder as being written by an agent in `.radical/agent-activity.json` (out of git, like the selection) for 15 seconds. Meanwhile Studio holds its saves: it says so once, takes in each change of the agent as it reloads, keeping your edits on top, and saves them when the agent pauses.
76
+
77
+ Single `.radical` JSON files, loading a milestone over the current model (the milestone tools save, list, rename, delete and compare them), commands that drive Studio's canvas, and remote HTTP MCP are not supported by this server.
62
78
 
63
79
  Run `npm run test -w @radicaltools/mcp` to build and exercise a real stdio connection and temporary disk folder.
64
80
 
@@ -73,7 +89,9 @@ The package contains only its ESM build, the Hub catalogue, this README, its
73
89
  manifest and the MIT license. The four private `@radical/*` workspaces are build
74
90
  dependencies bundled by tsup; users install only the MCP SDK and ELK.js as runtime
75
91
  dependencies. `prepack` builds from source, clears old build output and copies
76
- the catalogue and root license. The MCP handshake reports the package version.
92
+ the catalogue and root license. The MCP handshake, `get_model_summary` and
93
+ `radical-mcp --version` report the product version, with the commit it was built
94
+ from unless the build is the release tagged `v<version>` (`0.3.0+1a2b3c4`).
77
95
 
78
96
  Before the first release, from the repository root:
79
97
 
@@ -98,16 +116,14 @@ publish the verified first-release archive, completing npm's 2FA challenge:
98
116
  ```sh
99
117
  npm login --auth-type=web
100
118
  npm whoami
101
- npm publish ./release/radicaltools-mcp-0.1.1.tgz --access public
119
+ npm publish ./release/radicaltools-mcp-0.2.0.tgz --access public
102
120
  ```
103
121
 
104
122
  Do this after the pull request is merged, from the reviewed main commit. A name
105
- and version can only be published once. For later releases, bump only this
106
- workspace's version (and the lockfile) in a pull request:
107
-
108
- ```sh
109
- npm version patch -w ./apps/mcp --no-git-tag-version
110
- ```
123
+ and version can only be published once. The MCP server shares one product
124
+ version with the CLI, the Desktop app and the VS Code extension: set it for all
125
+ of them with `npm run release` (see *Releasing* in the root README), never in
126
+ this workspace alone.
111
127
 
112
128
  ### GitHub Actions with Trusted Publishing
113
129
 
@@ -118,10 +134,15 @@ and add GitHub Actions with these values:
118
134
  | --- | --- |
119
135
  | Organization or user | `radicaltools` |
120
136
  | Repository | `radical.tools` |
121
- | Workflow filename | `mcp-publish.yml` |
137
+ | Workflow filename | `npm-publish.yml` |
122
138
  | Environment name | Leave empty |
123
139
  | Allowed actions | Enable direct publishing with `npm publish` |
124
140
 
141
+ The shared workflow publishes either CLI or MCP. If the existing trusted
142
+ publisher points at `mcp-publish.yml`, replace it with one using
143
+ `npm-publish.yml` after merging this change. Trusted publishers are configured
144
+ per npm package, even though both packages use the same workflow.
145
+
125
146
  No npm token or GitHub secret is needed. npm requires Node 22.14+ and npm 11.5.1+
126
147
  for Trusted Publishing; the workflow uses Node 24 and npm 11, and gives only the
127
148
  publish job `id-token: write`. A new trusted publisher must complete its first
@@ -133,9 +154,14 @@ before the deadline shown in npm. A dry run or a local `npm publish` does not
133
154
  validate the OIDC connection. The workflow needs direct `npm publish` permission;
134
155
  `npm stage publish` alone is insufficient, and managing dist-tags is not needed.
135
156
 
136
- In GitHub **Actions → Publish MCP to npm → Run workflow**, select `main` and leave
137
- **dry-run** enabled to verify and upload the package without publishing. For a
138
- reviewed version bump, run it with **dry-run** disabled. Actual publishing is
139
- refused on any branch other than `main`. The workflow type-checks and tests the
140
- monorepo, verifies the installable tarball, and publishes that same archive with
141
- provenance. Pushing a branch or a desktop `v*` tag does not publish the MCP package.
157
+ A release tag `v<version>` (see *Releasing* in the root README) starts the
158
+ workflow for the CLI and the MCP server together: it checks that the tagged
159
+ commit is on `main` and that the four released packages carry the tag's
160
+ version, type-checks and tests the monorepo, verifies the installable tarball,
161
+ and publishes that same archive with provenance, on the dist-tag `next` for a
162
+ pre-release. A version npm already has is skipped, so a rerun publishes what
163
+ is left.
164
+
165
+ To check the package without a release, use **Actions → Publish to npm → Run
166
+ workflow**, select `main`, choose **package: mcp**, and leave **dry-run**
167
+ enabled. With **dry-run** disabled it publishes, but only from `main`.