BobSong-dev opened a new pull request, #7572: URL: https://github.com/apache/shenyu/pull/7572
## Background Agent Gateway supports Java tool providers and remote MCP servers, but exposing an ordinary HTTP service currently requires a custom provider or a separate MCP server. This adds deployment work for services that already have ShenYu HTTP routes. This change exposes configured HTTP routes through the existing tools-only MCP entry point. It follows the MCP Server plugin's requestTemplate/argsPosition vocabulary and routing approach without reusing its blocking callback or shared session exchange. ## Changes - Add opt-in, rule-scoped `mcp.httpTools` definitions, validated by both Admin and the gateway. Initial support is fixed relative paths, GET query parameters and POST query/flat scalar JSON-body parameters; caller-selected destinations are refused; - Dispatch through existing gateway plugins using a forked request-local cursor. Isolate attributes, request headers/body, response, conditional checks, URL transformers and multipart cleanup; do not delegate caller credentials, cookies, web sessions or client TLS identity; - Reuse tool authorization, result filtering and logical MCP call observation. Link cancellation/deadlines to the internal HTTP chain, bound response capture and refuse redirects, unsuccessful statuses or unsafe JSON without adapter retries; - Capture immutable rule definitions per invocation, allowing synchronized rule changes without per-tool Java Beans or gateway restarts. Retain existing Java Provider extensions and prior behavior when HTTP plans are absent; - Add configuration, Admin validation, routing, isolation and namespace/collision regression tests, plus configuration documentation and release notes. No production dependency on MCP Server or Spring AI is added. ## Verification - Windows selected `clean verify` for Admin, Agent Gateway starter, Metrics and Web with required reactor dependencies: 688 tests / 40 suites, zero failures/errors/skips; Checkstyle and RAT passed in 46 modules. The tested snapshot is based on master `4835f40f8` / Gson 2.13.2; its Git tree matches this commit exactly; - The same feature revision on the earlier merged base `2dff2730f`: Windows 688 tests and RISC-V/QEMU `verify` 626 tests / 37 suites, zero failures/errors/skips. Linux Checkstyle/RAT passed in 15 modules; all 4,442 frozen source files matched; - Real Admin/H2 → WebSocket → Divide/Netty/Response → ordinary HTTP fixture: 27 checks passed, including authorization, hot updates, 32 same-ID concurrent calls, result filtering, cancellation and JSON/SSE deadlines; - OpenCode 2.0.18 with DeepSeek V4 Flash: JSON, SSE and SSE Code Mode passed, with six actual read-only GET/POST fixture requests correlated to tool outputs and subsequent model messages. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
