@radicaltools/mcp 0.0.0-stage → 0.1.1
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 +140 -2
- package/dist/chunk-KI4NVSTU.js +1763 -0
- package/dist/elkLayout-WC6AXWOG.js +185 -0
- package/dist/hub-catalogue/adr/adr-api-versioning.radical +53 -0
- package/dist/hub-catalogue/adr/adr-auth-strategy.radical +53 -0
- package/dist/hub-catalogue/adr/adr-caching-strategy.radical +59 -0
- package/dist/hub-catalogue/adr/adr-data-consistency-model.radical +40 -0
- package/dist/hub-catalogue/adr/adr-data-store.radical +47 -0
- package/dist/hub-catalogue/adr/adr-deployment-strategy.radical +53 -0
- package/dist/hub-catalogue/adr/adr-event-schema-evolution.radical +53 -0
- package/dist/hub-catalogue/adr/adr-integration-style.radical +50 -0
- package/dist/hub-catalogue/adr/adr-ledger-reconciliation-strategy.radical +38 -0
- package/dist/hub-catalogue/adr/adr-llm-provider-strategy.radical +40 -0
- package/dist/hub-catalogue/adr/adr-marketplace-payments-model.radical +39 -0
- package/dist/hub-catalogue/adr/adr-multi-region.radical +60 -0
- package/dist/hub-catalogue/adr/adr-multi-tenancy-strategy.radical +41 -0
- package/dist/hub-catalogue/adr/adr-observability.radical +59 -0
- package/dist/hub-catalogue/adr/adr-realtime-transport.radical +38 -0
- package/dist/hub-catalogue/adr/adr-tech-stack.radical +45 -0
- package/dist/hub-catalogue/adr/adr-zero-trust-network.radical +40 -0
- package/dist/hub-catalogue/blueprint/bp-ai-assistant-platform.radical +1641 -0
- package/dist/hub-catalogue/blueprint/bp-analytical-data-platform.radical +1428 -0
- package/dist/hub-catalogue/blueprint/bp-ecommerce-platform.radical +1989 -0
- package/dist/hub-catalogue/blueprint/bp-fintech-ledger-platform.radical +1701 -0
- package/dist/hub-catalogue/blueprint/bp-marketplace-platform.radical +1792 -0
- package/dist/hub-catalogue/blueprint/bp-realtime-collaboration.radical +1421 -0
- package/dist/hub-catalogue/blueprint/bp-saas-b2b-platform.radical +1713 -0
- package/dist/hub-catalogue/fitness-function/ff-accessibility-scan.radical +34 -0
- package/dist/hub-catalogue/fitness-function/ff-ai-eval-gate.radical +52 -0
- package/dist/hub-catalogue/fitness-function/ff-api-contract.radical +36 -0
- package/dist/hub-catalogue/fitness-function/ff-capacity-load-test.radical +67 -0
- package/dist/hub-catalogue/fitness-function/ff-carbon-footprint-guard.radical +62 -0
- package/dist/hub-catalogue/fitness-function/ff-change-failure-rate.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-chaos-resilience-test.radical +53 -0
- package/dist/hub-catalogue/fitness-function/ff-cost-efficiency-guard.radical +64 -0
- package/dist/hub-catalogue/fitness-function/ff-coupling-guard.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-data-integrity-check.radical +51 -0
- package/dist/hub-catalogue/fitness-function/ff-data-residency.radical +43 -0
- package/dist/hub-catalogue/fitness-function/ff-dependency-rules.radical +37 -0
- package/dist/hub-catalogue/fitness-function/ff-deploy-frequency.radical +46 -0
- package/dist/hub-catalogue/fitness-function/ff-dr-drill-success.radical +52 -0
- package/dist/hub-catalogue/fitness-function/ff-duplication-guard.radical +53 -0
- package/dist/hub-catalogue/fitness-function/ff-error-budget.radical +59 -0
- package/dist/hub-catalogue/fitness-function/ff-fail-safe-verification.radical +34 -0
- package/dist/hub-catalogue/fitness-function/ff-infra-drift.radical +34 -0
- package/dist/hub-catalogue/fitness-function/ff-latency-slo.radical +59 -0
- package/dist/hub-catalogue/fitness-function/ff-lead-time.radical +44 -0
- package/dist/hub-catalogue/fitness-function/ff-ledger-balance-integrity.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-license-compliance.radical +43 -0
- package/dist/hub-catalogue/fitness-function/ff-mttr.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-noisy-neighbor-guard.radical +66 -0
- package/dist/hub-catalogue/fitness-function/ff-sast-scan.radical +35 -0
- package/dist/hub-catalogue/fitness-function/ff-scale-out-verification.radical +66 -0
- package/dist/hub-catalogue/fitness-function/ff-security-scan.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-startup-shutdown-check.radical +66 -0
- package/dist/hub-catalogue/fitness-function/ff-sync-convergence-test.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-test-coverage.radical +43 -0
- package/dist/hub-catalogue/fitness-function/ff-web-vitals.radical +57 -0
- package/dist/hub-catalogue/pattern/pattern-anti-corruption-layer.radical +88 -0
- package/dist/hub-catalogue/pattern/pattern-api-gateway.radical +168 -0
- package/dist/hub-catalogue/pattern/pattern-bff.radical +179 -0
- package/dist/hub-catalogue/pattern/pattern-bulkhead.radical +114 -0
- package/dist/hub-catalogue/pattern/pattern-circuit-breaker.radical +219 -0
- package/dist/hub-catalogue/pattern/pattern-cqrs.radical +195 -0
- package/dist/hub-catalogue/pattern/pattern-crdt-sync.radical +200 -0
- package/dist/hub-catalogue/pattern/pattern-event-driven.radical +210 -0
- package/dist/hub-catalogue/pattern/pattern-event-sourced-ledger.radical +211 -0
- package/dist/hub-catalogue/pattern/pattern-hexagonal.radical +196 -0
- package/dist/hub-catalogue/pattern/pattern-microservices.radical +262 -0
- package/dist/hub-catalogue/pattern/pattern-rag-pipeline.radical +213 -0
- package/dist/hub-catalogue/pattern/pattern-rate-limiter.radical +114 -0
- package/dist/hub-catalogue/pattern/pattern-saga.radical +208 -0
- package/dist/hub-catalogue/pattern/pattern-sidecar.radical +123 -0
- package/dist/hub-catalogue/pattern/pattern-strangler-fig.radical +227 -0
- package/dist/hub-catalogue/pattern/pattern-transactional-outbox.radical +209 -0
- package/dist/hub-catalogue/requirement/req-accessibility.radical +48 -0
- package/dist/hub-catalogue/requirement/req-ai-autonomous-resolution.radical +51 -0
- package/dist/hub-catalogue/requirement/req-ai-groundedness.radical +45 -0
- package/dist/hub-catalogue/requirement/req-ai-human-handoff.radical +46 -0
- package/dist/hub-catalogue/requirement/req-alerting.radical +52 -0
- package/dist/hub-catalogue/requirement/req-api-response-time.radical +51 -0
- package/dist/hub-catalogue/requirement/req-api-standard.radical +45 -0
- package/dist/hub-catalogue/requirement/req-audit-logging.radical +43 -0
- package/dist/hub-catalogue/requirement/req-auth-response-time.radical +45 -0
- package/dist/hub-catalogue/requirement/req-auth.radical +43 -0
- package/dist/hub-catalogue/requirement/req-autoscaling.radical +62 -0
- package/dist/hub-catalogue/requirement/req-availability.radical +50 -0
- package/dist/hub-catalogue/requirement/req-backward-compatibility.radical +46 -0
- package/dist/hub-catalogue/requirement/req-batch-job-completion.radical +50 -0
- package/dist/hub-catalogue/requirement/req-carbon-efficiency.radical +64 -0
- package/dist/hub-catalogue/requirement/req-centralised-logging.radical +45 -0
- package/dist/hub-catalogue/requirement/req-ci-pipeline-time.radical +43 -0
- package/dist/hub-catalogue/requirement/req-code-complexity.radical +43 -0
- package/dist/hub-catalogue/requirement/req-config-propagation.radical +45 -0
- package/dist/hub-catalogue/requirement/req-data-integrity.radical +35 -0
- package/dist/hub-catalogue/requirement/req-data-retention.radical +44 -0
- package/dist/hub-catalogue/requirement/req-db-query-response.radical +44 -0
- package/dist/hub-catalogue/requirement/req-disaster-recovery.radical +59 -0
- package/dist/hub-catalogue/requirement/req-distributed-tracing.radical +45 -0
- package/dist/hub-catalogue/requirement/req-encryption.radical +49 -0
- package/dist/hub-catalogue/requirement/req-error-rate.radical +45 -0
- package/dist/hub-catalogue/requirement/req-error-recovery.radical +34 -0
- package/dist/hub-catalogue/requirement/req-event-schema-compatibility.radical +37 -0
- package/dist/hub-catalogue/requirement/req-fail-safe-default.radical +55 -0
- package/dist/hub-catalogue/requirement/req-fast-startup-graceful-shutdown.radical +69 -0
- package/dist/hub-catalogue/requirement/req-gdpr-erasure.radical +44 -0
- package/dist/hub-catalogue/requirement/req-graceful-degradation.radical +39 -0
- package/dist/hub-catalogue/requirement/req-health-checks.radical +43 -0
- package/dist/hub-catalogue/requirement/req-iac.radical +36 -0
- package/dist/hub-catalogue/requirement/req-idempotency.radical +47 -0
- package/dist/hub-catalogue/requirement/req-input-validation.radical +37 -0
- package/dist/hub-catalogue/requirement/req-least-privilege.radical +47 -0
- package/dist/hub-catalogue/requirement/req-ledger-immutability.radical +38 -0
- package/dist/hub-catalogue/requirement/req-mfa.radical +36 -0
- package/dist/hub-catalogue/requirement/req-ml-extraction-accuracy.radical +42 -0
- package/dist/hub-catalogue/requirement/req-onboarding-time.radical +42 -0
- package/dist/hub-catalogue/requirement/req-page-load-time.radical +59 -0
- package/dist/hub-catalogue/requirement/req-payout-latency.radical +46 -0
- package/dist/hub-catalogue/requirement/req-presence-latency.radical +46 -0
- package/dist/hub-catalogue/requirement/req-rate-limiting.radical +45 -0
- package/dist/hub-catalogue/requirement/req-report-generation.radical +44 -0
- package/dist/hub-catalogue/requirement/req-resource-efficiency.radical +64 -0
- package/dist/hub-catalogue/requirement/req-resource-headroom.radical +53 -0
- package/dist/hub-catalogue/requirement/req-resource-isolation.radical +37 -0
- package/dist/hub-catalogue/requirement/req-search-response-time.radical +44 -0
- package/dist/hub-catalogue/requirement/req-secrets-management.radical +45 -0
- package/dist/hub-catalogue/requirement/req-task-success-rate.radical +42 -0
- package/dist/hub-catalogue/requirement/req-test-coverage.radical +42 -0
- package/dist/hub-catalogue/requirement/req-throughput.radical +55 -0
- package/dist/hub-catalogue/requirement/req-vulnerability-scanning.radical +52 -0
- package/dist/hub-catalogue/requirement/req-zero-downtime-deploy.radical +39 -0
- package/dist/index.js +8382 -0
- package/package.json +48 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 radical.tools contributors
|
|
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,141 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Radical folder MCP server
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This local stdio MCP server lets Codex read and edit one Radical **Markdown model folder**. Point it at a folder containing `radical.md`, `nodes/**/*.md` and the JSON sidecars, or at an empty or missing folder, which becomes a new model. Studio's browser folder watcher reloads outside edits on its normal poll, so changes appear on the open canvas without a separate browser connection.
|
|
4
|
+
|
|
5
|
+
## Install and connect
|
|
6
|
+
|
|
7
|
+
Use Node.js 20.11 or newer. Run the published server without cloning this repository:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx -y @radicaltools/mcp --folder /absolute/path/to/my-model
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For reproducible setups, pin a version, for example `@radicaltools/mcp@0.1.1`.
|
|
14
|
+
To connect a coding agent, use `npx` as the command, with
|
|
15
|
+
`["-y", "@radicaltools/mcp@0.1.1", "--folder", "/absolute/path/to/my-model"]`
|
|
16
|
+
as its arguments. On Windows, use `npx.cmd` as the command and an absolute Windows
|
|
17
|
+
folder path. The server waits for MCP messages on stdin and prints no banner to stdout.
|
|
18
|
+
|
|
19
|
+
## Build from source
|
|
20
|
+
|
|
21
|
+
From the repository root:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npm install
|
|
25
|
+
npm run build -w @radicaltools/mcp
|
|
26
|
+
node apps/mcp/dist/index.js --folder /absolute/path/to/my-model
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The last command waits for MCP messages on stdin; it prints no banner to stdout. `--folder` may be relative to the directory the server starts in. A missing or empty folder (dot files such as `.git` don't count) becomes a new, empty model; `--metamodel radical` or `c4` picks its metamodel (default `radical`, the Radical metamodel Studio starts new models with). A folder with other files and no `radical.md` is refused. To connect Codex, run the following with absolute paths (or add the equivalent `command` and `args` in [Codex's MCP configuration](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)):
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
codex mcp add radical-folder -- node /absolute/path/to/radical.tools/apps/mcp/dist/index.js --folder /absolute/path/to/my-model
|
|
33
|
+
codex mcp list
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Claude Code takes the same command (`claude mcp add radical-folder -- node … --folder …`). For Claude Desktop, add it under `mcpServers` in `~/Library/Application Support/Claude/claude_desktop_config.json`, with an absolute path to `node`, because the app does not see your shell's `PATH`.
|
|
37
|
+
|
|
38
|
+
Launch Studio with `npm run dev:web` from the repository root, open it in Chromium, and open the **same OS folder** via the Models dialog. The browser asks for File System Access permission. The MCP server cannot access a browser-only OPFS folder. Ask the client to use `get_model_summary` first, then `search_model` or the node/relation tools.
|
|
39
|
+
|
|
40
|
+
## Tool and file behavior
|
|
41
|
+
|
|
42
|
+
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
|
+
|
|
44
|
+
- `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;
|
|
46
|
+
- `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
|
+
- `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`;
|
|
50
|
+
- `create_sequence`, `update_sequence` and `delete_sequence`: ordered relation flows that a `dynamic` view plays;
|
|
51
|
+
- `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
|
+
- `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.
|
|
56
|
+
|
|
57
|
+
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
|
+
|
|
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.
|
|
60
|
+
|
|
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.
|
|
62
|
+
|
|
63
|
+
Run `npm run test -w @radicaltools/mcp` to build and exercise a real stdio connection and temporary disk folder.
|
|
64
|
+
|
|
65
|
+
## Publishing (maintainers)
|
|
66
|
+
|
|
67
|
+
The package is published under the `radicaltools` npm organization. The earlier
|
|
68
|
+
`@radical.tools/mcp` releases have a separate npm identity; their versions and
|
|
69
|
+
Trusted Publishing settings do not transfer to `@radicaltools/mcp`. Switching
|
|
70
|
+
clients requires replacing the package name in their `npx` configuration.
|
|
71
|
+
|
|
72
|
+
The package contains only its ESM build, the Hub catalogue, this README, its
|
|
73
|
+
manifest and the MIT license. The four private `@radical/*` workspaces are build
|
|
74
|
+
dependencies bundled by tsup; users install only the MCP SDK and ELK.js as runtime
|
|
75
|
+
dependencies. `prepack` builds from source, clears old build output and copies
|
|
76
|
+
the catalogue and root license. The MCP handshake reports the package version.
|
|
77
|
+
|
|
78
|
+
Before the first release, from the repository root:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
npm ci --ignore-scripts
|
|
82
|
+
npm run check:workspaces
|
|
83
|
+
npm run typecheck
|
|
84
|
+
npm test
|
|
85
|
+
npm run test:package -w ./apps/mcp -- --out-dir ../../release
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The last command builds and packs the package, installs it with production
|
|
89
|
+
dependencies in a temporary project outside this repository, then starts its
|
|
90
|
+
installed executable over stdio. It checks the handshake, disk writes and reload,
|
|
91
|
+
Smart Layout's lazy-loaded chunks, and Forge's bundled Hub catalogue. Only after
|
|
92
|
+
those checks pass does it copy the verified tarball into `release/`. The same
|
|
93
|
+
check runs on Linux and Windows with Node 20 and 24 in CI.
|
|
94
|
+
|
|
95
|
+
Log in to npm with the account that owns the `radicaltools` organization and
|
|
96
|
+
publish the verified first-release archive, completing npm's 2FA challenge:
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
npm login --auth-type=web
|
|
100
|
+
npm whoami
|
|
101
|
+
npm publish ./release/radicaltools-mcp-0.1.1.tgz --access public
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
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
|
+
```
|
|
111
|
+
|
|
112
|
+
### GitHub Actions with Trusted Publishing
|
|
113
|
+
|
|
114
|
+
After `@radicaltools/mcp` exists, open its npm **Settings → Trusted publishing**
|
|
115
|
+
and add GitHub Actions with these values:
|
|
116
|
+
|
|
117
|
+
| Field | Value |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| Organization or user | `radicaltools` |
|
|
120
|
+
| Repository | `radical.tools` |
|
|
121
|
+
| Workflow filename | `mcp-publish.yml` |
|
|
122
|
+
| Environment name | Leave empty |
|
|
123
|
+
| Allowed actions | Enable direct publishing with `npm publish` |
|
|
124
|
+
|
|
125
|
+
No npm token or GitHub secret is needed. npm requires Node 22.14+ and npm 11.5.1+
|
|
126
|
+
for Trusted Publishing; the workflow uses Node 24 and npm 11, and gives only the
|
|
127
|
+
publish job `id-token: write`. A new trusted publisher must complete its first
|
|
128
|
+
successful publish within two days, so configure it when the next version is
|
|
129
|
+
ready. See [npm's Trusted Publishing instructions](https://docs.npmjs.com/trusted-publishers/).
|
|
130
|
+
|
|
131
|
+
If npm shows **Pending validation**, publish a new version through this workflow
|
|
132
|
+
before the deadline shown in npm. A dry run or a local `npm publish` does not
|
|
133
|
+
validate the OIDC connection. The workflow needs direct `npm publish` permission;
|
|
134
|
+
`npm stage publish` alone is insufficient, and managing dist-tags is not needed.
|
|
135
|
+
|
|
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.
|