@nodegx/mcp 0.2.5 → 0.2.7

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 CHANGED
@@ -11,8 +11,8 @@ and the validator's feedback — never the entire project.*
11
11
 
12
12
  ## Install
13
13
 
14
- The simplest start is `npm create nodegx my-apps`. It writes one file, `my-apps/.mcp.json`. That file tells Claude Code
15
- to start this server when you run `claude` in the folder.
14
+ The simplest start is `npm create nodegx my-apps`. It writes `my-apps/.mcp.json`, which tells Claude Code to start this
15
+ server when you run `claude` in the folder, beside short `CLAUDE.md` / `AGENTS.md` notes and the NodeGX skills.
16
16
 
17
17
  Any other MCP client can start the server itself over stdio:
18
18
 
@@ -78,13 +78,15 @@ Drop `--allow-writes` for a read-only server.
78
78
  claude mcp add --scope user nodegx-bootstrap -- node <path-to>/noodl-mcp.cjs --allow-writes
79
79
  ```
80
80
 
81
- Omit the project directory and the server starts anyway, advertising four tools:
81
+ Omit the project directory and the server starts anyway, advertising seven tools:
82
82
 
83
83
  | Tool | |
84
84
  |---|---|
85
85
  | `list_projects` | The NodeGX projects this machine has opened, read from the launcher's own recent-projects list and never written to. **Call this first** when the user talks about their app as something that already exists |
86
+ | `open_project` | Bind this server to a project `list_projects` reported; its tools arrive in the same conversation |
86
87
  | `create_project` | Scope an app in conversation, then write the project, its `docs/` and a build plan that is returned but not run |
87
88
  | `list_examples`, `get_example` | What a NodeGX graph actually looks like, without needing a project to read |
89
+ | `find_tools`, `call_tool` | Find a tool that is not advertised yet, or call one by name (for a client that does not refresh its tool list) |
88
90
 
89
91
  Everything else — reading components, authoring, validation, rendering, the backend — is **absent
90
92
  from `tools/list`**, not present-and-erroring, because a model calls what it is shown.
@@ -93,9 +95,9 @@ from `tools/list`**, not present-and-erroring, because a model calls what it is
93
95
  `create_project` is a write, and with no project there is nothing to read, so a read-only bootstrap
94
96
  server would start, appear connected, and be unable to do the one thing it exists for.
95
97
 
96
- ⚠️ **Creating a project does not repoint this server.** The project is written to disk and the
97
- server stays unbound; register a second server against the new directory to author in it. (BST-002
98
- is the task that makes the live server bind itself.)
98
+ **Creating or opening a project binds this server to it.** Its tools arrive in the same conversation
99
+ (`notifications/tools/list_changed`), with no second registration and no restart. A server binds once: a second
100
+ `create_project` or `open_project` leaves it on the first project, and says so.
99
101
 
100
102
  ### Where the bundle is
101
103
 
@@ -299,7 +301,8 @@ npm run build --workspace @nodegx/mcp # esbuild → dist/noodl-mcp.cjs
299
301
 
300
302
  - File-based only; no live sync with a running editor (a bridge is future work —
301
303
  the editor holds its own in-memory state and can overwrite MCP writes on save).
302
- - No project-level settings/styles/routes writes, asset upload, or model files in v1.
304
+ - No asset upload or model files. Project settings, tokens and element styles are written by `set_project_settings`,
305
+ `set_project_tokens` and `set_element_style`; a page is registered in the router when it is written.
303
306
  - Read-side supports v2 directories only; migrate legacy projects with the editor first.
304
307
  - `get_node_type` with several types can exceed an MCP host's tool-result cap
305
308
  (~126 KB for 7 types in the SUB-010 demo, and the host's "overflow saved to a
@@ -310,3 +313,7 @@ npm run build --workspace @nodegx/mcp # esbuild → dist/noodl-mcp.cjs
310
313
 
311
314
  The server is licensed GPL-3.0-only because it bundles code from the NodeGX editor. The source is in
312
315
  [The-Low-Code-Foundation/NodeGX](https://github.com/The-Low-Code-Foundation/NodeGX), under `packages/noodl-mcp`.
316
+
317
+ The apps it builds aren't under the GPL. Their pages, data and assets belong to whoever built them. A deployed
318
+ app runs on the NodeGX runtime, which is MIT, and on the backend in `dist/backend/`, which is MIT too and carries its
319
+ own `LICENSE`. Every deployed folder holds a `NODEGX-LICENSE.txt` that says which licence covers which file.
package/bin/noodl-mcp.js CHANGED
@@ -1,2 +1,16 @@
1
1
  #!/usr/bin/env node
2
+ // P125 CCN-001 s5 (2026-10-23) — the bundle needs Node 20 or newer (`@nodegx/node-spec` wants the `File`
3
+ // constructor). Claude Desktop starts a SECOND copy of a server "for Cowork and Code sessions" from a shared pool
4
+ // with its own, shorter PATH, where `node` resolved to v16 on Richard's Mac while the chat's copy got v22: that
5
+ // copy died with a stack trace at the top of mcp-server-nodegx.log and Desktop said "nodegx couldn't start". Said
6
+ // in one sentence, with the fix, before the require that would throw it.
7
+ var major = Number(process.versions.node.split('.')[0]);
8
+ if (major < 20) {
9
+ process.stderr.write(
10
+ 'noodl-mcp: needs Node 20 or newer; this is Node ' + process.versions.node + ' at ' + process.execPath + '. ' +
11
+ 'In the host\'s config, set "command" to an absolute path of a newer node (for nvm: ~/.nvm/versions/node/v22.x/bin/node) ' +
12
+ 'rather than "node": a host can start a server with a PATH that is not your shell\'s.\n'
13
+ );
14
+ process.exit(1);
15
+ }
2
16
  require('../dist/noodl-mcp.cjs');
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) The NodeGX 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,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
21
+ OR OTHER DEALINGS IN THE SOFTWARE.