We talked about Tools and then MCP . In this post let's talk how to use Quarkus and lanchaing4j to connect your intelligent application to MCP servers! Requirements Java Open JDK (24 is preferred) Maven Ollama with at least one LLM model that you can locally. Notice that you could use other providers such as ramalama and vllm , but you will need to use the correct dependencies for OpenAI API. jbang , npx or other tool required top run the MCP server The LLM client application Our application simple needs the dependencies quarkus-langchain4j-mcp , quarkus-langchain4j-ollama and quarkus-rest . You can generate your application online using Code Quarkus . About the code, you only need one single interface: import dev . langchain4j . service . SystemMessage ; import io . quarkiverse . langchain4j . RegisterAiService ; @ RegisterAiService public interface AIService { @ SystemMessage ( "You are a nice and helpful assistant." ) String input ( S...
Blog about programming and client applications. Target Programming languages are JavaFX, Visage, HTML 5+ Javascript or even command line apps :-D