Marton Greber has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24908
Change subject: KUDU-3806: add the MCP server ...................................................................... KUDU-3806: add the MCP server Add `kudu mcp serve`, a Model Context Protocol server that speaks JSON-RPC over stdio and exposes the CLI as callable tools so an MCP client (an LLM agent) can drive Kudu. The server reconstructs the full action tree via BuildRootMode() and reflects each action's flags into a tool schema. Only actions marked SURFACE or GATED (see the disposition classification) are advertised; tool calls are executed by forking `kudu` as a child and collecting its output with the deadline-bounded Subprocess::WaitAndCollect(), so a wedged action cannot hang the serve loop. The serve action itself is classified REJECT to keep the server from re-exposing itself. Coverage is enforced at startup by ValidateDispositionCoverageOrDie(). tool_action_mcp-test exercises reflection, dispatch, and the JSON-RPC framing in-process; tool_action_mcp-itest drives the serve loop against a live ExternalMiniCluster. Change-Id: I59146a2fd4f5b8d61d3e494cc88974b396ed6856 Co-Authored-By: Claude Opus 4.8 <[email protected]> --- M src/kudu/tools/CMakeLists.txt A src/kudu/tools/mcp_test_util.h M src/kudu/tools/tool_action.h A src/kudu/tools/tool_action_mcp-itest.cc A src/kudu/tools/tool_action_mcp-test.cc A src/kudu/tools/tool_action_mcp.cc A src/kudu/tools/tool_action_mcp.h M src/kudu/tools/tool_action_root.cc 8 files changed, 3,219 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/08/24908/1 -- To view, visit http://gerrit.cloudera.org:8080/24908 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I59146a2fd4f5b8d61d3e494cc88974b396ed6856 Gerrit-Change-Number: 24908 Gerrit-PatchSet: 1 Gerrit-Owner: Marton Greber <[email protected]>
