The MCP plugin needs to add an API error response template <ErrorResponseTemplate>
#2 330 ouverte le 27 mai 2025
Métriques du dépôt
- Stars
- (9 036 étoiles)
- Métriques de merge PR
- (Merge moyen 7j 9h) (18 PRs mergées en 30 j)
Description
Why do you need it?
When configuring an MCP service in Higress via the MCP plugin, if the HTTP response status code of the corresponding API is not equal to 200, the current response is fixed as: call failed, status: %d, response: %s. This error message cannot be customized, and in scenarios where the error code and message are provided through HTTP headers, this information is discarded.
How could it be?
It is recommended to add an error template in the MCP plugin configuration, which provides variables to read header values based on header keys and parse the body as JSON, so that customized error messages can be displayed.