A self-learning, auto-researching MCP server that gives AI assistants deep Mendix expertise and grows smarter with every interaction.
# Install globally
npm install -g @jordnlvr/mendix-mcp-server
# Or use with npx (no install needed)
npx @jordnlvr/mendix-mcp-server๐ Full Documentation: jordnlvr.github.io/mendix-mcp-server
- GitHub Action runs every Monday at 3AM UTC
- Crawls
releaseNotes,studioProGuide, andrefGuidefrom docs.mendix.com - Auto-commits fresh knowledge - your AI assistant stays current!
- Manual trigger available via GitHub Actions UI
- Disk-cached embeddings - Cache persists to
data/embedding-cache.json - Server restarts 3-5x faster with warm cache
- Graceful shutdown saves cache automatically
GET /harvest-status- Check harvest schedule and last run timePOST /harvest- Trigger manual harvest (sources: releaseNotes, studioProGuide, etc.)POST /knowledge-gap- Report missing knowledge for future harvesting
See CHANGELOG.md for full release history.
This is a Model Context Protocol (MCP) server that supercharges AI assistants (like GitHub Copilot, Claude, ChatGPT) with:
- Deep Mendix Knowledge - 700KB+ of curated entries about SDK patterns, best practices, troubleshooting
- Semantic Vector Search - Pinecone + Azure OpenAI/OpenAI embeddings for meaning-based search
- Self-Learning - Every discovery gets saved to the knowledge base automatically
- Auto-Harvesting - Scheduled crawls of docs.mendix.com for fresh content
- Project & Theme Analysis - Analyze
.mprfiles AND custom themes with grades (A+ to F) - Beast Mode - Exhaustive 5-tier research protocol when answers aren't in the knowledge base
- Analytics Dashboard - Visual dashboard showing usage patterns and popular topics
- Studio Pro Extensions - Complete guide for building C# extensions for Studio Pro 11+
Think of it as giving your AI assistant a Mendix expert's brain that keeps getting smarter.
| Feature | Description |
|---|---|
| ๐ Intelligent Search | TF-IDF with fuzzy matching - typos like "micorflow" still find "microflow" |
| ๐ฎ Vector Search | Semantic search using Pinecone - find concepts, not just keywords |
| ๐ฏ Hybrid Search | Combined keyword + semantic search for best of both worlds |
| ๐ง Self-Learning | Automatically grows smarter as you add knowledge |
| ๐ฌ Beast Mode | 5-tier research protocol - docs, GitHub, npm, forums, archives |
| ๐ Analytics Dashboard | Visual HTML dashboard at /dashboard endpoint |
| ๐จ Theme Analyzer v2.0 | Web-focused, follows @imports, CSS custom properties, letter grades |
| ๐ง Auto-Maintenance | Scheduled harvesting, validation, staleness detection, cache cleanup |
| ๐ Project Analysis | Analyze any .mpr file - discover modules, entities, microflows |
| ๐งฉ Studio Pro Extensions | Build C# extensions for Studio Pro 11+ with verified patterns |
| ๐ Zero Config | Built-in Pinecone key - works out of the box, no API keys required! |
This is the magic. When the knowledge base doesn't have an answer, the AI is instructed to search through 5 tiers exhaustively:
- docs.mendix.com, API references, Academy, Marketplace
- Release notes (version-specific changes)
- GitHub mendix org - sdk-demo (GOLDMINE!), widgets-resources, docs repo
- GitHub Code Search - Find real implementations across ALL repos
- npm packages - Search
mendixmodelsdk,mendixplatformsdk,@mendix/*
- Mendix Forum (community.mendix.com)
- Stack Overflow ([mendix] tag)
- GitHub Issues & Discussions
- Reddit (r/mendix, r/lowcode)
- Dev.to, Medium, LinkedIn articles
- Wayback Machine (web.archive.org) - Old/removed docs
- archive.today (archive.ph) - Preserved pages
- Google Cache - Recently cached versions
- YouTube (Mendix Official, Mendix World talks)
- LinkedIn Learning courses
Results are graded by version compatibility:
- ๐ข Exact - Same Mendix version
- ๐ก Close - Same major version (10.x matches 10.y)
- ๐ Relevant - Different major but concept applies
- โช Legacy - Old but useful for understanding
After finding ANY information:
- โ Automatically saves to knowledge base
- โ Re-indexes keyword search
- โ Updates vector embeddings for semantic search
The knowledge base grows every time you use it!
See docs/RESEARCH-PROTOCOL.md for the full protocol.
git clone https://github.com/jordnlvr/mendix-mcp-server.git
cd mendix-mcp-server
npm installVS Code (Copilot Chat)
Add to your VS Code settings.json:
"chat.mcp.servers": {
"mendix-expert": {
"type": "stdio",
"command": "node",
"args": ["C:/path/to/mendix-mcp-server/src/index.js"]
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"mendix-expert": {
"command": "node",
"args": ["C:/path/to/mendix-mcp-server/src/index.js"]
}
}
}In your AI chat:
@mendix-expert- Ask about Mendix development- "How do I create a microflow with the SDK?"
- "Analyze my project at D:/Projects/MyApp.mpr"
Want to use Mendix Expert from ChatGPT Custom GPTs, web apps, or other tools? The REST API exposes all functionality over HTTP.
# Using npm script
npm run rest
# Or directly
node src/rest-proxy.jsServer runs at http://localhost:5050
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check and status |
/status |
GET | Server status with example queries |
/tools |
GET | List all available endpoints |
/dashboard |
GET | ๐ Visual analytics dashboard (HTML) |
/beast-mode |
GET | ๐ฅ Get Beast Mode research protocol |
/analytics |
GET | Usage analytics and statistics (JSON) |
/harvest-status |
GET | ๐พ Check harvest schedule & status |
/query |
POST | Query knowledge base |
/search |
POST | Hybrid search (keyword + semantic) |
/best-practice |
POST | Get best practice recommendations |
/analyze |
POST | Analyze Mendix project |
/analyze-theme |
POST | ๐จ Deep theme analysis with grading |
/harvest |
POST | ๐พ Trigger manual harvest |
/knowledge-gap |
POST | ๐ Report missing knowledge |
# Health check
curl http://localhost:5050/health
# Search for entity creation
curl -X POST http://localhost:5050/search \
-H "Content-Type: application/json" \
-d '{"query":"how to create entity SDK","limit":5}'
# Get best practices
curl -X POST http://localhost:5050/best-practice \
-H "Content-Type: application/json" \
-d '{"scenario":"microflow error handling"}'Make Mendix Expert available as a ChatGPT Custom GPT with public internet access:
# One command to start REST server + ngrok tunnel
.\start-chatgpt-api.ps1
# Check status anytime
.\check-api-status.ps1Full setup guide: docs/CHATGPT-SETUP.md
Quick steps:
- Run
.\start-chatgpt-api.ps1- starts server and shows public URL - Create a Custom GPT at chat.openai.com
- Go to Configure โ Actions โ Import from URL
- Enter:
https://YOUR-NGROK-URL.ngrok-free.app/openapi.json - Copy the system prompt from docs/CHATGPT-SETUP.md
Note: Free ngrok URLs change on restart. Keep the script running or consider ngrok's paid tier for a stable URL.
| Tool | Description |
|---|---|
query_mendix_knowledge |
Search the knowledge base for any Mendix topic |
analyze_project |
Analyze a .mpr file or extracted project directory |
analyze_theme |
๐จ NEW! Deep theme analysis with grading (A+ to F) |
get_best_practice |
Get recommendations for specific scenarios |
add_to_knowledge_base |
Contribute new knowledge (auto quality scoring) |
sync_mcp_server |
Sync with GitHub (pull updates, push changes) |
harvest |
๐พ Crawl Mendix docs for fresh knowledge |
harvest_status |
Check harvest status and available sources |
hello |
Get a welcome screen with status and examples |
beast_mode |
๐ฅ Get the exhaustive research protocol prompt |
vector_search |
๐ฎ Semantic search - find concepts |
hybrid_search |
๐ฏ Combined keyword + semantic search |
vector_status |
Check Pinecone index and search stats |
reindex_vectors |
Re-index knowledge for vector search |
get_usage_analytics |
๐ View usage stats, popular topics, trends |
The server includes an aggressive, exhaustive research protocol that ensures AI assistants never give up when searching for Mendix answers.
When enabled (it's embedded in every query!), Beast Mode mandates:
- 6-Tier Exhaustive Search - Official docs โ GitHub code โ npm packages โ Community โ Archives โ Obscure sources
- Never Give Up - Search ALL tiers before saying "I don't know"
- Version Awareness - Always verify Mendix version compatibility (7.x through 11.x differ!)
- Auto-Learning - Save everything found to knowledge base
| Source | Why It's Critical |
|---|---|
github.com/mendix/sdk-demo |
Has schema extraction patterns! |
npm search mendixmodelsdk |
Find packages that USE the SDK - real implementations |
web.archive.org/web/*/docs.mendix.com/* |
Old/removed documentation |
# Get the full copy-paste ready research prompt
@mendix-expert beast_mode
# Get a brief summary
@mendix-expert beast_mode format="brief"
# Get explanation of what it is
@mendix-expert beast_mode format="instructions"Use the prompt output in ANY AI chat to enable exhaustive Mendix research!
See docs/RESEARCH-PROTOCOL.md for the complete protocol.
The server can automatically crawl official Mendix documentation to stay up-to-date!
Scheduled Crawler โ docs.mendix.com โ Parse โ Add to Knowledge Base
โ
User Query โ TF-IDF Search โ Results
| Source | Content | Priority |
|---|---|---|
| Studio Pro Release Notes | 10.x, 11.x changelogs | High |
| Reference Guide | Pages, domain model, microflows | High |
| How-To Guides | Front-end, integration, extensibility | Medium |
| Studio Pro Guide | Page variables, Maia, workflows | High |
| SDK Documentation | Platform SDK, Model SDK | High |
| API Documentation | REST, OData, web services | Medium |
- โ Page Variables (new in 10.0+)
- โ Workflows 2.0
- โ Maia AI Assistant
- โ Atlas UI 3.x / Design Tokens
- โ Pluggable Widgets API
- โ Studio Pro Extensions
- โ Platform & Model SDK patterns
# Harvest all sources
@mendix-expert harvest
# Harvest specific sources
@mendix-expert harvest sources=["releaseNotes", "mxsdk"]
# Check harvest status
@mendix-expert harvest_status
# Dry run (preview without saving)
@mendix-expert harvest dryRun=true- Runs automatically every 7 days
- Can be triggered manually anytime
- Rebuilds search index after adding new knowledge
The server includes semantic vector search using Pinecone! This means you can search by meaning, not just keywords.
| Keyword Search | Vector Search |
|---|---|
| Finds "microflow" | Finds "microflow", "workflow", "automation", "business logic" |
| Exact match required | Semantic understanding |
| "loop" won't find "iterate" | "loop" finds "iterate", "forEach", "while" |
Good news: Vector search works out of the box! The server includes a built-in connection to the shared Mendix knowledge base. No Pinecone account or API key needed.
For the best semantic search quality, provide an embedding API key:
OPENAI_API_KEY=sk-your-key-hereAZURE_OPENAI_API_KEY=your_azure_key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-ada-002Priority Order: Azure OpenAI โ Standard OpenAI โ Local TF-IDF (fallback)
Without any API keys: Server uses local TF-IDF search - still works great!
If you want to maintain your own knowledge base:
PINECONE_API_KEY=your_pinecone_key
PINECONE_INDEX=your-index-name# Semantic search - finds conceptually related content
@mendix-expert vector_search query="how to iterate over a list"
# Hybrid search - best of both worlds
@mendix-expert hybrid_search query="microflow error handling"
# Check vector index status
@mendix-expert vector_status
# Re-index after adding new knowledge
@mendix-expert reindex_vectorsUser Query: "loop through entities"
โ
โโโ Keyword Search (40% weight)
โ Finds: "loop", "entity", "iterate"
โ
โโโ Vector Search (60% weight)
Finds: "forEach", "list iteration", "aggregate"
โ
โโโ Reciprocal Rank Fusion
Merges results, ranks by combined score
๐ฏ = Both matched, ๐ = Keyword only, ๐ฎ = Vector only
Access these via the MCP resources protocol:
| Resource | What It Shows |
|---|---|
mendix://knowledge/overview |
Knowledge base summary & file list |
mendix://stats |
Server statistics (uptime, cache, index size) |
mendix://search/config |
Current search configuration |
mendix://validation/report |
Knowledge validation errors/warnings |
mendix://analytics |
Search analytics (hit rate, top terms, gaps) |
mendix://staleness |
Entries older than 90 days needing updates |
mendix://maintenance |
Auto-maintenance schedule & status |
Typos are handled gracefully:
"micorflow"โ finds microflow"domian model"โ finds domain model"platfrom sdk"โ finds platform sdk
Searches automatically expand:
MFโ microflowDMโ domain modelSDKโ mendixmodelsdk, mendixplatformsdkNPโ non-persistent
Finds variations:
"microflows"matches microflow"creating"matches create"validation"matches validate
177 entries across 9 topic files:
| File | Entries | Topics |
|---|---|---|
model-sdk.json |
25 | Model manipulation, elements, properties |
platform-sdk.json |
23 | Working copies, commits, branches |
best-practices.json |
28 | Naming, architecture, performance |
troubleshooting.json |
22 | Common errors and solutions |
studio-pro.json |
20 | Studio Pro features, shortcuts |
advanced-patterns.json |
18 | Complex SDK patterns |
performance-guide.json |
15 | Optimization techniques |
security-guide.json |
14 | Security best practices |
sdk-community-resources.json |
12 | Community links, forums |
pluggable-widgets.json |
6 | NEW! Widget types, hooks, patterns |
getting-started.json |
4 | NEW! Environment setup guides |
All SDK and Widget patterns have been live-tested against real Mendix apps in December 2025.
These patterns are confirmed working with mendixplatformsdk + mendixmodelsdk:
| Pattern | Status | Notes |
|---|---|---|
| Entity creation | โ | All 5 attribute types work |
| Association creation | โ | Reference type verified |
| Microflow creation | โ | Start โ LogMessage โ End |
model.allDomainModels() |
โ | Returns domain model interfaces |
model.allMicroflows() |
โ | Returns all microflow interfaces |
model.flushChanges() |
โ | Required before commit |
workingCopy.commitToRepository() |
โ | Commits to branch |
| Incorrect Pattern | Correct Pattern |
|---|---|
model.allEntities() |
Does NOT exist - use domainModel.load().entities |
StartEvent.createIn(mf) |
StartEvent.createIn(mf.objectCollection) |
StringTemplate.create(model) |
StringTemplate.createInLogMessageActionUnderMessageTemplate(logAction) |
workingCopy.id() |
workingCopy.id (it's a property, not a method) |
These types compile correctly with mendix@11.5.0:
Core Types: EditableValue, DynamicValue, ActionValue, ListValue, ListAttributeValue, ListActionValue, SelectionSingleValue, ListExpressionValue, ListWidgetValue
React Hooks: useConst, useSetup, useDebounce, useLazyListValue, useSelectionHelper, useOnResetValueEvent, useOnSetValueEvent, useFilterAPI
The knowledge base now includes step-by-step setup guides for:
- Platform/Model SDK - Connect to Mendix, create working copies, modify models
- Pluggable Widgets - Create custom React widgets for Studio Pro
- Studio Pro Extensions - Build C# or web extensions for the IDE
- mx.exe Analysis - Local offline analysis of .mpr files
Ask: @mendix-expert "How do I set up SDK development?" or "Getting started with pluggable widgets"
The server maintains itself with scheduled tasks:
| Task | Frequency | Purpose |
|---|---|---|
| Validation | Every 7 days | Check knowledge quality |
| Staleness Check | Every 7 days | Find outdated entries |
| Cache Cleanup | Daily | Clear expired cache |
| Analytics Reset | Every 14 days | Archive and reset stats |
| Knowledge Harvest | Every 7 days | Crawl Mendix docs for updates |
View status via mendix://maintenance resource.
See ROADMAP.md for the enhancement roadmap.
- Auto-crawl Mendix documentation
- Weekly auto-updates
- Priority topic targeting (Maia, page variables, etc.)
- Pinecone integration for semantic search
- Hybrid keyword + vector search
- "How do I loop" finds "iteration patterns"
- Generated answers with context
- Source citations
- Conversation memory
Current metrics:
- 92% hit rate - Most queries find relevant results
- 2ms average response - Near-instant answers
- 177 indexed entries - Comprehensive coverage
- 3,157 unique terms - Rich vocabulary
mendix-mcp-server/
โโโ src/
โ โโโ index.js # Main MCP server
โ โโโ core/
โ โ โโโ SearchEngine.js # TF-IDF + fuzzy search
โ โ โโโ KnowledgeManager.js
โ โ โโโ CacheManager.js
โ โ โโโ ProjectLoader.js
โ โ โโโ QualityScorer.js
โ โโโ utils/
โ โโโ MaintenanceScheduler.js
โ โโโ WebFetcher.js
โ โโโ ...
โโโ knowledge/ # Knowledge base JSON files
โโโ config/default.json # Configuration
โโโ package.json
# Test search
node -e "
const SE = require('./src/core/SearchEngine.js');
const e = new SE(); e.initialize('./knowledge');
console.log(e.search('microflow'));
"
# Validate knowledge
node -e "
const KM = require('./src/core/KnowledgeManager.js');
new KM('./knowledge').validateKnowledgeBase().then(r => console.log(r.summary));
"We welcome contributions! See CONTRIBUTING.md for guidelines.
- ๐ Add knowledge entries for topics you know well
- ๐ Report bugs or unexpected behavior
- โจ Suggest new features
- ๐ Improve documentation
See CHANGELOG.md for version history.
- ๐งช Verified SDK Patterns - All patterns live-tested against real Mendix apps
- ๐ง Critical Bug Fixes - Fixed
model.allEntities(),StartEvent.createIn(),StringTemplatepatterns - ๐ Pluggable Widgets Knowledge - 9 widget types, 8 React hooks, filter builders
- ๐ Getting Started Guides - Step-by-step environment setup for SDK, widgets, extensions
- ๐ Enhanced Documentation - Verified patterns, API corrections, setup guides
- ๐ง Self-Learning Pipeline Fix -
add_to_knowledge_basenow updates vector store - ๐ง Harvester Integration - Auto-harvest now re-indexes vectors after adding new knowledge
- ๐ Documentation - Updated README with Azure OpenAI setup and maintenance guide
- ๐ง Azure OpenAI Embeddings - 3x faster than standard OpenAI (355ms vs 971ms)
- ๐ฎ Enhanced Semantic Search - 1536-dimension vectors for better understanding
- โ๏ธ Rebalanced Weights - 40% keyword / 60% vector for optimal results
- ๐ Embedding Fallback Chain - Azure โ OpenAI โ Local TF-IDF
- ๐ฎ Vector Search - Semantic search using Pinecone
- ๐ฏ Hybrid Search - Combined keyword + vector with RRF fusion
- ๐ 316 Knowledge Vectors - Full knowledge base indexed
- ๐พ Knowledge Harvester - Auto-crawl Mendix docs for fresh knowledge
- โ Weekly auto-harvest from official documentation
- โ Priority topic targeting (Maia, page variables, workflows 2.0)
- โ Release notes parser for Studio Pro 10.x, 11.x
- โ Fuzzy search with Levenshtein distance
- โ Analytics tracking with knowledge gap detection
- โ Auto-maintenance scheduler
The MCP server is designed to be self-maintaining:
| Feature | How It Works | Frequency |
|---|---|---|
| Auto-Harvest | Crawls docs.mendix.com for new content | Weekly (every 7 days) |
| Self-Learning | Saves solutions discovered during research | On every discovery |
| Vector Re-Index | Updates semantic embeddings when knowledge changes | Automatic |
-
Trigger Manual Harvest
@mendix-expert harvest
-
Re-index Vectors (if search seems off)
@mendix-expert reindex_vectors
-
Check Index Health
@mendix-expert vector_status
-
Sync with GitHub (if running on multiple machines)
@mendix-expert sync_mcp_server
- Hit Rate: Should be >90% (check via
@mendix-expert hello) - Vector Count: Should match knowledge entry count (~300+)
- Last Harvest: Check
harvest_status- should be <7 days old
| Issue | Fix |
|---|---|
| Search results seem wrong | Run reindex_vectors |
| Missing new Mendix features | Run harvest to fetch latest docs |
| Slow embeddings | Check if Azure OpenAI key is configured (faster than standard OpenAI) |
| No vector results | Built-in Pinecone works automatically; check network connectivity |
- โ Web suggestions for missed queries
- โ Staleness detection for old entries
- โ GitHub sync reminder system
MIT License - Use it, modify it, share it!
- Mendix - For the amazing low-code platform
- Model Context Protocol - For the MCP specification
- Kelly Seale - Co-creator and Mendix SDK expert
Built with ๐ for the Mendix community
