Skip to main content
Version: 当前版本

McpServer Plugin

Explanation#

  • The mcpServer plugin is used to enable the mcpServer functionality in the ShenYu gateway. After enabling this plugin, users can register Tools for unified management by the gateway.

  • The mcpServer plugin must be used together with a proxy plugin to enable Tool invocation.

Plugin Setting#

Plugin Details#

After the client is connected to the Apache ShenYu gateway, selector and rule information will be automatically registered. For details about selector and rule configuration, please refer to: Selector and Rule Management.

Selector Handling#

For selector handling, the current version only supports the startWith condition in Condition. The endpoint is equal to the gateway route plus the URL configured in Condition and the request protocol (sse/streamablehttp).

Click "SSE Configuration" or "Streamable Configuration" to enter the JSON editing page, which helps users conveniently edit the JSON configuration required by the Mcp client.

Tool Handling#

Tool handling refers to the handle field, which allows you to perform operations after the gateway has completed traffic matching. For more information, please refer to Plugin Handle Explanation in plugin management.

  • Details of tool configuration:

    • Description: Defines the purpose of the tool.

    • Parameter: Defines the type of parameters required by the tool.

  • Details of requestConfig configuration:

    • url: Defines context-path + the actual URL of the tool.

    • method: Defines the request type of the tool method.

    • argsPosition: Defines the correspondence between all parameters and their positions.

    • argsToJsonBody: If true, all parameters will be added to the body.

    • headers: You can add headers required by the Tool here.

How to disable plugin#

  • In shenyu-admin --> Basic Configuration --> Plugin Management --> set mcpServer to disabled.