MCP Client and Server with the Java MCP SDK and LangChain4j
MCP (Model Context Protocol) makes the buzz these days! MCP is a protocol invented last November by Anthropic, and integrated in Claude Desktop, and in more and more tools and frameworks, to expand LLMs capabilities by giving them access to various external tools and functions.
My colleague Philipp Schmid gave a great introduction to MCP recently, so if you want to learn more about MCP, this is the place for you.
In this article, I’d like to guide you through the implementation of an MCP server, and an MCP client, in Java.
As I’m contributing to LangChain4j, I’ll be using LangChain4j’s mcp
module for the client.