This file provides guidance for Claude Code when working with this repository.
If you're starting a new task, here's how contributions work in this repo:
- File an issue first — describe the bug or feature before coding. See
CONTRIBUTING.mdfor details. - Get approval — wait for maintainer sign-off before starting work.
- Create a feature branch —
feature/123-short-descriptionorfix/456-what-broke. - Use the contributor commands to stay on track:
/mxcli-dev:proposal— create a structured feature proposal (asks the right questions, investigates BSON storage)/mxcli-dev:review— review your changes against the PR checklist before pushing
- Validate locally —
make build && make test && make lintmust all pass. - Open a PR — link the issue, document Mendix Studio Pro validation, confirm agentic testing.
For the full workflow, read CONTRIBUTING.md. For the review checklist applied to every PR, see the "PR / Commit Review Checklist" section below.
ModelSDK Go is a Go library for reading and modifying Mendix application projects (.mpr files) stored locally on disk. It's a Go-native alternative to the TypeScript-based Mendix Model SDK, enabling programmatic access without cloud connectivity.
# build the CLI (preferred - uses Makefile)
make build
# run tests
make test
# format and vet code
make fmt
make vet
# run a specific example
go run ./examples/read_project/main.go /path/to/project.mpr
go run ./examples/modify_project/main.go /path/to/project.mpr
# run the code generator
go run ./cmd/codegen/main.go -reflection-dir ./reference/mendixmodellib/reflection-data -version 10.0.0 -output ./generated/metamodelNote: This project uses modernc.org/sqlite (pure Go) and does not require CGO. No C compiler is needed.
Note: The VS Code extension (vscode-mdl/) uses bun, not npm/node. Use bun install, bun run compile, etc. The Makefile targets (make vscode-ext, make vscode-install) already use bun.
The mx command-line tool validates and builds Mendix projects. Location depends on environment:
| Environment | Path |
|---|---|
| Dev container | ~/.mxcli/mxbuild/{version}/modeler/mx |
| This repo | reference/mxbuild/modeler/mx |
# Auto-download mxbuild for the project's Mendix version
mxcli setup mxbuild -p app.mpr
# check/validate a Mendix project
~/.mxcli/mxbuild/*/modeler/mx check /path/to/app.mpr
# or use the integrated command (auto-downloads mxbuild)
mxcli docker check -p app.mprModelSDKGo/
├── modelsdk.go # Main public api (open, OpenForWriting, helpers)
├── model/ # Core types: ID, QualifiedName, module, Element interface
│
├── api/ # High-level fluent api (inspired by Mendix Web Extensibility api)
│ ├── api.go # ModelAPI entry point with namespace access
│ ├── domainmodels.go # EntityBuilder, AssociationBuilder, AttributeBuilder
│ ├── enumerations.go # EnumerationBuilder
│ ├── microflows.go # MicroflowBuilder
│ ├── pages.go # PageBuilder, widget builders
│ └── modules.go # ModulesAPI
│
├── sdk/ # SDK implementation packages
│ ├── domainmodel/ # entity, attribute, association, DomainModel
│ ├── microflows/ # microflow, nanoflow, activities (60+ types)
│ ├── pages/ # page, layout, widget types (50+ widgets)
│ ├── widgets/ # Embedded widget templates for pluggable widgets
│ │ ├── loader.go # template loading with go:embed
│ │ └── templates/ # json widget type definitions by Mendix version
│ └── mpr/ # MPR file format handling
│ ├── reader.go # read-only MPR access
│ ├── writer.go # read-write MPR modification
│ ├── parser.go # BSON parsing and deserialization
│ └── utils.go # UUID generation utilities
│
├── mdl/ # MDL (Mendix Definition Language) parser & CLI
│ ├── grammar/ # ANTLR4 grammar definition
│ │ ├── MDLLexer.g4 # ANTLR4 lexer grammar (tokens)
│ │ ├── MDLParser.g4 # ANTLR4 parser grammar (rules)
│ │ └── parser/ # Generated Go parser code
│ ├── ast/ # AST node types for MDL statements
│ ├── visitor/ # ANTLR listener to build AST
│ ├── executor/ # Executes AST against modelsdk-go
│ ├── catalog/ # SQLite-based catalog for querying project metadata
│ ├── linter/ # Extensible linting framework
│ │ └── rules/ # Built-in lint rules (MPR001, MPR002, etc.)
│ └── repl/ # Interactive REPL interface
│
├── sql/ # external database connectivity (PostgreSQL, Oracle, sql Server)
│ ├── driver.go # DriverName type, ParseDriver()
│ ├── connection.go # Manager, connection, credential isolation
│ ├── config.go # DSN resolution (env vars, YAML config)
│ ├── query.go # execute() — query via database/sql
│ ├── meta.go # ShowTables(), DescribeTable() via information_schema
│ ├── format.go # table and json output formatters
│ ├── mendix.go # Mendix DB DSN builder, table/column name helpers
│ └── import.go # import pipeline: batch insert, ID generation, sequence tracking
│
├── cmd/ # Command-line tools
│ ├── mxcli/ # CLI entry point (Cobra-based)
│ └── codegen/ # Code generator CLI
│
├── internal/ # Internal packages (not exported)
│ └── codegen/ # Metamodel code generation system
│ ├── schema/ # json reflection data loading
│ ├── transform/ # transform to Go types
│ └── emit/ # Go source code generation
│
├── generated/metamodel/ # Auto-generated type definitions
├── examples/ # Usage examples
│
└── reference/ # reference materials (not Go code)
├── mendixmodellib/ # TypeScript library + reflection data
├── mendixmodelsdk/ # TypeScript SDK reference
└── mdl-grammar/ # Comprehensive MDL grammar reference
- v1: Single
.mprSQLite database file (Mendix < 10.18) - v2:
.mprmetadata +mprcontents/folder with individual documents (Mendix >= 10.18) - Format detection is automatic
CRITICAL: Mendix uses different "storage names" in BSON $type fields than the "qualified names" shown in the TypeScript SDK documentation. Using the wrong name causes TypeCacheUnknownTypeException when opening in Studio Pro.
| Qualified Name (SDK/docs) | Storage Name (BSON $Type) | Note |
|---|---|---|
| CreateObjectAction | CreateChangeAction | |
| ChangeObjectAction | ChangeAction | |
| DeleteObjectAction | DeleteAction | |
| CommitObjectsAction | CommitAction | |
| RollbackObjectAction | RollbackAction | |
| AggregateListAction | AggregateAction | |
| ListOperationAction | ListOperationsAction | |
| ShowPageAction | ShowFormAction | "Form" was original term for "Page" |
| ClosePageAction | CloseFormAction | "Form" was original term for "Page" |
When adding new types, always verify the storage name by:
- Examining existing MPR files with the
mxtool or SQLite browser - Checking the reflection data in
reference/mendixmodellib/reflection-data/ - Looking at the parser cases in
sdk/mpr/parser_microflow.go
IMPORTANT: When unsure about the correct BSON structure for a new feature, ask the user to create a working example in Mendix Studio Pro so you can compare the generated BSON against a known-good reference.
For pluggable widgets (DataGrid2, ComboBox, Gallery, etc.), templates must include both type AND object fields:
type: Widget PropertyTypes schema (defines what properties exist)object: Default WidgetObject with all property values
CE0463 "widget definition changed" error: This error occurs when the Object's property structure doesn't match the Type's PropertyTypes. Always extract templates from Studio Pro-created widgets, not programmatically generated ones. See sdk/widgets/templates/README.md for details. For debugging CE0463 and other BSON issues, follow the workflow in .claude/skills/debug-bson.md.
The MDL visitor (buildDataType in visitor_helpers.go) cannot distinguish between entity types and enumeration types for bare qualified names like Module.EntityName. Both parse as ast.TypeEnumeration with EnumRef set. Code that consumes data types must handle TypeEnumeration alongside TypeEntity and use EnumRef as a fallback for the entity name.
When generating Mendix expression strings (e.g., in expressionToString()), single quotes within string literals must be escaped by doubling them: 'it''s here'. Do NOT use backslash escaping (\'). This matches Mendix Studio Pro's expression syntax.
CRITICAL: Mendix BSON uses inverted naming for association pointers:
| BSON Field | Points To | MDL Keyword |
|---|---|---|
ParentPointer |
FROM entity (FK owner) | from Module.Child |
ChildPointer |
TO entity (referenced) | to Module.Parent |
create association Mod.Child_Parent from Mod.Child to Mod.Parent stores:
ParentPointer = Child.$ID(the FROM entity owns the foreign key)ChildPointer = Parent.$ID(the TO entity is being referenced)
This affects entity access rules: MemberAccess entries for associations must only be added to the FROM entity (the one stored in ParentPointer). Adding them to the TO entity triggers CE0066 "Entity access is out of date".
The same convention applies in domainmodel.Association: ParentID = FROM entity, ChildID = TO entity.
// read-only access
reader, err := modelsdk.Open("/path/to/project.mpr")
defer reader.Close()
// read-write access
writer, err := modelsdk.OpenForWriting("/path/to/project.mpr")
defer writer.Close()The api/ package provides a simplified, fluent API inspired by Mendix Web Extensibility Model API:
modelAPI := api.New(writer)
module, _ := modelAPI.Modules.GetModule("MyModule")
modelAPI.SetModule(module)
entity, _ := modelAPI.DomainModels.CreateEntity("Customer").
persistent().
WithStringAttribute("Name", 100).
WithIntegerAttribute("Age").
build()Available namespaces: DomainModels, enumerations, microflows, pages, modules
- Follow standard Go conventions (
go fmt,go vet) - Use descriptive names matching Mendix terminology
- Keep BSON/JSON tags consistent with Mendix serialization format
- Export types that should be part of the public API
- Use interfaces for polymorphic types (e.g.,
Element,MicroflowObject)
When reviewing pull requests or validating work before commit, verify these items:
- Fix-issue skill consulted — read
.claude/skills/fix-issue.mdbefore diagnosing; match symptom to table before opening files - Symptom table updated — new symptom/layer/file mapping added to
.claude/skills/fix-issue.mdif not already covered - Test written first — failing test exists before implementation (parser test in
sdk/mpr/, backend mutation test inmdl/backend/mpr/, executor handler test inmdl/executor/usingMockBackend)
- Check
docs/11-proposals/for existing proposals covering the same functionality - Search the codebase for existing implementations (grep for key function names, command names, types)
- Check
mdl-examples/doctype-tests/for existing test coverage of the feature area - Verify the PR doesn't re-document already-shipped features as new
New or modified MDL syntax must follow the design guidelines:
- Design skill consulted — read
.claude/skills/design-mdl-syntax.mdbefore designing syntax - Follows standard patterns — uses
create/alter/drop/show/describe, not custom verbs - Reads as English — a business analyst understands the statement on first reading
- Qualified names — uses
Module.Elementeverywhere, no implicit module context - Property format — uses
( key: value, ... )with colon separators, one per line - LLM-friendly — one example is sufficient for an LLM to generate correct variants
- Diff-friendly — adding one property is a one-line diff
New features that depend on a specific Mendix version must be version-gated:
- Registry entry — feature added to
sdk/versions/mendix-{9,10,11}.yamlwith correctmin_version - Executor pre-check —
checkFeature()called before BSON writes, with actionable error and hint - Test coverage — version-gated tests use
-- @version:directives orrequireMinVersion() - Skill updated —
.claude/skills/version-awareness.mdupdated if the feature has a workaround for older versions
All executor code must go through the backend abstraction layer — the executor must never import sdk/mpr for write paths:
- No
sdk/mprwrite imports in executor — executor files must not callsdk/mprwriter/parser types directly; usectx.Backend.*instead - New backend methods on the interface — any new data access or mutation goes in the appropriate interface in
mdl/backend/(e.g.,DomainModelBackend,MicroflowBackend), not as a direct SDK call - MPR implementation in
mdl/backend/mpr/— the concrete implementation lives here; all BSON/reader/writer logic stays in this package - Mock stub in
mdl/backend/mock/— every new backend method has aFunc-field stub with a descriptive"MockBackend.X not configured"error default (notnil, nil) - Compile-time interface check — new backend implementations have
var _ backend.SomeInterface = (*impl)(nil) - ALTER operations use mutator pattern — page/workflow mutations go through
ctx.Backend.OpenPageForMutation()/OpenWorkflowForMutation(), not inline BSON construction - New shared types in
mdl/types/— types used by bothmdl/andsdk/mprgo inmdl/types/;sdk/mprre-exports as type aliases (type Foo = types.Foo), never as duplicate definitions - Map iteration is deterministic — any map iterated for serialization output must sort keys first (
sort.Strings(keys)pattern); non-deterministic output causes flaky diffs and BSON instability - Pluggable widgets via WidgetEngine — new pluggable widget support uses
.def.json+WidgetRegistry; no hardcoded BSON widget builders in the executor
New MDL commands or language features must be wired through the full pipeline:
- Grammar — rule added to
MDLParser.g4(andMDLLexer.g4if new tokens) - Parser regenerated —
make grammarrun, generated files committed - AST — node type added in
mdl/ast/ - Visitor — ANTLR listener bridges parse tree to AST in
mdl/visitor/ - Executor — thin handler in
mdl/executor/dispatches toctx.Backend.*; no BSON in the handler - Backend method — data access or mutation wired through
mdl/backend/interface and implemented inmdl/backend/mpr/ - LSP — if the feature adds formatting, diagnostics, or navigation targets, wire it into
cmd/mxcli/lsp.goand register the capability - DESCRIBE roundtrip — if the feature creates artifacts,
describeshould output re-executable MDL - VS Code extension — if new LSP capabilities are added, update
vscode-mdl/package.json
- New packages have test files
- New executor commands have MDL examples in
mdl-examples/doctype-tests/ - MDL syntax changes — any PR that adds or modifies MDL syntax must include working examples in
mdl-examples/doctype-tests/ - Bug fixes — every bug fix should include an MDL test script in
mdl-examples/bug-tests/that reproduces the issue, so the fix can be verified in Studio Pro if applicable - Integration paths (not just helpers) are tested
- Tests don't rely on
time.Sleepfor synchronization — use channels or polling with timeout
- Unix sockets use restrictive permissions (
os.Chmod(path, 0600)) - File I/O is not in hot paths (event loops, per-keystroke handlers) — cache in memory
- No silent side effects on typos (e.g., auto-creating resources on misspelled names should be flagged)
- Method receivers are correct (pointer vs value) for mutations
- Each commit does one thing — a feature, a bugfix, or a refactor, not a mix
- Each PR is scoped to a single feature or concern — if the description needs "and" between unrelated items, split it
- Independent features (e.g., a new command, a formatter, UX improvements) go in separate PRs even if developed together
- Refactors that touch many files (e.g., renaming a helper across executors) are their own commit, not bundled with feature work
- Skills — new features documented in
.claude/skills/(syntax, examples, gotchas) - CLI help —
mxclicommand help text updated (CobraShort/long/Examplefields) - Syntax reference —
docs/01-project/MDL_QUICK_REFERENCE.mdupdated with new statement syntax - MDL examples — working examples added to
mdl-examples/for new commands - Site docs —
docs-site/src/pages added or updated for user-facing features
- Refactors are applied consistently across all relevant files (grep for the old pattern)
- Manually maintained lists (keyword lists, type mappings) are flagged as maintenance risks
- Design docs match the actual implementation — remove or update stale plans
- Numeric type conversions are bounds-checked —
float64→intcasts need overflow guards (±2^53for safe integer range); silent overflow produces garbage in serialized output -
convert.goupdated when structs inmdl/types/gain or lose fields —TestFieldCountDriftwill catch this at test time, butconvert.gomust be updated before merging
modernc.org/sqlite- Pure Go SQLite driver (no CGO required)go.mongodb.org/mongo-driver- BSON parsing for Mendix document formatgithub.com/jackc/pgx/v5- PostgreSQL driver for external SQL connectivitygithub.com/sijms/go-ora/v2- Oracle driver for external SQL connectivitygithub.com/microsoft/go-mssqldb- SQL Server driver for external SQL connectivity
The mxcli command-line tool allows reading and modifying Mendix projects using MDL (Mendix Definition Language), a SQL-like syntax.
# build the CLI
go build -o bin/mxcli ./cmd/mxcli
# run interactive REPL
./bin/mxcli
# execute commands directly
./bin/mxcli -p /path/to/app.mpr -c "show entities"
# execute MDL script file
./bin/mxcli exec script.mdl -p /path/to/app.mpr
# check MDL syntax (no project needed)
./bin/mxcli check script.mdl
# check syntax and validate references
./bin/mxcli check script.mdl -p app.mpr --references| Feature | Commands | Details |
|---|---|---|
| Project structure | show structure [depth 1|2|3] [in module] [all] |
Compact overview at 3 depth levels |
| Catalog queries | show catalog tables, select ... from CATALOG.table |
SQL querying of project metadata |
| Code search | show callers|callees|references|impact|context of ... |
Cross-reference navigation (requires refresh catalog full) |
| Full-text search | search 'keyword' |
Search across all strings and source |
| Linting | mxcli lint -p app.mpr [--format json|sarif] |
14 built-in rules + 27 Starlark rules (MDL, SEC, QUAL, ARCH, DESIGN, CONV) |
| Report | mxcli report -p app.mpr [--format markdown|json|html] |
Scored best practices report with category breakdown |
| Testing | mxcli test tests/ -p app.mpr |
.test.mdl / .test.md files, requires Docker |
| Diff | mxcli diff -p app.mpr changes.mdl |
Compare script against project state |
| Diff local | mxcli diff-local -p app.mpr --ref head |
Git diff for MPR v2 projects |
| Diff revisions | mxcli diff-local -p app.mpr --ref main..feature |
Compare two arbitrary git revisions |
| OQL | mxcli oql -p app.mpr "select ..." |
Query running Mendix runtime |
| Widgets | show widgets, update widgets set ... |
Widget discovery and bulk updates (experimental) |
| External SQL | sql connect, sql <alias> select ..., mxcli sql |
Direct SQL queries against PostgreSQL, Oracle, SQL Server (credential isolation) |
| Data import | import from <alias> query '...' into Module.Entity map (...) |
Import from external DB into Mendix app PostgreSQL (batch insert with ID generation) |
| Connector gen | sql <alias> generate connector into <module> [tables (...)] [views (...)] [exec] |
Auto-generate Database Connector MDL from discovered schema |
| Diagnostics | mxcli diag [--bundle] |
Session logs, version info, bug report bundles |
| New project | mxcli new <name> --version X.Y.Z [--output-dir dir] |
Downloads mxbuild, creates blank project, runs init, installs Linux mxcli for devcontainer |
| Setup mxcli | mxcli setup mxcli [--os linux] [--arch amd64] [--output ./mxcli] |
Download platform-specific mxcli binary from GitHub releases |
mxcli new creates a complete Mendix project from scratch in one step:
mxcli new MyApp --version 11.8.0
mxcli new MyApp --version 10.24.0 --output-dir ./projects/my-appSteps performed: downloads MxBuild → mx create-project → mxcli init → downloads correct Linux mxcli binary for devcontainer. The result is a ready-to-open project with .devcontainer/, AI tooling, and a working ./mxcli binary.
Commands in .claude/commands/ are organised by audience:
| Namespace | Folder | Invoked as | Purpose |
|---|---|---|---|
mendix: |
.claude/commands/mendix/ |
/mendix:lint |
mxcli user commands — synced to Mendix projects via mxcli init |
mxcli-dev: |
.claude/commands/mxcli-dev/ |
/mxcli-dev:review |
Contributor commands — this repo only, never synced to user projects |
Both namespaces are discoverable by typing /mxcli in Claude Code. Add new contributor tooling (review workflows, debugging helpers, etc.) under mxcli-dev/. Add commands intended for Mendix project users under mendix/.
mxcli init creates a .claude/ folder with skills, commands, CLAUDE.md, and VS Code MDL extension in a target Mendix project. Source of truth for synced assets:
- Skills:
reference/mendix-repl/templates/.claude/skills/ - Commands:
.claude/commands/mendix/(themxcli-dev/folder is not synced) - VS Code extension:
vscode-mdl/vscode-mdl-*.vsix
Build-time sync: make build syncs everything automatically. Individual targets: make sync-skills, make sync-commands, make sync-vsix.
The vscode-mdl extension provides MDL language support: syntax highlighting, parse/semantic diagnostics, completion, symbols, folding, hover, go-to-definition, clickable terminal links, and context menu commands. The extension spawns mxcli lsp --stdio as the language server. Build with make vscode-ext (requires bun).
Regenerate after modifying MDLLexer.g4 or MDLParser.g4: make grammar. See docs/03-development/MDL_PARSER_ARCHITECTURE.md for design details.
Read the relevant skill files FIRST before writing any MDL, seeding data, or doing database/import work:
.claude/skills/version-awareness.md- CHECK project version first - Runshow featuresbefore using version-gated syntax.claude/skills/design-mdl-syntax.md- READ before designing new MDL syntax - Design principles, decision framework, anti-patterns, checklist.claude/skills/write-microflows.md- Microflow syntax, common mistakes, validation checklist.claude/skills/create-page.md- Page/widget syntax reference.claude/skills/alter-page.md- ALTER PAGE/SNIPPET in-place modifications (SET, INSERT, DROP, REPLACE, SET Layout).claude/skills/overview-pages.md- CRUD page patterns.claude/skills/master-detail-pages.md- Master-detail page patterns.claude/skills/generate-domain-model.md- Entity/Association syntax.claude/skills/check-syntax.md- Pre-flight validation checklist.claude/skills/organize-project.md- Folders, MOVE command, project structure conventions.claude/skills/manage-security.md- Security roles, access control, GRANT/REVOKE patterns.claude/skills/manage-navigation.md- Navigation profiles, home pages, menus, login pages.claude/skills/demo-data.md- READ for any database/import work - Mendix ID system, association storage, demo data insertion.claude/skills/xpath-constraints.md- XPath syntax in WHERE clauses, association paths, nested predicates, functions.claude/skills/database-connections.md- External database connections from microflows.claude/skills/test-microflows.md- READ for testing work - Test annotations, file formats, Docker setup requirement
These rules apply whenever generating microflow MDL. Violations are caught by mxcli check.
- NEVER create empty list variables as loop sources. If processing imported data, accept the list as a microflow parameter —
declare $Items list of ... = emptyfollowed byloop $item in $Itemsis always wrong. - NEVER use nested LOOPs for list matching. Loop over the primary list and use
retrieve $match from $TargetList where key = $item/key limit 1for O(N) lookup. Nested loops are O(N^2). - Use append logic when merging, not overwrite:
$Existing/Field + '\n' + $New/Fieldinside anif $New/Field != emptyguard. - Read
.claude/skills/patterns-data-processing.mdfor delta merge, batch processing, and list operation patterns.
Always validate before presenting to user:
./bin/mxcli check script.mdl # Syntax + anti-pattern check
./bin/mxcli check script.mdl -p app.mpr --references # With reference validationFull syntax tables for all MDL statements (microflows, pages, security, navigation, settings, business events, ALTER PAGE, reserved words) are in docs/01-project/MDL_QUICK_REFERENCE.md.
Implemented:
- MPR v1/v2 reading and writing
- Domain model (entities, attributes, associations)
- ALTER ENTITY (add/rename/modify/drop attributes, indexes, documentation)
- Microflows/Nanoflows with 60+ activity types
- Pages with 50+ widget types
- ALTER PAGE/SNIPPET (SET, INSERT, DROP, REPLACE operations on widget trees)
- Image widgets (IMAGE, STATICIMAGE, DYNAMICIMAGE) with Width/Height properties
- Code generator for metamodel types
- MDL CLI (
mxcli) with ANTLR4 parser - MDL support for domain model, microflows, pages, and security
- Security management (module roles, user roles, access control, demo users)
- High-level fluent API (
api/package) for simplified model manipulation - LSP server with hover, go-to-definition, completion, diagnostics, symbols, folding
- VS Code extension (
vscode-mdl) with context menu commands (Run/Check/Selection) - Docker build integration (
mxcli docker build) with PAD patching (Phase 1) - OQL query execution against running runtime (
mxcli oql) - Business event services (SHOW/DESCRIBE/CREATE/DROP)
- Project settings (SHOW/DESCRIBE/ALTER)
- External SQL query execution against PostgreSQL, Oracle, SQL Server (
mxcli sql, MDLsql connect/query) - Data import from external databases into Mendix app DB (
import from ... into ... map ...) - Database Connector generation from external schema (
sql <alias> generate connector into <module>) - EXECUTE DATABASE QUERY microflow action (static, dynamic SQL, parameterized, runtime connection override)
- CREATE/DROP WORKFLOW with user tasks, decisions, parallel splits, and other activity types
- ALTER WORKFLOW (SET properties, INSERT/DROP/REPLACE activities, outcomes, paths, conditions, boundary events)
- CALCULATED BY microflow syntax for calculated attributes
- Image collections (SHOW/DESCRIBE/CREATE/DROP)
- AI agent documents: Model, Knowledge Base, Consumed MCP Service, Agent (LIST/DESCRIBE/CREATE/DROP, with variables, tools, KB tools, dollar-quoted multi-line prompts; requires AgentEditorCommons module, Mendix 11.9+)
- OData contract browsing (SHOW/DESCRIBE CONTRACT ENTITIES/ACTIONS FROM cached $metadata)
- AsyncAPI contract browsing (SHOW/DESCRIBE CONTRACT CHANNELS/MESSAGES FROM cached AsyncAPI)
- SHOW EXTERNAL ACTIONS, SHOW PUBLISHED REST SERVICES
- CREATE/DROP/DESCRIBE PUBLISHED REST SERVICE with resources, operations, path params, CREATE OR REPLACE
- Integration catalog tables (rest_clients, rest_operations, published_rest_services, external_entities, external_actions, business_events)
- Contract catalog tables (contract_entities, contract_actions, contract_messages — parsed from cached $metadata and AsyncAPI)
- Platform authentication (
mxcli auth login/logout/status/list) with PAT scheme for marketplace-api.mendix.com and catalog.mendix.com; credentials stored at ~/.mxcli/auth.json (mode 0600), MENDIX_PAT env override - Marketplace browsing (
mxcli marketplace search/info/versions) with --min-mendix compatibility filtering; install blocked upstream (API does not expose download URLs)
Not Yet Implemented:
- 47 of 52 metamodel domains (REST, etc.)
- Delta/change tracking system
- Runtime type reflection
README.md- User documentation and API referenceapi/api.go- High-level fluent API entry pointapi/domainmodels.go- Entity/Association/Attribute buildersdocs/SDK_EQUIVALENCE.md- Detailed comparison with TypeScript SDK, gap analysissdk/mpr/parser.go- BSON parsing logic (complex, handles polymorphic types)sdk/mpr/writer_widgets.go- Widget BSON serializationsdk/widgets/templates/- Embedded widget templates for pluggable widgets (ComboBox, DataGrid2, etc.)sdk/widgets/templates/README.md- Critical: Template extraction requirements (must include bothtypeANDobject)generated/metamodel/enums.go- All Mendix enumeration typesmdl/grammar/MDL.g4- ANTLR4 grammar for MDL syntax (production)mdl/executor/executor.go- MDL statement execution logicreference/mdl-grammar/- Comprehensive MDL grammar referencereference/mendixmodellib/reflection-data/- Type definitions with storage names and default valuesdocs/03-development/MDL_PARSER_ARCHITECTURE.md- ANTLR4 parser design documentationdocs/03-development/PAGE_BSON_SERIALIZATION.md- Page/widget BSON format, type mappings, required defaults.claude/skills/debug-bson.md- Workflow for debugging BSON serialization issues withmxtoolcmd/mxcli/lsp.go- LSP server implementation (hover, definition, diagnostics, completion, symbols)cmd/mxcli/init.go-mxcli initcommand (project initialization + VS Code extension install)cmd/mxcli/docker/oql.go- OQL query execution against running Mendix runtime via M2EE admin APIsql/connection.go- External SQL connection manager (credential isolation)sql/config.go- DSN resolution (env vars, YAML config)sql/import.go- IMPORT pipeline (batch insert, Mendix ID generation, sequence tracking)sql/generate.go- Database Connector MDL generation from external schemasql/typemap.go- SQL → Mendix type mapping, DSN → JDBC URL conversionsql/mendix.go- Mendix DB helpers (DSN builder, table/column name conversion)cmd/mxcli/cmd_sql.go-mxcli sqlCLI subcommandmdl/executor/cmd_sql.go- SQL statement executor handlersmdl/executor/cmd_import.go- IMPORT statement executor (auto-connects to Mendix DB)vscode-mdl/src/extension.ts- VS Code extension entry pointvscode-mdl/package.json- VS Code extension manifest (commands, menus, settings)