Hello Zoltan Chovan, Alexey Serbin, Zoltan Martonka, Gabriella Lotz, Attila
Bukor, Kudu Jenkins, Yan-Daojiang,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24908
to look at the new patch set (#3).
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-internal.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
9 files changed, 3,362 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/08/24908/3
--
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: newpatchset
Gerrit-Change-Id: I59146a2fd4f5b8d61d3e494cc88974b396ed6856
Gerrit-Change-Number: 24908
Gerrit-PatchSet: 3
Gerrit-Owner: Marton Greber <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Yan-Daojiang <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Reviewer: Zoltan Martonka <[email protected]>