You probably heard about Model Context Protocol (MCP) , which is basically a standard for connecting Tools to LLMs. It was released November 2024 and a few months later we have a good list of MCP Clients and MCP Servers . Building MCP Server is easy with Quarkus and there are a few good servers available with one single jbang command. Check the Quarkiverse MCP Servers project! For the client I did find myself with some difficult finding a good lightweight open MCP Client. Don't get me wrong, I know there are good alternatives, but I only use ollama locally and I don't want to fell in the multiverse of LLM Clients to find one that fits my needs. I wanted to build my own MCP Client! In this post let's take a look at MCP Java SDK to build our own client. MCP Java SDK MCP provides a good modern Java SDK for building MCP applications. Quarkus and langchain4j are also a good alternative, but this time I needed something low level. To get started with the MCP Java SDK you ...
Code on my github You may have heard that Auto Regressive LLMs (Large Language Models) are not good with certain tasks, given wrong or inaccurate results. Classical examples is the prompt: count the number of r in word strawberry Asking local llama 3.2 to count the number of 'r' on word 'strawberry' and it wrongly says 2 Or which number is bigger: 9.11 or 9.9 Asking Llama 3.2 the prompt which number is bigger: 9.11 or 9.9 and it wrongly says that 9.11 is bigger Of course modern LLMs may be trained to target such cases and may get it right, but if you try similar prompts you may get inaccurate results or even make the LLM "think" that they should answer something else and change the answer to something wrong. But still, there are issues that LLMs simply can't solve due the tokenization process and the context lenght. This is discussed in depth in recent Andrej Karpathy video about LLMs: In this same video Karpathy suggests the use of code to solve such ...