genexus-mcp 1.3.1 → 2.0.3
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 +20 -7
- package/cli/commands/axi.js +1 -1
- package/docs/llm_cli_mcp_playbook.md +25 -9
- package/package.json +28 -2
package/README.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
# GeneXus
|
|
1
|
+
# GeneXus MCP Server — GeneXus 18 for Claude, Cursor, and AI Agents
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/genexus-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/genexus-mcp)
|
|
3
5
|
[](https://lobehub.com/mcp/lennix1337-genexus18mcp)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
**GeneXus MCP Server** is a Model Context Protocol (MCP) server that exposes a GeneXus 18 knowledge base to AI agents — Claude Desktop, Claude Code, Cursor, and any MCP-compatible client. It lets the agent read, edit, analyze, and refactor GeneXus objects (transactions, web panels, procedures, SDTs, data providers) directly through the native GeneXus SDK, with a .NET 8 gateway over MCP/stdio and a .NET Framework 4.8 worker hosting the SDK.
|
|
9
|
+
|
|
10
|
+
> **Search keywords:** GeneXus MCP · GeneXus 18 MCP · GeneXus AI · GeneXus Claude · Model Context Protocol GeneXus · GeneXus low-code AI agent
|
|
6
11
|
|
|
7
12
|
***
|
|
8
13
|
|
|
@@ -103,13 +108,17 @@ Notes:
|
|
|
103
108
|
## 🛠️ Tool Surface (Skills)
|
|
104
109
|
*(See `GEMINI.md` for extended guidelines).* The worker natively exposes the following tools to the MCP Router:
|
|
105
110
|
|
|
106
|
-
- **Search & Discovery**: `genexus_query`, `genexus_read`, `
|
|
107
|
-
- **Editing & Architecture**: `genexus_edit`, `
|
|
111
|
+
- **Search & Discovery**: `genexus_query`, `genexus_read`, `genexus_inspect`, `genexus_list_objects`, `genexus_properties`
|
|
112
|
+
- **Editing & Architecture**: `genexus_edit`, `genexus_create_object`, `genexus_refactor`, `genexus_forge`
|
|
108
113
|
- **Analysis:** `genexus_analyze`, `genexus_inject_context`, `genexus_doc`, `genexus_explain_code`, `genexus_summarize`
|
|
109
114
|
- **File System & Assets**: `genexus_asset`, `genexus_export_object`, `genexus_import_object`
|
|
110
115
|
- **History & DB**: `genexus_history`, `genexus_get_sql`, `genexus_structure`
|
|
111
116
|
- **Native Layout SDK**: `genexus_layout` (`get_tree`, `find_controls`, `set_property`, `set_properties`, `rename_printblock`, `add_printblock`, `get_preview`, `scan_mutators`)
|
|
112
117
|
|
|
118
|
+
> **`genexus_edit` modes:** `xml` (default — full XML replacement), `ops` (typed semantic op catalog: `set_attribute`, `add_attribute`, `remove_attribute`, `add_rule`, `remove_rule`, `set_property`), `patch` (JSON-Patch RFC 6902 array over canonical JSON object; legacy string-form patch also accepted for backward compatibility).
|
|
119
|
+
>
|
|
120
|
+
> **All write tools** accept `dryRun: true` (returns a preview `plan` envelope without mutating the KB) and `idempotencyKey` (safe retries — concurrent calls with same key are coalesced; results cached for 15 min by default).
|
|
121
|
+
|
|
113
122
|
Layout color note:
|
|
114
123
|
- For `ForeColor`, `BackColor`, `BorderColor`, send color values as palette names (`Black`, `Blue`, `Red`, `Transparent`) or RGB token (`R; G; B|`) to avoid nested SDK wrappers.
|
|
115
124
|
- **Lifecycle & Build**: `genexus_lifecycle`, `genexus_test`, `genexus_format`
|
|
@@ -119,10 +128,14 @@ Layout color note:
|
|
|
119
128
|
|
|
120
129
|
For `tools/call`, the gateway keeps MCP compatibility and adds lightweight response metadata:
|
|
121
130
|
|
|
122
|
-
- `
|
|
123
|
-
- `
|
|
131
|
+
- `_meta.schemaVersion` currently `mcp-axi/2`
|
|
132
|
+
- `_meta.tool` with the normalized tool name
|
|
124
133
|
- collection helpers such as `returned`, `total`, `empty`, and (when inferable) `hasMore` and `nextOffset`
|
|
125
|
-
- truncation signals via `
|
|
134
|
+
- truncation signals via `_meta.truncated` plus contextual `help`
|
|
135
|
+
- `_meta.idempotent: true` on cache-hit responses
|
|
136
|
+
- `_meta.batched: true` on `targets[]` multi-object responses
|
|
137
|
+
- `_meta.dryRun: true` on dry-run preview responses
|
|
138
|
+
- `_meta.removedTools` advertised on `initialize` for proactive agent detection of removed tools
|
|
126
139
|
|
|
127
140
|
For list-heavy calls (`genexus_query`, `genexus_list_objects`), optional arguments can reduce token usage:
|
|
128
141
|
|
package/cli/commands/axi.js
CHANGED
|
@@ -988,7 +988,7 @@ async function handleLlmHelp(options, ctx) {
|
|
|
988
988
|
},
|
|
989
989
|
mcp: {
|
|
990
990
|
parsePath: 'result.content[0].text',
|
|
991
|
-
expectedMeta: ['schemaVersion=mcp-axi/
|
|
991
|
+
expectedMeta: ['_meta.schemaVersion=mcp-axi/2', '_meta.tool=<tool-name>'],
|
|
992
992
|
listHelpers: ['returned', 'total', 'empty', 'hasMore', 'nextOffset'],
|
|
993
993
|
shaping: ['fields=<csv|array>', 'axiCompact=true (query/list_objects)']
|
|
994
994
|
},
|
|
@@ -47,12 +47,17 @@ Recommended flags:
|
|
|
47
47
|
|
|
48
48
|
For `tools/call`, parse `result.content[0].text` as JSON.
|
|
49
49
|
|
|
50
|
-
Gateway AXI-like enrichments are additive:
|
|
51
|
-
- `
|
|
52
|
-
- `
|
|
50
|
+
Gateway AXI-like enrichments are additive (under `_meta` — underscore-prefixed per MCP convention):
|
|
51
|
+
- `_meta.schemaVersion = mcp-axi/2` (v2.0.0+)
|
|
52
|
+
- `_meta.tool = <tool-name>`
|
|
53
53
|
- Collection helpers when inferable: `returned`, `total`, `empty`, `hasMore`, `nextOffset`
|
|
54
|
-
- Truncation signal: `
|
|
54
|
+
- Truncation signal: `_meta.truncated=true` + contextual `help`
|
|
55
55
|
- Idempotent writes may include `noChange=true`
|
|
56
|
+
- v2.0.0 fields:
|
|
57
|
+
- `_meta.idempotent=true` on idempotency-cache hits.
|
|
58
|
+
- `_meta.batched=true` when the request used the `targets[]` plural form.
|
|
59
|
+
- `_meta.dryRun=true` on `dryRun` preview responses; full preview shape: `{plan:{touchedObjects, xmlDiff, brokenRefs, warnings}}`.
|
|
60
|
+
- `_meta.removedTools` advertised on `initialize` so agents can self-correct before a runtime `-32601`.
|
|
56
61
|
|
|
57
62
|
Optional shaping for `genexus_query` and `genexus_list_objects`:
|
|
58
63
|
- `fields`: array or CSV projection.
|
|
@@ -69,11 +74,22 @@ Disambiguation:
|
|
|
69
74
|
|
|
70
75
|
Efficient reads:
|
|
71
76
|
- `genexus_read(name='Obj', part='Source', offset=1, limit=200)`
|
|
72
|
-
- For many files, prefer `
|
|
73
|
-
|
|
74
|
-
Safe edits:
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
+
- For many files, prefer `genexus_read(targets=['A','B','C'], part='Source')` (plural form).
|
|
78
|
+
|
|
79
|
+
Safe edits (v2.0.0):
|
|
80
|
+
- Preview before applying: any `genexus_edit` call accepts `dryRun: true` and returns `{plan: {touchedObjects, xmlDiff, brokenRefs, warnings}}` without mutation.
|
|
81
|
+
- Three edit modes:
|
|
82
|
+
- `mode='xml'` (default) — full XML replacement.
|
|
83
|
+
- `mode='ops'` — typed semantic ops, e.g. `ops=[{op:'set_attribute', name:'Phone', type:'Character(20)'}]`. Catalog: `set_attribute`, `add_attribute`, `remove_attribute`, `add_rule`, `remove_rule`, `set_property`.
|
|
84
|
+
- `mode='patch'` — JSON-Patch RFC 6902 array, e.g. `patch=[{op:'replace', path:'/description', value:'new'}]`. Legacy string-form text patch (`mode='patch'` with string `patch`) still works for backward compatibility.
|
|
85
|
+
- Multi-object coordinated changes: `genexus_edit(targets=[{name:'A', mode:'ops', ops:[...]}, {name:'B', mode:'xml', content:'...'}])`. Mutually exclusive with singular `name`.
|
|
86
|
+
- Safe retries: pass `idempotencyKey: '<token>'` (charset `[A-Za-z0-9_-]`, 1–128 chars). Same key + same payload = cached result; same key + different payload = `idempotency_conflict` error. `dryRun` bypasses the cache.
|
|
87
|
+
|
|
88
|
+
Removed in v2.0.0:
|
|
89
|
+
- `genexus_batch_read` → use `genexus_read` with `targets[]`.
|
|
90
|
+
- `genexus_batch_edit` → use `genexus_edit` with `targets[]`.
|
|
91
|
+
- `genexus_edit` `changes` arg → use `targets[]`.
|
|
92
|
+
- Calling a removed tool returns `-32601` with `error.data.replacedBy` and `error.data.argHint` for self-correction. `initialize` advertises `_meta.removedTools` upfront.
|
|
77
93
|
|
|
78
94
|
## Timeout and Long-Running Operations
|
|
79
95
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genexus-mcp",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"description": "GeneXus 18 MCP server — read, edit, and analyze GeneXus knowledge base objects (transactions, web panels, procedures, SDTs) directly from Claude, Cursor, and other AI agents over the Model Context Protocol.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"mcp-server",
|
|
8
|
+
"model-context-protocol",
|
|
9
|
+
"genexus",
|
|
10
|
+
"genexus-18",
|
|
11
|
+
"genexus18",
|
|
12
|
+
"claude",
|
|
13
|
+
"claude-desktop",
|
|
14
|
+
"claude-code",
|
|
15
|
+
"cursor",
|
|
16
|
+
"anthropic",
|
|
17
|
+
"ai",
|
|
18
|
+
"ai-agent",
|
|
19
|
+
"ai-agents",
|
|
20
|
+
"ai-tools",
|
|
21
|
+
"llm",
|
|
22
|
+
"llm-tools",
|
|
23
|
+
"low-code",
|
|
24
|
+
"code-generation",
|
|
25
|
+
"knowledge-base",
|
|
26
|
+
"developer-tools",
|
|
27
|
+
"axi",
|
|
28
|
+
"sdk",
|
|
29
|
+
"automation"
|
|
30
|
+
],
|
|
5
31
|
"scripts": {
|
|
6
32
|
"test": "node --test cli/run.test.js",
|
|
7
33
|
"prepack": "node scripts/clean-package.js"
|