Connects Claude and other MCP clients directly to the GeneXus 18 SDK so you can read, edit, and refactor objects in a live Knowledge Base without leaving your AI chat. Point it at your KB folder and GeneXus install path, then ask the agent to list transactions by attribute, add validation rules, rename variables in procedures, or modify WorkWithPlus patterns including layout and theming. Windows only, requires GeneXus 18 and Node.js 18+. Ships with an installer that auto-configures Claude Desktop, Cursor, and other detected clients, plus a corporate install script that extracts binaries to a stable path for environments with ASR policies. Useful if you spend time in GeneXus and want to prototype or audit KB changes conversationally before opening the IDE.
¿Hablás español? → Guía de inicio en español Fala português? → Guia de início em português Stuck? → Troubleshooting guide
GeneXus MCP Server lets AI agents — Claude Desktop, Claude Code, Cursor, Antigravity, and any MCP-compatible client — read, edit, analyze, and refactor objects inside a GeneXus 18 Knowledge Base. It talks to the native GeneXus SDK, so the agent works with the real KB, not a copy or a parsed approximation.
In practice: you point the MCP at your KB, then ask your AI assistant things like "list all transactions with attribute CustomerId", "add a rule to the Order transaction that validates the total", or "refactor this procedure to use the new SDT" — and it does it.
Before you start, make sure you have:
C:\Program Files (x86)\GeneXus\GeneXus18)node --version in a terminal; install from nodejs.org if missingYou do not need to clone this repo or install anything globally — npx handles it.
Never used a terminal before? Press Win+R, type powershell, hit Enter. That's your terminal.
Before running the installer, note these down:
GeneXus.exe lives. Usually C:\Program Files (x86)\GeneXus\GeneXus18..gx file and subfolders like Model/, WebSpa/).Not sure where your KB lives? Open it in GeneXus and check the title bar, or look in File → Recent.
Open a terminal and run, replacing the paths with your KB folder and your GeneXus install:
npx genexus-mcp@latest init --kb "C:\KBs\YourKB" --gx "C:\Program Files (x86)\GeneXus\GeneXus18"
Prefer the wizard? Run
npx genexus-mcp@latest init --interactiveand answer the prompts.
What you'll see (takes ~30 seconds first time, faster on re-runs):
npx downloads the package.🎉 You are all set!.Step 1 auto-registers with Claude Desktop, Claude Code, Cursor, and Antigravity when it detects them. If yours wasn't detected, copy the JSON snippet from Step 1 into your client's MCP config manually. See the client setup guide if unsure where that file lives.
This part trips most people: fully close your AI client and reopen it. Not just the window — the whole process.
Then paste this prompt:
"Using the GeneXus MCP, list the first 5 objects in my KB and show name + type."
What should happen:
genexus_list_objects tool (some UIs show "calling tool…").If you get a list back — you're done. Skip to What can I ask the AI? for ideas.
If the AI says it doesn't have a GeneXus tool, or nothing happens, go to Troubleshooting — most issues are covered there.
If you'd rather not run anything in the terminal yourself, paste this into your AI chat:
Please configure the GeneXus MCP server. Run
npx genexus-mcp@latest init --kb "<MY_KB_PATH>" --gx "<MY_GENEXUS_PATH>"in the terminal. If I haven't told you my GeneXus path and KB path yet, ask me first. Once it succeeds, read the JSON block it printed and add it to my MCP client config. Tell me when I should restart the client to start using GeneXus tools.
Replace the placeholders or let the AI ask you for them.
If your machine has Microsoft Defender ASR, SmartScreen, or another endpoint policy blocking unsigned binaries, the default npx flow is painful — npx caches the package under %LOCALAPPDATA%\npm-cache\_npx\<hash>\..., and the <hash> changes per version, so IT can't whitelist a stable path without a wildcard over the whole npm cache (which is too broad).
Use the corporate installer instead. It extracts the binaries to a stable directory and registers the AI clients to launch the gateway directly from there — npx is never on the runtime path.
# One-liner — installs latest release, registers AI clients
iex (irm https://raw.githubusercontent.com/lennix1337/Genexus18MCP/main/scripts/install.ps1)
# With explicit KB and GeneXus paths
$s = irm https://raw.githubusercontent.com/lennix1337/Genexus18MCP/main/scripts/install.ps1
& ([scriptblock]::Create($s)) -Kb "C:\KBs\MyKB" -Gx "C:\Program Files (x86)\GeneXus\GeneXus18"
Install location:
C:\Tools\GenexusMCP\%LOCALAPPDATA%\Programs\GenexusMCP\Paths to give to IT for the ASR / Defender exclusion list:
<InstallDir>\GxMcp.Gateway.exe
<InstallDir>\worker\GxMcp.Worker.exe
Re-run the same one-liner later to upgrade — it detects the installed version (version.txt in the install dir) and downloads only if a newer release is available. Use -Force to reinstall the same version, -Version v2.3.0 to pin a specific tag, -NoClient to skip AI client registration. Node.js 18+ must be installed for client registration; without it the script still extracts the binaries but you'll need to edit the client config (claude_desktop_config.json etc.) manually.
Once installed, here's what unlocks. Try these as your first prompts:
Exploration
Editing
WorkWithPlus pattern editing (full structural + theming control)
Analysis
Build & lifecycle
The agent picks the right tool from the 30+ tools the MCP exposes (read, edit, refactor, analyze, build, layout automation, history, SQL preview, etc.). The full tool list is in Tool Surface below.
Auto-detected and auto-configured by the installer:
| Client | Auto-config | Notes |
|---|---|---|
| Claude Desktop | ✅ | Restart required after install |
| Claude Code (CLI) | ✅ | Reload session |
| Cursor | ✅ | Restart required |
| Antigravity | ✅ | Restart required; detected even before its MCP config exists |
| Gemini CLI | ✅ | — |
| OpenCode (CLI) | ✅ | Reads opencode.json / opencode.jsonc |
| Codex CLI | ✅ | Writes ~/.codex/config.toml |
| VS Code / VS Code Insiders | ✅ | Native MCP (User/mcp.json); restart required |
| OpenCode Desktop | Detect-only | Reported as installed; add the server from the app's settings |
| Any MCP client | Manual | Use the JSON snippet printed by init |
Run npx genexus-mcp clients at any time to see which agents are installed, which have genexus registered, and whether any point at a stale gateway exe. To (re)register specific ones: npx genexus-mcp clients add --clients antigravity,vscode.
First stop for any "the agent doesn't see GeneXus" problem: npx genexus-mcp clients (is it registered? does it point at a gateway exe that still exists?) and npx genexus-mcp doctor --mcp-smoke.
Most install issues fall into a handful of buckets — see TROUBLESHOOTING.md for fixes:
%LOCALAPPDATA%\GenexusMCP\Still stuck? Open an issue with the output of npx genexus-mcp doctor --mcp-smoke.
The worker exposes these tool families to the MCP router. (Detailed schemas in GEMINI.md.)
genexus_query, genexus_read, genexus_inspect, genexus_list_objects, genexus_propertiesgenexus_edit, genexus_create_object, genexus_delete_object, genexus_refactor, genexus_forge, genexus_add_variablegenexus_analyze (modes: linter, navigation, hierarchy, impact, data_context, ui_context, pattern_metadata, summary, explain), genexus_inject_context, genexus_doc, genexus_search_sourcegenexus_asset, genexus_export_object, genexus_import_objectgenexus_history, genexus_sql (action=ddl or action=navigation), genexus_structuregenexus_lifecycle, genexus_test, genexus_formatgenexus_layout (get_tree, find_controls, set_property, rename_printblock, add_printblock, get_preview, …)genexus_kb (list, open, close, set_default) for multi-KB parallel workPatternInstance and PatternVirtual parts via genexus_read / genexus_edit. Supports the entire pattern XML surface: containers (<table>, groups), controls (<textBlock>, <errorViewer>, <attribute>, <gridAttribute>, <filterAttribute>), actions (<standardAction>, <userAction>), grids, orders, rules, and event blocks. Both Transaction and Selection views are addressable independently (XPath /instance/transaction/... vs /instance/level/selection/...).Documentation (rich text / markdown) and Help (HTML) are now first-class write targets via genexus_edit (fixed in v2.4.4 — both parts had a silent no-op bug previously).themeClass, buttonClass, groupThemeClass, cellThemeClass, etc) so generated screens use the KB's design system. Discover the available classes with genexus_list_objects --typeFilter ThemeClass --nameFilter <Button|TextBlock|Title> and apply them in the pattern XML.Multi-KB (v2.3.0+): every non-meta tool takes an optional
kbargument (alias or absolute path). The gateway can hold up toServer.MaxOpenKbs(default 3) KBs open at once, each in its own Worker process — calls to different KBs run truly in parallel. See Advanced Configuration for theKBs[]schema.
Edit modes (genexus_edit): full (whole-part replacement, default), patch (Replace/Insert_After/Append over a context anchor — works on source code AND pattern XML), ops (typed semantic ops like set_attribute, add_rule for source-bearing parts).
Pattern XML auto-reconcile: WorkWithPlus encodes IDE rendering order in a per-parent childrenOrderedList attribute. The MCP now rebuilds (and creates if missing) every list from the actual XML child order on each write — callers only describe where an element goes in the tree and the MCP makes the IDE render it there. The response includes a childrenOrderedListReconciliation block listing each (re)written parent plus any structural elements that couldn't be inferred safely.
Safe by default: all write tools accept dryRun: true (returns a preview without mutating the KB) and idempotencyKey (safe retries; concurrent calls coalesce, results cached 15 min).
WorkWithPlus patterns are XML documents that drive Transaction-and-Selection screens. The MCP exposes the entire surface so an agent can design or restructure a screen without opening the IDE:
| Capability | Tool / pattern | Status |
|---|---|---|
Read PatternInstance / PatternVirtual XML | genexus_read --part PatternInstance | ✅ |
Replace whole pattern (mode: full) | genexus_edit --mode full --part PatternInstance | ✅ verified live |
Find/replace text-style patches (mode: patch) | genexus_edit --mode patch --part PatternInstance --operation Replace | ✅ verified live |
| Add / remove / reorder structural elements (textBlock, attribute, standardAction, table-as-group, order, filterAttribute, gridAttribute, eventBlock…) | XML edit + auto-reconcile | ✅ verified live |
Theme classes (themeClass, buttonClass, groupThemeClass, cellThemeClass, format="HTML") | XML attribute on the element | ✅ verified live |
| Reorganize Transaction view (form layout, action row) | edit under /instance/transaction/... | ✅ verified live |
| Reorganize Selection view (list/grid, filters, orders) | edit under /instance/level/selection/... | ✅ verified live |
Auto-rebuild childrenOrderedList from XML order | done implicitly on every write; report under childrenOrderedListReconciliation | ✅ verified live |
Recommended workflow for a screen redesign:
genexus_list_objects --typeFilter ThemeClass --nameFilter Button — discover the actual button classes available in this KB (ButtonGreen, ButtonBlue, ButtonRed, etc — names vary per KB).genexus_read --name WorkWithPlus<Object> --part PatternInstance — get the current XML.<table isGroup="True" title="…" groupThemeClass="GroupTelaResp">, reorder buttons, add a new <standardAction>, attach buttonClass="btn ButtonGreen", etc.genexus_edit --mode full --part PatternInstance --content "<new xml>" — the MCP rewrites the part, reconciles childrenOrderedList on every container, and verifies the round-trip.Custom buttons use <userAction>, not <standardAction>. Trn_Enter / Trn_Cancel / Trn_Delete are the only registered standard actions on a WorkWithPlus transaction; any custom button (Duplicate, Audit, Export, etc.) must be a <userAction caption="…" name="…" buttonClass="btn ButtonGreen" confirm="False" />. The MCP's reconciler treats <userAction> as a peer of <standardAction> (same typeCode 17/18 by context), so they coexist in the same TableActions row and the IDE renders them side-by-side.
Things to know (orientation, not gotchas):
title on top-level groups derives from the transaction's friendly name). When "Apply this pattern on save" is enabled on the WorkWithPlus object, the engine recomputes those fields — same behavior whether you edit in the IDE or via MCP. To make a hard override stick, toggle that flag via MCP:
{ "tool": "genexus_properties",
"arguments": { "action": "set", "name": "WorkWithPlus<Object>",
"propertyName": "SDPlus_Editor_Apply_On_Save", "value": "False" } }
Accepts "True" | "False" | "Default" (Default inherits the KB-level setting). Set back to "Default" to re-enable engine recomputation. Validated live in this repo.<transaction> without a <level>, or a <standardAction> whose name isn't a registered action), the SDK rejects the save and the MCP returns the exact error so you can fix the input. The KB never ends up half-written.buttonClass, themeClass, fonts, colors) is resolved at runtime, not in the preview canvas — so even after a successful MCP write the preview pane will look generic. To verify styling: open the element in the IDE tree and check the right-hand Properties panel (the applied classes show there), or hit Run / Live Editing to see the real CSS. This is GeneXus IDE behavior, independent of how the pattern was edited.The genexus-mcp command itself is also an agent-facing CLI with token-optimized output:
genexus-mcp status # gateway/worker state
genexus-mcp doctor --mcp-smoke # health check + protocol probe
genexus-mcp tools list # list available tools
genexus-mcp config show # current resolved config
genexus-mcp layout status # native layout automation state
Global flags: --format toon|json|text · --fields f1,f2,... · --limit N · --query <text> · --quiet · --no-color.
Full contract: docs/axi_cli_contract.md. Best-practices playbook: docs/llm_cli_mcp_playbook.md.
The installer writes a config.json for you. To customize networking, timeouts, or shadow paths:
{
"Server": {
"HttpPort": 5000,
"BindAddress": "127.0.0.1",
"SessionIdleTimeoutMinutes": 10,
"WorkerIdleTimeoutMinutes": 5,
"MaxOpenKbs": 3
},
"GeneXus": {
"InstallationPath": "C:\\Program Files (x86)\\GeneXus\\GeneXus18",
"WorkerExecutable": "worker\\GxMcp.Worker.exe"
},
"Environment": {
"DefaultKb": "main",
"KBs": [
{ "alias": "main", "path": "C:\\KBs\\YourKB" },
{ "alias": "legacy", "path": "C:\\KBs\\OtherKB" }
]
}
}
Backward compatibility: old configs with a single
Environment.KBPathkeep working — the gateway auto-migrates them toKBs[]+DefaultKbat load time.
Once you declare more than one KB in Environment.KBs[], every tool accepts an optional kb argument:
// LLM example: list procedures in two KBs in parallel
{ "tool": "genexus_list_objects", "arguments": { "kb": "main", "type": "Procedure" } }
{ "tool": "genexus_list_objects", "arguments": { "kb": "legacy", "type": "Transaction" } }
Resolution rules when kb is omitted:
DefaultKb set → opens DefaultKb lazilyKB_AMBIGUOUS and you must pass kb explicitlyManage the pool at runtime:
{ "tool": "genexus_kb", "arguments": { "action": "list" } }
// → { openKbs: [{alias, path, pid, workingSetMB, idleSeconds}], maxOpenKbs, defaultKb, declaredKbs }
{ "tool": "genexus_kb", "arguments": { "action": "open", "alias": "adhoc", "path": "C:/KBs/ScratchKB" } }
{ "tool": "genexus_kb", "arguments": { "action": "close", "alias": "legacy" } }
{ "tool": "genexus_kb", "arguments": { "action": "set_default", "alias": "main" } } // persists to config.json
When the pool is full and no Worker is idle, the server returns KB_POOL_FULL — close one explicitly or raise Server.MaxOpenKbs. Each Worker carries the SDK in its own process (~200–400 MB idle, up to 1–2 GB on heavy KBs), so size the pool against available RAM.
graph LR
A[AI Client / Nexus-IDE] -->|MCP stdio or HTTP /mcp| B[Gateway .NET 8]
B -->|JSON-RPC over process boundary| C[Worker .NET Framework 4.8]
C -->|Native SDK| D[GeneXus KB]
MaxOpenKbs (default 3). Workers are spawned lazily, recycled by WorkerIdleTimeoutMinutes, and evicted LRU when the pool is full.%LOCALAPPDATA%\GenexusMCP\gateway-leases.http://127.0.0.1:5000/mcp with SSE. Header: MCP-Protocol-Version: 2025-11-25.Want to contribute or run a local dev build?
.\setup.bat — checks prerequisites, builds the C# components, and auto-registers the local build with detected AI clients..gemini/skills/)This repo ships a set of agent skills under .gemini/skills/ that any MCP-compatible client with skill support (Gemini CLI, Claude Code via plugin, etc.) can load to ground its GeneXus reasoning:
| Skill | What it gives the agent |
|---|---|
genexus-mastery | This repository's preferred MCP workflow + multi-KB usage |
genexus18-guidelines | Local engineering rules layered on top of Nexa |
nexa | Full GeneXus 18 reference set: every object type, command, type, property — imported from the official genexuslabs/genexus-skills |
frontend/chameleon-controls-library | 58 Chameleon UI component specs |
frontend/mercury-design-system | Mercury tokens, bundles, theming |
frontend/design-system-builder | Authoring custom design systems |
frontend/ui-creator | Panel/screen generation templates |
Third-party skills are Apache 2.0 (see .gemini/skills/NOTICE.md). To refresh against upstream, follow the steps in NOTICE.md.
src/nexus-ide is a lightweight, experimental VS Code extension in the repo. The installer no longer packages or installs it — VS Code is wired up as a native MCP client instead (see Supported AI clients). If you want the extension, build and install it manually:
cd src/nexus-ide; npm ci; npm run compile
npx --yes @vscode/vsce package --out nexus-ide.vsix
code --install-extension nexus-ide.vsix --force
It provides a virtual filesystem (genexus:// scheme), a KB explorer with multi-part editing, and MCP discovery commands.
.github/workflows/release.ymlmain with a package.json version bumpv<version>NPM_TOKENMIT — see LICENSE.
Search keywords: GeneXus MCP · GeneXus 18 MCP · GeneXus AI · GeneXus Claude · Model Context Protocol GeneXus · GeneXus low-code AI agent · GeneXus Cursor · GeneXus Antigravity