To configure MCP Server security in Mendix, you need to add an authentication microflow when creating the MCP Server. By default, the MCP endpoint can be accessed publicly unless you secure it with authentication and/or path restrictions. [docs.mendix.com]
Recommended Security Setup
- Create an Authentication Microflow
- Add a microflow that will authenticate incoming MCP requests.
- Configure this microflow in the Create MCP Server action. [docs.mendix.com]
- Use Required Parameters
- The microflow can accept:
MCPServerSystem.HttpRequest
- Use the
HttpRequest object to read headers such as Authorization tokens or Basic Auth credentials. [docs.mendix.com]
- Return a Mendix User
- The microflow must return a
System.User object. - This user represents the authenticated MCP client and is used for all subsequent tool and prompt executions within the session. [docs.mendix.com]
- Implement Your Authentication Logic
- Validate credentials against:
- Basic Authentication (username/password)
- OAuth/OIDC provider
- API keys
- Corporate Identity Provider (Azure AD, Entra ID, etc.)
- As long as the microflow returns a valid
System.User, the MCP Server accepts the request. [docs.mendix.com]
- Leverage Mendix Security
- After authentication,
currentUser and currentSession are available in your tool microflows. - Standard Mendix entity access and role-based security are automatically enforced. [docs.mendix.com]
- Restrict the Endpoint
- For production deployments, configure path-based restrictions on Mendix Cloud or your hosting environment so only authorized clients can reach the MCP endpoint.