Learn exactly how MCP works under the hood by building a server step-by-step with no abstraction libraries.
Create a working MCP server that Claude Desktop can connect to, following the 12-module progression.
Understand JSON-RPC message structure and stdio transport to debug or extend existing MCP integrations.
Modules 11-12 require downloading roughly 1.5 GB of local model files via node-llama-cpp.
This is a step-by-step learning repository for understanding the Model Context Protocol, often called MCP. MCP is a communication standard that lets AI tools like Claude talk to external programs, databases, or other services. The project teaches that standard from first principles, in plain Node.js with no extra libraries or abstraction layers, so you can see exactly what is happening at each step. The course is organized into 12 numbered modules, each focused on one narrow question. Module one explains what MCP is and why it exists. Module two covers JSON-RPC, the message format the protocol uses. From there each module adds one layer: how messages travel over standard input and output, how a server and client establish a connection, how tools get registered and called, how errors are reported, how resources are exposed, how prompts work, and finally how an MCP server fits into a broader agent workflow. By the time you finish module 12, you have a working server you can connect to Claude Desktop. The directory structure follows a consistent pattern across modules. Each folder contains a README that opens with the question being answered, a src folder with commented source code, and a run file that shows the exact commands to type and what you should see. Modules one and six have slightly different layouts, but the README for each module explains what is different and why. One firm rule applies to the first ten modules: no npm packages. Every server in those modules runs with a single node command and zero dependencies. This is intentional. The goal is to make every line of the protocol visible. Modules eleven and twelve break that rule only for local language model support, which requires a library called node-llama-cpp and downloads roughly 1.5 gigabytes of model files on first use. You need Node.js version 20 or later and the ability to read basic JavaScript. Prior knowledge of networking, protocols, or AI systems is not required. The only entry point is cloning the repository and opening the README in module one.
← pguso on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.