microsoft/lets-learn-mcp-java
If you are the rightful owner of lets-learn-mcp-java and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server is a Java-based implementation designed to facilitate communication between AI assistants and backend services using the HTTP Server-Sent Events (SSE) protocol.
Learn MCP Java Tutorial
A comprehensive Java tutorial demonstrating Model Context Protocol (MCP) implementation with Quarkus server and LangChain4j client, featuring a monkey species dataset for hands-on learning.
š Tutorial Overview
This project showcases a complete MCP ecosystem built in Java, including:
- MCP Server: Quarkus-based HTTP SSE server with monkey species data tools
- MCP Client: Interactive CLI client using LangChain4j and Ollama integration
- Step-by-step Documentation: Complete guides for building MCP applications with GitHub Copilot
š Quick Start
Prerequisites
- Java 21+
- Maven 3.8+
- VS Code with Java Extension Pack
- Ollama (for LLM integration)
Getting Started
-
Clone the repository
git clone https://github.com/brunoborges/monkey-mcp-java.git cd monkey-mcp-java
-
Start the MCP Server
cd monkey-mcp-server ./mvnw quarkus:dev
-
Run the MCP Client
cd monkey-mcp-client ./mvnw package java -jar target/monkey-mcp-client.jar
š Tutorial Structure
This tutorial is organized into sequential parts:
Part | Title | Description |
---|---|---|
Project Setup | Install tools, understand MCP, and prepare your environment | |
MCP Server | Build a Quarkus-based MCP server with monkey species tools | |
MCP Client | Create an interactive CLI client using LangChain4j |
šļø Architecture
āāāāāāāāāāāāāāāāāāā MCP Protocol āāāāāāāāāāāāāāāāāāāā
ā AI Assistant ā āāāāāāāāāāāāāāāāāāāŗā MCP Server ā
ā (VS Code, etc.) ā (HTTP SSE) ā (Java/Quarkus) ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāā
ā Monkey Services ā
ā (Business Logic) ā
āāāāāāāāāāāāāāāāāāāā
š Featured Tools
The MCP server provides these monkey species tools:
- List Species: Get all available monkey species
- Species Details: Retrieve detailed information about specific species
- Random Species: Get a random monkey species
- Statistics: View dataset statistics and access counts
š ļø Technology Stack
- Java 21: Modern Java features and performance
- Quarkus: Supersonic Subatomic Java Framework
- LangChain4j: Java framework for building LLM applications
- Ollama: Local LLM runtime
- Maven: Build and dependency management
- PicoCLI: Command-line interface framework
šÆ Learning Objectives
By completing this tutorial, you will:
- Understand MCP protocol and its benefits
- Build production-ready MCP servers with Quarkus
- Create MCP clients using LangChain4j
- Integrate with local LLMs using Ollama
- Apply AI-assisted development with GitHub Copilot
š Project Structure
monkey-mcp-java/
āāā 00_PROJECT_SETUP.md # Prerequisites and environment setup
āāā 01_MCP_SERVER.md # MCP Server implementation guide
āāā 02_MCP_CLIENT.md # MCP Client implementation guide
āāā monkey-mcp-server/ # Quarkus MCP server project
ā āāā src/main/java/ # Java source code
ā āāā pom.xml # Maven dependencies
āāā monkey-mcp-client/ # LangChain4j MCP client project
āāā src/main/java/ # Java source code
āāā pom.xml # Maven dependencies
š¤ Contributing
This is an educational project designed to teach MCP implementation in Java. Contributions, suggestions, and improvements are welcome!
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Useful Links
Start your MCP journey: