azamzam.ai

Understanding MCP — a free developer's guide to the Model Context Protocol

17th May 2026

I wrote a short ebook on the Model Context Protocol — the Anthropic standard that lets LLMs call your tools over HTTP. It builds a working server from scratch in Java on Tomcat, with no framework dependencies beyond Jackson. Free to download below.

Cover of the ebook ‘Understanding MCP — Model Context Protocol, from concepts to implementation’ by Ahmad Zam Zam Jusoh

Download the PDF (28 pages)

Why I wrote it

MCP is one of those specifications that looks deceptively simple on the surface — a few JSON messages over HTTP — but rewards careful study. Once you understand what is really happening at each step, a whole class of AI integration problems suddenly has a clean, standard solution. Most of the material I found online either skimmed the surface ("MCP is USB-C for AI") or assumed a TypeScript SDK and a Node runtime. I wanted a guide that built the thing from raw bytes upward, in a JVM stack, so a Java developer could read it and immediately wire MCP into the systems they already maintain.

The other reason: writing it forced me to answer the questions I had been hand-waving past. Why is there no output schema? What does the host actually do with the tool result before the model sees it? How does the LLM decide to call a tool in the first place? The ebook is the answer to my own questions, written down so the next person does not have to chase them.

What is inside

The guide moves from concepts to protocol to code to production concerns, in that order. Each part builds on the one before it.

The teaching example: PingME

Every concept in the guide is demonstrated against a deliberately tiny use case: a single tool called PingME that takes no arguments and returns the magic word BISMILLAH. That is the entire business logic. The point is not the tool — the point is the protocol around it. Real production tools add parameters, database calls, authentication, and error handling on top of exactly the same skeleton, and the guide is honest about which parts of that skeleton change and which stay identical.

Who it is for

If you are a Java developer who has heard MCP mentioned in meetings and wants to understand the wire-level reality without committing to a framework, this is for you. The implementation uses Java 17 with the Jakarta Servlet API and assumes basic HTTP knowledge (you know what a POST is, you know what JSON looks like). You do not need prior MCP knowledge — the guide builds the protocol from scratch — and you do not need to know how language models are trained. A working mental model of "the model reads text and produces text" is enough.

Download Understanding MCP (PDF)