Skip to content

Commit a6ed903

Browse files
Merge pull request #9884 from liamsommer-mx/mcpserver-schema-changes
Mcpserver schema changes
2 parents b9d1e7c + 712d71b commit a6ed903

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

content/en/docs/marketplace/genai/reference-guide/mcp-server.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ To use function calling within the same Mendix application and integrating to an
1919

2020
The current version has the following limitations:
2121

22-
* Tools can only return a `TextContent` result.
22+
* Tools can only return String values, either directly as String type or using the `TextContent` entity.
23+
* Prompts can only return a single message.
2324
* The client connection remains active for only 15 minutes, as the Mendix runtime currently does not support async requests.
25+
* Running an MCP Server is currently only supported on single-instance environments.
2426
* User authorization can currently only be applied on request but not at the tool/prompt level. As a result, the current user is not available within tool/prompt microflows, and entity access or XPath constraints can not be enabled out of the box. This is due to the capabilities offered by the official MCP Java SDK which does not support reusing a Mendix user session in the executed tools/prompts.
2527

2628
Note that the MCP Server module is still in its early version and latest versions may include breaking changes. Since both the open-source protocol and the Java SDK are still evolving and regularly updated, these changes may also affect this module.
@@ -64,8 +66,8 @@ After the [Create MCP Server](#create-server) action, you can add one or multipl
6466

6567
The selected microflow must adhere to the following principles:
6668

67-
* Input needs to be the same as described in the `Schema` attribute (only primitives and/or an object of type `MCPServer.Tool` are supported)
68-
* The return value needs to be a `TextContent` object which you can create inside of the microflow to return the relevant information to the model based on the outcome of the microflow.
69+
* Input needs to be the same as described in the `Schema` attribute (only primitives and/or an object of type `MCPServer.Tool` are supported). If no Schema is passed in the `Add tool` action, it will be automatically created based on the microflow's input parameters.
70+
* The return value must be either of type `String` or `TextContent`. You can create a `TextContent` object within the microflow to return the relevant information to the model based on the outcome of the microflow.
6971

7072
For an example, see the `Example Implementations` folder inside of the module.
7173

@@ -99,6 +101,19 @@ The **Documentation** pane displays the documentation for the currently selected
99101

100102
{{< figure src="/attachments/appstore/platform-supported-content/modules/technical-reference/doc-pane.png" >}}
101103

104+
## Troubleshooting
105+
106+
### MCP Client Cannot Connect to the MCP Server
107+
108+
There are several possible reasons why the client cannot connect to your server. Check the logs of the MCP host application for the hint about what might be going wrong. Additionally, if the issue occurs on the Mendix side, the MCP Server module will log relevant errors.
109+
110+
The error `Fatal error: SseError: SSE error: Could not convert argument of type symbol to string.` may indicate that you need to install or reinstall [Node.js](https://nodejs.org/en). After that, you may also need to clear your NPX cache by running the following command in a CLI (for example, PowerShell):
111+
112+
```text
113+
Remove-Item -Path "$env:LocalAppData\npm-cache\_npx" -Recurse -Force
114+
npm cache clean --force
115+
```
116+
102117
## Read More
103118

104119
* Concept description of [Model Context Protocol (MCP)](/appstore/modules/genai/mcp/)

0 commit comments

Comments
 (0)