MCP Server
Overview
Mendix MCP Server Module
Make your Mendix business logic available to any agent in your enterprise landscape with the Mendix MCP Server module.
The Mendix MCP Server Module provides easy low-code capability to set up MCP Server within a Mendix app using the Model Context Protocol (MCP). Using the MCP Server resources can easily be made available to other applications that support MCP. The Mendix MCP Server module bridges the Mendix model and the Java MCP SDK. With the current implementation it is possible to:
- Expose reusable prompts including the ability to use prompt parameters
- List and run actions implemented in the application as tools
Documentation
Mendix MCP Server Module
The Mendix MCP Server Module provides easy low-code capability to set up MCP Server within a Mendix app. Using the MCP Server resources can easily be made available to other applications that support the Model Context Protocol (MCP). The Mendix MCP Server module interacts bridges the Mendix model and the Java MCP SDK. With the current implementation it is possible to
- Expose reusable prompts including the ability to use prompt parameters
- List and run actions implemented in the application as tools
Support
This module is based on Mendix 10.21.1 and uses MCP Java SDK 0.8.1 that supports MCP Protocol version 2024-11-05.
How to use
The MCP Server module glues the actual server to microflows in the applications. When setting up the MCP Server configuration each prompt and tool is linked with a microflow that receives input from the client and return a result based on the MCP schema definition. To expose a prompt or tool
- For a prompt; create a microflow returning a PromptMessage entity. Input parameters can be defined using basic types as string and numbers.
- For a tool; create a microflow accepting input parameters and process the request. It should return a TextContent entity.
- Initiate the MCP Server and add tools and prompts in a microflow that is called in the After Stertup microflow of your app
- Run the application For an example see `McpServerInit` microflow in the `MCPServerExample` module inside the MCP Server and Client Development App. For testing use and MCP client such as MCP Inspector.
Known limitations
- Tools can return one TextContent result.
- Prompts can return one PromptMessage result.
- Mendix runtime doesn't support async requests, to keep the client connection alive the request thread is blocked for 15 minutes.
- Authentication is not implemented (yet).