Welcome to the MCP Server Workshop! In this hands-on, instructor-led workshop, you'll build a fully functional Model Context Protocol (MCP) server from scratch using Java. By the end, you'll have a working MCP server that integrates with AI coding assistants like Claude Code, Cursor, and Windsurf.
This is an instructor-led workshop. It is NOT intended for self-paced learning.
The Model Context Protocol (MCP) is an open standard that enables AI assistants to connect with external tools, data sources, and services. Think of it as a universal adapter that lets LLMs interact with the world beyond their training data.
┌─────────────────┐ MCP Protocol ┌─────────────────┐
│ AI Assistant │◄───────────────────►│ Your Server │
│ (Claude, etc.) │ JSON-RPC over │ (Java) │
└─────────────────┘ STDIO └─────────────────┘
│
▼
┌─────────────────┐
│ Your Tools & │
│ Resources │
└─────────────────┘
A Java-based MCP server with:
- Transport Layer: Bidirectional STDIO communication
- Protocol Handling: JSON-RPC message routing
- Tools: Custom
key_word_searchtool for code analysis - Resources: Expose files and data to AI assistants
- Prompts: Reusable prompt templates
- Live Integration: Connection to real AI coding assistants
For the complete course outline, chapter descriptions, and learning objectives, see:
| Chapter | Topic | What You'll Build |
|---|---|---|
| 1 | Transport Layer | Bidirectional I/O infrastructure |
| 2 | Protocol Review | Understanding JSON-RPC and MCP |
| 3 | Handshake & Routing | Protocol initialization and ping handling |
| 4 | Capabilities | Resources, Tools, Prompts, and Elicitation |
| 5 | Live Integration | Connect to Claude Code, Cursor, or Windsurf |
- Java fundamentals (classes, interfaces, records)
- Familiarity with JSON
- Basic command-line experience
- JDK 21 or higher
- Gradle (wrapper included)
- Node.js (for MCP Inspector)
- Git
- An MCP-compatible AI assistant (Claude Code, Cursor, Windsurf, etc.)
Before attending class, complete the environment setup:
- Read and follow all instructions in 00-setup.md
- Run the verification script to confirm your environment is ready
- Resolve any issues before the workshop begins
This ensures you can start learning immediately when class begins.
Each lesson is organized as a separate branch:
| Branch | Content |
|---|---|
trunk |
Workshop introduction and setup |
01-chapter |
Transport Layer implementation |
02-chapter |
JSON-RPC Protocol review |
03-chapter |
Handshake and message routing |
04-chapter |
Resources, Tools, Prompts, Elicitation |
05-chapter |
Live LLM integration |
complete |
Final solution with all chapters |
-
Ensure pre-workshop setup from 00-setup.md is complete
-
When instructed, checkout the first lesson branch:
git checkout 01-chapter
-
Read the intro and overview files in the
lesson/directory before starting exercises -
Follow along with the instructor
Each chapter follows this pattern:
- Read the Overview - Understand concepts and architecture
- Follow Instructions - Step-by-step implementation guide
- Build & Test - Verify your implementation with MCP Inspector
- Discuss - Q&A with the instructor
By completing this workshop, you'll have:
- A production-ready MCP server written in Java
- Deep understanding of the Model Context Protocol specification
- Experience testing MCP servers with the Inspector
- A custom tool that works with any MCP-compatible AI assistant
- Knowledge to build your own MCP servers for any use case
We value your feedback to improve these workshop lessons:
- Issues: Report problems via GitHub Issues
- Discussions: Join conversations in GitHub Discussions
- Pull Requests: Suggest improvements to lesson content
- Workshop Feedback: Provide direct feedback to your instructor during sessions
- Clarity of instructions
- Difficulty level of exercises
- Missing prerequisites or setup steps
- Technical issues with code examples
- Suggestions for additional topics
Ready to begin? Start with 00-setup.md to prepare your environment!