genexus-mcp 1.1.6 → 1.1.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 +165 -101
- package/cli/commands/axi.js +834 -0
- package/cli/index.js +380 -0
- package/cli/lib/config.js +192 -0
- package/cli/lib/output.js +117 -0
- package/cli/run.js +13 -186
- package/cli/run.test.js +283 -0
- package/docs/llm_cli_mcp_playbook.md +129 -0
- package/package.json +7 -2
- package/publish/GxMcp.Gateway.dll +0 -0
- package/publish/GxMcp.Gateway.exe +0 -0
- package/publish/GxMcp.Gateway.pdb +0 -0
- package/publish/tool_definitions.json +125 -125
- package/publish/worker/GxMcp.Worker.exe +0 -0
- package/publish/worker/GxMcp.Worker.pdb +0 -0
- package/publish/gateway_debug.log +0 -5995
- package/publish/gateway_debug.prev.log +0 -5
- package/publish/gateway_panic.log +0 -16
- package/publish/worker/DataTracing.log +0 -0
- package/publish/worker/cache/search_index.json +0 -1
- package/publish/worker/search_index.json +0 -1
- package/publish/worker/worker_debug.log +0 -84
- package/publish/worker/worker_debug.prev.log +0 -32
- package/publish/worker/worker_entlib.log +0 -123
package/README.md
CHANGED
|
@@ -1,101 +1,165 @@
|
|
|
1
|
-
# GeneXus 18 MCP Server (Genexus18MCP)
|
|
2
|
-
|
|
3
|
-
[](https://lobehub.com/mcp/lennix1337-genexus18mcp)
|
|
4
|
-
|
|
5
|
-
A high-performance Model Context Protocol (MCP) server for GeneXus 18. It integrates native GeneXus SDK access via a .NET 8 gateway and a .NET Framework 4.8 worker, exposing direct read/write/analysis operations directly to AI Agents and IDEs.
|
|
6
|
-
|
|
7
|
-
***
|
|
8
|
-
|
|
9
|
-
## 🚀 Quick Start (
|
|
10
|
-
|
|
11
|
-
You **do
|
|
12
|
-
|
|
13
|
-
### 1
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- **
|
|
93
|
-
- **
|
|
94
|
-
- **
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
1
|
+
# GeneXus 18 MCP Server (Genexus18MCP)
|
|
2
|
+
|
|
3
|
+
[](https://lobehub.com/mcp/lennix1337-genexus18mcp)
|
|
4
|
+
|
|
5
|
+
A high-performance Model Context Protocol (MCP) server for GeneXus 18. It integrates native GeneXus SDK access via a .NET 8 gateway and a .NET Framework 4.8 worker, exposing direct read/write/analysis operations directly to AI Agents and IDEs.
|
|
6
|
+
|
|
7
|
+
***
|
|
8
|
+
|
|
9
|
+
## 🚀 Quick Start (Installation & Configuration)
|
|
10
|
+
|
|
11
|
+
You **do NOT** need to clone this repository, and you **do NOT** need to install anything globally via `npm i -g`. The standard Node.js `npx` runner will dynamically fetch and launch the compiled gateway for you.
|
|
12
|
+
|
|
13
|
+
### Step 1: Configure (Non-Interactive First)
|
|
14
|
+
|
|
15
|
+
To initialize configuration in a deterministic, agent-friendly way:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx genexus-mcp@latest init --kb "C:\KBs\YourKB" --gx "C:\Program Files (x86)\GeneXus\GeneXus18"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If you want the setup wizard prompts explicitly, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx genexus-mcp@latest init --interactive
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Step 2: Restart your AI Assistant
|
|
28
|
+
|
|
29
|
+
Once the wizard outputs `🎉 You are all set!`, simply **Restart** or **Refresh** your AI Assistant (Claude Desktop, Antigravity, Cursor, etc.). The AI will automatically spin up the server in the background and connect.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### 🤖 Auto-Installer Prompt (Copy & Paste to your AI)
|
|
34
|
+
|
|
35
|
+
If you want your AI Assistant to install and configure everything itself without you touching the terminal, copy and paste this exact prompt into your chat window:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
Please configure your Model Context Protocol (MCP) server to connect to my GeneXus Knowledge Base by following these exact steps:
|
|
39
|
+
|
|
40
|
+
1. Run the command `npx genexus-mcp@latest init` directly in the terminal in non-interactive mode using this configuration format (do not use interactive prompts). You must inject my raw KB path and GX path via environment variables or a direct config patch if needed, or simply let the zero-config auto-discovery handle it if we are already in the KB folder.
|
|
41
|
+
2. If I haven't told you my GeneXus path or KB path, STOP and ask me for them now.
|
|
42
|
+
3. Once the setup is complete, read the generated JSON block from the console output.
|
|
43
|
+
4. If you use a global configuration file (like `mcp_config.json` or `claude_desktop_config.json`), insert the exact `mcpServers` block provided in the console output. Use `npx.cmd` as the command.
|
|
44
|
+
5. Provide a summary of the installation and notify me when you are ready to query GeneXus!
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## AXI CLI Commands
|
|
50
|
+
|
|
51
|
+
The package now includes agent-facing commands optimized for shell automation:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
genexus-mcp home
|
|
55
|
+
genexus-mcp axi home
|
|
56
|
+
genexus-mcp llm help
|
|
57
|
+
genexus-mcp status
|
|
58
|
+
genexus-mcp doctor --mcp-smoke
|
|
59
|
+
genexus-mcp tools list
|
|
60
|
+
genexus-mcp config show
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Global AXI flags:
|
|
64
|
+
- `--format toon|json|text` (default for AXI commands: `toon`)
|
|
65
|
+
- `--fields f1,f2,...` (minimal schema by default; request extra fields explicitly)
|
|
66
|
+
- `--limit <n>` (for list commands)
|
|
67
|
+
- `--query <text>` (for `tools list`)
|
|
68
|
+
- `--full` (expand truncated long-form content when supported)
|
|
69
|
+
- `--mcp-smoke` (for `doctor`; executes protocol smoke checks)
|
|
70
|
+
- `--quiet` and `--no-color` (agent-safe output control)
|
|
71
|
+
|
|
72
|
+
Notes:
|
|
73
|
+
- Structured data/errors are emitted on `stdout`.
|
|
74
|
+
- Diagnostic/progress output stays on `stderr`.
|
|
75
|
+
- `meta.command` is always present for stable command identity in AXI outputs.
|
|
76
|
+
- Use `genexus-mcp <command> --help` for command-specific usage/examples.
|
|
77
|
+
- Output metadata includes `meta.schemaVersion` for contract stability.
|
|
78
|
+
- `--fields` is validated strictly per command; invalid fields return `usage_error` and exit code `2`.
|
|
79
|
+
- Running `genexus-mcp` without an AXI subcommand keeps the original MCP gateway launcher behavior.
|
|
80
|
+
- `genexus-mcp home` (`genexus-mcp axi home`) is the explicit content-first AXI entrypoint.
|
|
81
|
+
- `genexus-mcp llm help` returns protocol-first usage guidance for agents.
|
|
82
|
+
- Full LLM-facing AXI contract: [`docs/axi_cli_contract.md`](docs/axi_cli_contract.md)
|
|
83
|
+
- LLM usage playbook (CLI + MCP best practices): [`docs/llm_cli_mcp_playbook.md`](docs/llm_cli_mcp_playbook.md)
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 🛠️ Tool Surface (Skills)
|
|
88
|
+
*(See `GEMINI.md` for extended guidelines).* The worker natively exposes the following tools to the MCP Router:
|
|
89
|
+
|
|
90
|
+
- **Search & Discovery**: `genexus_query`, `genexus_read`, `genexus_batch_read`, `genexus_inspect`, `genexus_list_objects`, `genexus_properties`
|
|
91
|
+
- **Editing & Architecture**: `genexus_edit`, `genexus_batch_edit`, `genexus_create_object`, `genexus_refactor`, `genexus_forge`
|
|
92
|
+
- **Analysis:** `genexus_analyze`, `genexus_inject_context`, `genexus_doc`, `genexus_explain_code`, `genexus_summarize`
|
|
93
|
+
- **File System & Assets**: `genexus_asset`, `genexus_export_object`, `genexus_import_object`
|
|
94
|
+
- **History & DB**: `genexus_history`, `genexus_get_sql`, `genexus_structure`
|
|
95
|
+
- **Lifecycle & Build**: `genexus_lifecycle`, `genexus_test`, `genexus_format`
|
|
96
|
+
- **Patterns**: Smart XML generation and interpretation (e.g., WorkWithPlus PatternInstance mapping).
|
|
97
|
+
|
|
98
|
+
### MCP tool response ergonomics
|
|
99
|
+
|
|
100
|
+
For `tools/call`, the gateway keeps MCP compatibility and adds lightweight response metadata:
|
|
101
|
+
|
|
102
|
+
- `meta.schemaVersion` currently `mcp-axi/1`
|
|
103
|
+
- `meta.tool` with the normalized tool name
|
|
104
|
+
- collection helpers such as `returned`, `total`, `empty`, and (when inferable) `hasMore` and `nextOffset`
|
|
105
|
+
- truncation signals via `meta.truncated` plus contextual `help`
|
|
106
|
+
|
|
107
|
+
For list-heavy calls (`genexus_query`, `genexus_list_objects`), optional arguments can reduce token usage:
|
|
108
|
+
|
|
109
|
+
- `fields`: explicit projection (`["name","type"]` or `"name,type"`)
|
|
110
|
+
- `axiCompact: true`: compact default projection
|
|
111
|
+
|
|
112
|
+
Timeout behavior for long-running MCP tools:
|
|
113
|
+
- Gateway may return `result.isError=true` with `status=Running` plus `operationId`/`correlationId`.
|
|
114
|
+
- In this case, do not fail fast. Continue with `genexus_lifecycle(action='status'|'result', target='op:<operationId>')`.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 💻 Development & Building from Source
|
|
119
|
+
|
|
120
|
+
If you want to contribute, build the project yourself, or use the local **Nexus-IDE** VS Code Extension, use the classic source-based workflow.
|
|
121
|
+
|
|
122
|
+
### One-Click Build
|
|
123
|
+
1. Clone the repository to your Windows machine.
|
|
124
|
+
2. Run `.\setup.bat`.
|
|
125
|
+
* *This checks prerequisites, builds the C# components, and auto-registers the local server with Claude, Codex, Antigravity, and Cursor when detected.*
|
|
126
|
+
3. If GeneXus or your KB are not auto-detected, follow the terminal prompts.
|
|
127
|
+
|
|
128
|
+
### Nexus-IDE (VS Code)
|
|
129
|
+
The repository includes `src/nexus-ide`, a lightweight VS Code extension containing:
|
|
130
|
+
- Virtual file system using the `genexus://` scheme
|
|
131
|
+
- Dynamic KB explorer with multi-part editing (Source, Rules, Events, Variables)
|
|
132
|
+
- Built-in MCP discovery commands (tools, resources, prompts)
|
|
133
|
+
|
|
134
|
+
### Advanced Configuration
|
|
135
|
+
You can expand your local `config.json` for advanced networking or timeouts:
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"Server": {
|
|
140
|
+
"HttpPort": 5000,
|
|
141
|
+
"BindAddress": "127.0.0.1",
|
|
142
|
+
"SessionIdleTimeoutMinutes": 10,
|
|
143
|
+
"WorkerIdleTimeoutMinutes": 5
|
|
144
|
+
},
|
|
145
|
+
"GeneXus": {
|
|
146
|
+
"InstallationPath": "C:\\Program Files (x86)\\GeneXus\\GeneXus18",
|
|
147
|
+
"WorkerExecutable": "worker\\GxMcp.Worker.exe"
|
|
148
|
+
},
|
|
149
|
+
"Environment": {
|
|
150
|
+
"KBPath": "C:\\KBs\\YourKB"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Process Lifecycle & Architecture
|
|
156
|
+
- **Lazy Worker Mapping:** The .NET 8 Gateway is resident, but the heavy .NET 4.8 Worker is lazy (only spins up when the first standard command is received) and automatically terminates after `Server.WorkerIdleTimeoutMinutes` of inactivity to unlock build artifacts.
|
|
157
|
+
- **Gateway Reuse**: Launching multiple local IDE instances reuses a single active gateway using a unique lease file located at `%LOCALAPPDATA%\GenexusMCP\gateway-leases`.
|
|
158
|
+
- **HTTP Mode**: Run via HTTP at `http://127.0.0.1:5000/mcp` (Supports SSE notifications alongside standard POST JSON-RPC). Protocol expects `MCP-Protocol-Version: 2025-06-18`.
|
|
159
|
+
|
|
160
|
+
```mermaid
|
|
161
|
+
graph LR
|
|
162
|
+
A[AI Client or Nexus-IDE] -->|MCP stdio or HTTP /mcp| B[Gateway .NET 8]
|
|
163
|
+
B -->|JSON-RPC over process boundary| C[Worker .NET Framework 4.8]
|
|
164
|
+
C -->|Native SDK| D[GeneXus KB]
|
|
165
|
+
```
|