Package dev.langchain4j.mcp.client
package dev.langchain4j.mcp.client
-
ClassDescriptionDefault converter for MCP tool responses backed by
content[].An error that an MCP server reported inside an otherwise successful tool result, by settingisErrortotrue.The 'BlobResourceContents' object from the MCP protocol schema.Context information for any invocation made towards an MCP server.Represents a client that can communicate with an MCP server over a given transport protocol, retrieve and execute tools using the server.Listener interface for monitoring MCP client operations.What an MCP server reports about itself when the client connects to it, using theserver/discoverrequest of MCP protocol version 2026-07-28 and later.The 'EmbeddedResource' object from the MCP protocol schema.A business exception raised over the MCP protocolThe 'GetPromptResult' object from the MCP protocol schema.A functional interface that supplies HTTP headers for MCP client requests based on the givenMcpCallContext.The 'Icon' object from the MCP protocol schema.The icon theme from the MCP protocol schema.The 'ImageContent' object from the MCP protocol schema.A functional interface that supplies_metafields for MCP client requests and notifications based on the givenMcpCallContext.The 'Prompt' object from the MCP protocol schema.The 'PromptArgument' object from the MCP protocol schema.A holder for one of ['McpTextContent', 'McpImageContent', 'McpEmbeddedResource'] objects from the MCP protocol schema.The 'PromptMessage' object from the MCP protocol schema.The 'ReadResourceResult' object from the MCP protocol schema.The 'Resource' object from the MCP protocol schema.A holder for either a 'McpTextResourceContents' or 'McpBlobResourceContents' object from the MCP protocol schema.The 'ResourceTemplate' object from the MCP protocol schema.The 'Role' object from the MCP protocol schema.Identifies the MCP server: who it is and which version of it is running.A request or notification that the MCP server sent to the client, as it was received.The 'TextContent' object from the MCP protocol schema.The 'TextResourceContents' object from the MCP protocol schema.Constants for MCP metadata keys, as defined in the MCP specification.Converts the content blocks of an MCPCallToolResultinto theToolExecutionResultthe model sees.