process

fun process(process: Process, mcpToolParser: McpToolDescriptorParser = DefaultMcpToolDescriptorParser, name: String = DEFAULT_MCP_CLIENT_NAME, version: String = DEFAULT_MCP_CLIENT_VERSION)(source)

Processes a given Process instance to register tools from an MCP server.

The method leverages a transport protocol for communication with the MCP server, parses the tool definitions using the specified or default McpToolDescriptorParser, and registers the tools in the agent's tool registry under a given client name and version.

Parameters

process

The Process instance representing the MCP server communication process. Its input and output streams will be used for the transport.

mcpToolParser

The parser that converts MCP tool definitions to standardized descriptors. Defaults to DefaultMcpToolDescriptorParser.

name

The name of the MCP client for identifying the source of the tools. Defaults to DEFAULT_MCP_CLIENT_NAME.

version

The version of the MCP client for identifying the source of the tools. Defaults to DEFAULT_MCP_CLIENT_VERSION.