higress-group/higress

The MCP plugin needs to add an API error response template <ErrorResponseTemplate>

Offen

#2.330 geöffnet am 27.05.2025

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (1.219 Forks)github user discovery
help wantedlevel/normal

Repository-Metriken

Stars
 (9.036 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 7T 9h) (18 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide