How to use MCP to bring Mendix Business Logic into Claude for Desktop

If you’ve been following the latest news about Gen AI recently, you’ve probably heard people talking about something called the Model Context Protocol, or MCP. It’s getting a lot of attention because it’s changing how apps connect to each other in the world of AI. But what exactly is MCP, and what role does Mendix play?
TL;DR – MCP version
Here’s a quick look at some of the most common questions we get with MCP and Mendix. For more in-depth answers to the following questions, see our FAQ at the end of this post.
- What is Model Context Protocol, or MCP? An open protocol that standardizes how LLMs connect to apps autonomously.
- Why does MCP matter? MCP allows for tool discovery without having to preconfigure everything at design time.
- Why use Mendix with MCP? You can easily build powerful microflows in Mendix and start an MCP server from within your app to make those microflows available to agentic AI systems.
What is MCP, and why use it with Mendix?
MCP is an open standard for connecting AI (LLM) applications to data and tools, think of it like a USB‑C port for AI. With MCP, an LLM (called the “host”) can reach out to other apps (called “servers”) that offer tools, prompts, or data. Mendix’s new MCP Server module turns your Mendix application into one such server. This means an LLM application (like Claude for Desktop) can invoke your Mendix microflows as a tool and incorporate the result in the response to the user.
The benefits are huge: you can build smarter agents, debugging helpers, or any agentic workflow that taps directly into your Mendix app, while enjoying MCP’s pre‑built integration and vendor flexibility.

Note: The latest version of the GenAI Showcase App shows exactly how to set up an MCP server in your Mendix app, expose tools, and get Claude for Desktop ready to interact with them.
Be sure to check out the GenAI Showcase App!

1 – Set up the MCP Server in Mendix
Prerequisites
You can choose whether to start from scratch or extend an existing application. If you wish to start from scratch, the Blank GenAI App, which already includes all necessary GenAI modules, is the best starting point. If you are extending an existing app, make sure to install the MCP Server module from the marketplace.
Set up your app data
For this example, a database containing historical ticket information is required. You can find guidance for this in the MCPServer_ExposeTools.Ticket entity and Ticket_CreateDataset microflow inside the GenAI Showcase App.
Build the tool to expose
Start by creating a microflow that you want to make available as a tool. In this example, we’ll create one that counts all the records (e.g., tickets) in a database based on an input parameter such as a status or category field. The microflow should return an object of type TextContent, which you’ll find in the MCPServer module. Use the Content attribute of that object to pass the result from your microflow.
This is what the microflow looks like:
It corresponds to the Ticket_GetNumberOfTicketsInStatus microflow inside the MCP showcase within the GenAI Showcase App mentioned above.
Initialize the MCP server
To initialize your MCP server, call the Create MCP Server action from the Toolbox in the startup microflow. Create a new microflow AS_InitMCPServer and add the Create MCP Server action. Configure the operation with:
- Set the path to mendix-mcp
- Set the name to my first MCP server, and
- Set the version to 1.0.0
In the showcase example, the server is initialized inside of the ACT_MCPServerConfiguration_InitializeMCPServer microflow in case you’d like to have a look.
Last, add this microflow to the after-startup microflow of your project, so the server is initialized when running the app.
Configure the tool(s) to expose
An empty MCP server is quite powerless, so you should add some functionality to it. You can do this in the same microflow where you initialize the server. Drag the Add tool action from the toolbox right after the server creation. Here, you need to specify the name of the tool, GetNumberOfTicketsByStatus, as well as an optional description so that the model knows what to expect and when this tool needs to be called. The Schema is important so that the model can pass the correct input parameters. In our example we use:
{
"type": "object",
"id": "urn:jsonschema:Operation",
"properties": {
"Status": {
"type": "string"
}
}
}
The Schema should match the input parameters of your to-be-exposed microflow. Finally, in the Add Tool action select the microflow and the server you previously created. In the showcase example this looks as follows:
Run the MCP server
When the server initialization microflow is triggered, it starts an MCP server on the Mendix Runtime and registers the tool you added. Keep in mind that this post doesn’t cover authentication, which you would need to set up for a production environment. Once the MCP host (Claude for Desktop) connects to the server, the model can discover the tool called GetNumberOfTicketsByStatus and decide to use it if it fits the user’s request. That’s what we will do next.
2 – Set up the MCP Host
The MCP server is running, but how do you now interact with the exposed tool? For this you need an MCP host that supports the protocol to connect to MCP servers (see image above). In this blog, we’ll use Claude for Desktop, but other hosts may work similarly (for example Github Copilot in Visual Studio Code).
Installation
Visit https://claude.ai/download to install Claude for Desktop on your machine. Follow the instructions. Make sure to log in with your Anthropic account (or create an account first). Currently, Claude for Desktop is available in a free trial which is sufficient enough to test the Mendix tools via MCP.
Add the Mendix MCP Server to Claude for Desktop
We now need to register the MCP Server with Claude for Desktop. In Claude for Desktop, open the developer settings File > Settings > Developer. Click Edit Config to navigate to the config file of Claude, which you can open in any text editor (e.g., Visual Studio Code). Paste the following snippet into the file and edit the fields to match how you configured the server (most importantly, the path):
Please make sure that the configuration actually uses the path you specified earlier.
{
"mcpServers": {
"mendix-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8080/mendix-mcp/sse",
"--allow-http"
]
}
}
}
Afterward, restart Claude for Desktop so that the client can connect to the server. Below the text input field, you should see a tool icon which shows the available tool(s):
The model can now consider the registered tools from the Mendix MCP Server. If you asked for something related to your tool (for example: “How many tickets are open?”), the model should use the tools to answer the question. Typically, Claude will first ask the user to confirm use of the tool before calling it. This keeps humans in the loop even though this option can be turned off.
What’s Next? Endless Possibilities
Now you’ve seen how Mendix works with the Model Context Protocol (MCP) to power agentic AI. This makes it possible to build smart, AI-driven workflows by exposing your Mendix microflows to AI tools. And we’re just getting started—there’s more exciting content about MCP and AI in Mendix coming soon.
Because MCP is built for agentic workflows, you can go even further. Imagine connecting several microflows together: one to fetch data, another to analyze it, and a third to update a dashboard—all controlled by an AI agent, with a human still in the loop. You can even mix Mendix tools with other MCP services like databases or CRM systems to build advanced, AI-powered apps.
In the near future, this could mean AI agents running entire business processes using Mendix—like assigning tasks, updating records, and generating reports—all from a simple chat. And it won’t just be Claude for Desktop. Any MCP-compatible AI host could connect to your Mendix microflows.
Frequently Asked Questions
-
What is Model Context Protocol, or MCP?
Model Context Protocol, or MCP, is a way for AI tools like large language models (LLMs) to connect to apps and use them on their own. Think of it like a USB-C port, but for AI. MCP gives the AI a standard way to “plug in” and use tools, data, or features from different apps.
-
Why does MCP matter?
MCP allows for tool discovery without having to preconfigure everything at design time. Your agent can easily connect to various MCP servers without implementing custom API integrations. Suddenly, every service available through MCP can be integrated into your agentic app.
-
Why use Mendix with MCP?
Integrating both is a match made in heaven: you can easily build powerful microflows in Mendix and start an MCP server from within your app to make those microflows available to agentic AI systems. This makes it easy to power agentic workflows that connect your Mendix logic to external AI agents.