genexus-mcp 3.6.1 → 3.7.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 +108 -9
- package/cli/commands/axi.js +311 -64
- package/cli/lib/config.js +99 -19
- package/cli/run.test.js +226 -0
- package/config/gx-versions.json +5 -3
- package/package.json +1 -1
- package/publish/GxMcp.Gateway.deps.json +2 -2
- package/publish/GxMcp.Gateway.dll +0 -0
- package/publish/GxMcp.Gateway.exe +0 -0
- package/publish/config/gx-versions.json +5 -3
- package/publish/config.json +12 -12
- package/publish/gxmcp-manifest.json +10 -10
- package/publish/gxmcp-sbom.json +4 -4
- package/publish/tool_definitions.json +4 -4
- package/publish/worker/GxMcp.Worker.exe +0 -0
- package/publish/worker/GxMcp.Worker.exe.config +12 -0
- package/publish/worker/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/publish/worker/Microsoft.Bcl.HashCode.dll +0 -0
- package/publish/worker/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
- package/publish/worker/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
- package/publish/worker/Npgsql.dll +0 -0
- package/publish/worker/System.Buffers.dll +0 -0
- package/publish/worker/System.Collections.Immutable.dll +0 -0
- package/publish/worker/System.Diagnostics.DiagnosticSource.dll +0 -0
- package/publish/worker/System.Memory.dll +0 -0
- package/publish/worker/System.Numerics.Vectors.dll +0 -0
- package/publish/worker/System.Runtime.CompilerServices.Unsafe.dll +0 -0
- package/publish/worker/System.Text.Encodings.Web.dll +0 -0
- package/publish/worker/System.Text.Json.dll +0 -0
- package/publish/worker/System.Threading.Channels.dll +0 -0
- package/publish/worker/System.Threading.Tasks.Extensions.dll +0 -0
- package/publish/worker/System.ValueTuple.dll +0 -0
- package/publish/worker/config/gx-versions.json +5 -3
- package/publish/worker/gx-versions.json +5 -3
package/README.md
CHANGED
|
@@ -23,10 +23,10 @@ In practice: you point the MCP at your KB, then ask your AI assistant things lik
|
|
|
23
23
|
The same MCP distribution supports the official native SDK majors listed in the
|
|
24
24
|
generated compatibility document. It also includes basic, best-effort
|
|
25
25
|
compatibility for the legacy versions listed there through separate drivers;
|
|
26
|
-
that path is not equivalent to full native-SDK support.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
that path is not equivalent to full native-SDK support. A process can route
|
|
27
|
+
each declared KB to its own SDK/driver; `--gx` remains the convenient global
|
|
28
|
+
default for a single-major configuration. The commands below are examples of
|
|
29
|
+
switching the existing configuration:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npx genexus-mcp@latest init --kb "C:\KBs\KBTeste17" --gx "C:\Program Files (x86)\GeneXus\GeneXus17Trial"
|
|
@@ -38,6 +38,32 @@ After switching the SDK or KB, fully restart the AI client so it reloads the
|
|
|
38
38
|
MCP process and its tool schemas. If GX17 and GX18 must run simultaneously,
|
|
39
39
|
use separate MCP configurations and ports.
|
|
40
40
|
|
|
41
|
+
Classic GX8/GX9 KBs can be opened without changing the global GX18 default by
|
|
42
|
+
declaring their driver and installation per KB (the Gateway accepts both the
|
|
43
|
+
list and object catalog shapes):
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"Environment": {
|
|
48
|
+
"KBs": {
|
|
49
|
+
"SECT80": {
|
|
50
|
+
"Path": "D:\\GX80\\SECT",
|
|
51
|
+
"Driver": "com-gxpublic",
|
|
52
|
+
"InstallationPath": "C:\\Program Files (x86)\\ARTech\\GeneXus\\gxw80",
|
|
53
|
+
"Major": "8"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The equivalent one-shot request is `genexus_kb action=open` with `path`,
|
|
61
|
+
`alias`, `driver: "com-gxpublic"`, `installationPath`, and `major: "8"`.
|
|
62
|
+
GX8 uses the registered 32-bit GXPublic provider; the documented `.4` ProgID
|
|
63
|
+
and the installed `GXPubGXX.GXPublic(.5)` compatibility registration are
|
|
64
|
+
recognized. Classic DAT KB roots are identified from their legacy markers
|
|
65
|
+
(`DATA001`, `GXSPC001`, `kbdata`, `ATTRIBUT.DAT`, or `ATT.XPW`).
|
|
66
|
+
|
|
41
67
|
`init` also reads the KB `.gxw` major and the selected `GeneXus.exe` metadata.
|
|
42
68
|
It aborts before writing `config.json` when the majors conflict or an automatic
|
|
43
69
|
selection cannot be verified. `genexus-mcp doctor` exposes the same result as
|
|
@@ -77,7 +103,7 @@ claiming native-SDK compatibility based only on a version string.
|
|
|
77
103
|
Every legacy version currently declared in `legacyMajors` uses a best-effort
|
|
78
104
|
driver rather than the native SDK build:
|
|
79
105
|
- **GeneXus Evolution 1 (10.1), Evolution 2 (10.2), Evolution 3 (10.3), and GeneXus 15**: Driven via runtime reflection (`dotnet-reflection`), dynamically adapting to missing types or structural differences (such as module-less KBs without `QualifiedName`).
|
|
80
|
-
- **GeneXus 8.0 and GeneXus 9.0**: Driven through the classic GXPublic surface (`com-gxpublic`), detected from `gx.exe`/`gxdl32.dll` and classic `.gxi` Knowledge Bases. GXPublic is a metadata-oriented OLE DB
|
|
106
|
+
- **GeneXus 8.0 and GeneXus 9.0**: Driven through the classic GXPublic surface (`com-gxpublic`), detected from `gxw32.exe`/`gx.exe`/`gxdl32.dll` and classic `.gxi` Knowledge Bases. GXPublic is a metadata-oriented OLE DB surface; this path is intentionally limited to basic metadata/core operations and does not claim native-SDK source/edit parity.
|
|
81
107
|
- **Graceful degradation**: Modern tools that require features introduced in newer GeneXus versions (such as `genexus_api`, `genexus_gam`, or `genexus_module`) return structured `UNSUPPORTED_IN_GENEXUS_VERSION` errors indicating the required minimum version rather than failing ungracefully.
|
|
82
108
|
|
|
83
109
|
This legacy path is intended for basic core operations where implemented; it
|
|
@@ -86,6 +112,65 @@ does not claim the same feature parity as the native SDK contract for GeneXus
|
|
|
86
112
|
|
|
87
113
|
---
|
|
88
114
|
|
|
115
|
+
## Sharing one Worker between MCP clients
|
|
116
|
+
|
|
117
|
+
The Gateway and the GeneXus SDK Worker have different responsibilities. By
|
|
118
|
+
default, `Server.WorkerSharingMode` is `"isolated"`: each Gateway owns its own
|
|
119
|
+
Worker process. Keep that mode when an agent intentionally needs multiple
|
|
120
|
+
independent Workers.
|
|
121
|
+
|
|
122
|
+
When two or more independent MCP clients need to work on the same physical KB,
|
|
123
|
+
set `WorkerSharingMode` to `"shared-host"` in a `stdio-isolated` configuration:
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"ConfigSchemaVersion": 2,
|
|
128
|
+
"GatewayMode": "stdio-isolated",
|
|
129
|
+
"GeneXus": {
|
|
130
|
+
"InstallationPath": "C:\\Program Files (x86)\\GeneXus\\GeneXus18",
|
|
131
|
+
"WorkerExecutable": "C:\\path\\to\\GxMcp.Worker.exe"
|
|
132
|
+
},
|
|
133
|
+
"Server": {
|
|
134
|
+
"HttpPort": 0,
|
|
135
|
+
"McpStdio": true,
|
|
136
|
+
"WorkerSharingMode": "shared-host"
|
|
137
|
+
},
|
|
138
|
+
"Environment": {
|
|
139
|
+
"ResolutionPolicy": "strict",
|
|
140
|
+
"KBs": [
|
|
141
|
+
{ "alias": "main", "path": "C:\\KBs\\YourKB" }
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
`shared-host` shares only the per-KB broker-owned SDK Worker through bounded
|
|
148
|
+
local named-pipe attachments. The Gateways remain independent: MCP sessions,
|
|
149
|
+
authorization, KB selection, caches, request tracking, cancellation, progress,
|
|
150
|
+
notifications, and generated artifacts do not cross the process boundary.
|
|
151
|
+
Sharing is accepted only when the physical KB, Worker executable, GeneXus
|
|
152
|
+
installation, driver, and target major are compatible; a mismatch fails closed
|
|
153
|
+
instead of attaching to the wrong SDK process.
|
|
154
|
+
|
|
155
|
+
Writes carry a Gateway-local owner into the Worker. The same object/part cannot
|
|
156
|
+
be written concurrently by two attached clients, while writes to distinct
|
|
157
|
+
objects may proceed independently through the shared SDK boundary. The Worker
|
|
158
|
+
itself remains a single STA process, so calls that reach the same SDK are still
|
|
159
|
+
serialized as required by GeneXus.
|
|
160
|
+
|
|
161
|
+
For a healthy shared attachment, `genexus_whoami` and `genexus_doctor` report the
|
|
162
|
+
mode, identity key, pipe, host/Worker PIDs, generation, attachment ID, connection
|
|
163
|
+
state, and the latest startup/failure diagnostic. When something fails, inspect
|
|
164
|
+
`worker.diagnostics` and `workerHealth` before restarting or deleting local
|
|
165
|
+
state; these fields distinguish configuration/identity, mutex or registry,
|
|
166
|
+
pipe/handshake, startup, child exit/respawn, TTL, and frame failures.
|
|
167
|
+
|
|
168
|
+
See [Worker ownership](docs/worker-ownership.md) for the lifecycle contract and
|
|
169
|
+
[the shared-Worker benchmark](docs/benchmarks/2026-09-18-shared-worker.md) for
|
|
170
|
+
the measured two-client smoke and backpressure results.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
89
174
|
## What you can do with it
|
|
90
175
|
|
|
91
176
|
A quick map of what the agent can do against your real KB through the **50 tools** (details in [Tool Surface](#tool-surface)):
|
|
@@ -325,7 +410,18 @@ same path when a previous failure is present. Read it before changing the instal
|
|
|
325
410
|
using a global npm install; if the Antigravity launcher is stale, re-register it with
|
|
326
411
|
`npx genexus-mcp@latest clients add --clients antigravity`.
|
|
327
412
|
|
|
328
|
-
|
|
413
|
+
### Diagnosing a shared Worker failure
|
|
414
|
+
|
|
415
|
+
If `shared-host` does not attach or a Worker is restarted, run
|
|
416
|
+
`genexus_whoami` and `genexus_doctor` from the affected client and preserve the
|
|
417
|
+
structured `worker.diagnostics`/`workerHealth` block. The useful evidence is the
|
|
418
|
+
mode, identity, host/Worker PID, generation, attachment state, connection error,
|
|
419
|
+
and failure diagnostic — not only the final `no_worker` or `startup_failed`
|
|
420
|
+
summary. Do not remove a shared-worker registry file while a matching host is
|
|
421
|
+
still running; the broker owns that lifecycle and stale records are recovered
|
|
422
|
+
after PID/start-time validation.
|
|
423
|
+
|
|
424
|
+
Still stuck? [Open an issue](https://github.com/lennix1337/Genexus18MCP/issues) with the output of `npx genexus-mcp doctor --mcp-smoke` and the bounded diagnostic fields above. Redact credentials, tokens, connection strings, and other sensitive values.
|
|
329
425
|
|
|
330
426
|
---
|
|
331
427
|
|
|
@@ -589,13 +685,16 @@ When the pool is full and no Worker is idle, the server returns `KB_POOL_FULL`
|
|
|
589
685
|
|
|
590
686
|
```mermaid
|
|
591
687
|
graph LR
|
|
592
|
-
A[AI Client / Nexus-IDE] -->|MCP stdio or HTTP /mcp| B[Gateway .NET 10]
|
|
593
|
-
B -->|
|
|
688
|
+
A[AI Client / Nexus-IDE] -->|MCP stdio or HTTP /mcp| B[Independent Gateway .NET 10]
|
|
689
|
+
B -->|isolated stdio: direct child| C[Worker .NET Framework 4.8]
|
|
690
|
+
B -->|shared-host: named-pipe attachment| H[Per-KB WorkerHost broker]
|
|
691
|
+
H -->|one compatible child| C
|
|
594
692
|
C -->|Native SDK| D[GeneXus KB]
|
|
595
693
|
```
|
|
596
694
|
|
|
597
|
-
- **Worker pool (v2.3.0+)**: one .NET 4.8 Worker process per open KB, capped by `MaxOpenKbs` (default 3). Workers are spawned lazily, recycled by `WorkerIdleTimeoutMinutes`, and evicted LRU when the pool is full.
|
|
695
|
+
- **Worker pool (v2.3.0+)**: in isolated mode, one .NET 4.8 Worker process per open KB in each Gateway, capped by `MaxOpenKbs` (default 3). With `shared-host`, compatible Gateways attach to one broker-owned Worker per physical KB instead of starting duplicate SDK processes. Workers are spawned lazily, recycled by `WorkerIdleTimeoutMinutes`, and evicted LRU when the pool is full.
|
|
598
696
|
- **Cross-KB parallelism**: tool calls to different KBs run on different Worker processes and never block each other. Calls to the same KB are still serialized by the GeneXus SDK's STA requirement.
|
|
697
|
+
- **Gateway isolation**: `shared-host` does not turn one Gateway into a master or proxy for another; each client keeps its own MCP state and only the SDK Worker is shared.
|
|
599
698
|
- **Gateway reuse**: multiple IDE instances share one gateway via lease files at `%LOCALAPPDATA%\GenexusMCP\gateway-leases`.
|
|
600
699
|
- **HTTP mode**: also available at `http://127.0.0.1:5000/mcp` with SSE. Header: `MCP-Protocol-Version: 2025-11-25`.
|
|
601
700
|
|