AI Engineering from Scratch: 20 Phases Ending with Skills and MCP Servers in Your Claude Code

Most “learn AI” repos give you the same thing over and over: a stack of notebooks, a reading list, and a vague feeling that you learned something. You finish, close the tab, and a week later you couldn’t rebuild any of it. Nothing sticks.

ai-engineering-from-scratch does the exact opposite. It’s a free curriculum, MIT-licensed — hundreds of hands-on lessons across 20 phases, from linear algebra to swarms of autonomous agents. But the part that matters to us isn’t the syllabus. It’s what each lesson leaves behind: a real artifact you can drop straight into your coding agent.

The “build it, then use it” rule

Everything rests on a single discipline: build the small version by hand first, then run the same thing through the production framework.

You write a tokenizer with a for loop before importing tiktoken. You implement backprop before PyTorch shows up. You code the attention mechanism by hand before calling a transformers library. By the time the framework appears, it’s not a black box — you already wrote the small version, so you know exactly what it’s doing under the hood.

Each lesson follows the same six steps: the core idea, why it matters, the concept with diagrams, build it from scratch, use it with real frameworks, and ship it — the prompt, skill, or agent that this lesson produces.

That last step changes everything.

The output is a toolkit, not a certificate

Here’s the structure that should matter to you. Each lesson dumps something reusable into an outputs/ folder:

outputs/
├── prompts/          Prompt templates for each AI task
├── skills/           SKILL.md files for AI coding agents
├── agents/           Agent definitions ready to deploy
└── mcp-servers/      MCP servers you built during the course

These aren’t toy examples. They’re real tools you install with SkillKit and plug into Claude Code, Cursor, or any agent that reads SKILL.md. You don’t finish with “I learned about MCP”. You finish with MCP servers you wrote yourself, sitting in a folder, ready to connect to your stack.

So the curriculum also works as a factory for your own agent tooling. Every concept you learn gets delivered as something your Claude Code can use the next day.

The phases that hit closest to home

The 20 phases go all the way down — math foundations, classical ML, deep learning, computer vision, NLP, speech, transformers, generative AI, RL, LLMs from scratch. All built by hand before the frameworks.

But if you live in Claude Code and Cursor, there are some phases that are going to feel like they were written for you:

  • Tools & Protocols — function calling, tool-use patterns, and building MCP servers and clients from scratch. If MCP was a black box until now, it stops being one here.
  • Agent Engineering — the agent loop itself, tool dispatch, planning with DAGs, memory (short-term, long-term, episodic), subagents, skills loading, and hooks (PreToolUse, PostToolUse). Basically every internals question you wondered about while using a coding agent.
  • Autonomous Systems — autonomous loops, self-healing agents, cost-aware execution, security boundaries, all capped off with building an autonomous coding agent.
  • Multi-Agent & Swarms — agent teams, coordination protocols, shared state, and orchestration. The most forward-looking stuff.

The code lands in Python, TypeScript, Rust, and Julia depending on what fits the concept best — so the agent and tooling phases lean toward TS and Rust, which is exactly where that work actually happens.

Where it fits — and where it doesn’t

Let’s be clear about what this is. It’s not a plugin that does the work for you. It’s not a CLI you install and forget. It’s a curriculum — you actually have to sit down and build.

What makes it worth your time even if you’ve already passed the “learn AI” stage is the artifacts pipeline. The skills, the MCP servers, the agent definitions — those are genuinely useful no matter how much theory you already know. You can cherry-pick: jump straight to the agent engineering or tools phases, build the MCP servers, and walk away with tooling for your stack without touching linear algebra.

Getting started is a single clone:

git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch

From there you can run the code from any lesson directly, or install the outputs into your agent with SkillKit.

It’s free, it’s MIT, and the worst case is you walk away with a folder of skills and MCP servers you built yourself. That’s a pretty good worst case.


Would you start with the math or jump straight to the agent phase to build your MCP servers? Let us know where you’d start.