Interface McpClient
- All Known Implementing Classes:
HttpMcpClient,SimulatedMcpClient
public interface McpClient
Minimal client for the Model Context Protocol (MCP).
MCP is a public, versioned protocol, so (unlike the not-yet-public Aegis REST
API) this speaks the real wire format over the Streamable HTTP transport: the
initialize handshake, tools/list, and tools/call. It is used, for
example, to reach the Cockroach Continuum Cloud MCP server.
The default fully-functional implementation is SimulatedMcpClient; the
real one is HttpMcpClient. Select with ContinuumMcpFactory.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe result of atools/call.static final recordConfiguration for an MCP client.static final recordOne content block of a tool-call result.static final recordA tool advertised by an MCP server. -
Method Summary
Modifier and TypeMethodDescriptionInvoke a tool by name with the given arguments.Discover the tools the server advertises.
-
Method Details
-
listTools
List<McpClient.Tool> listTools()Discover the tools the server advertises. -
callTool
Invoke a tool by name with the given arguments.
-