Complete for freeAdvanced

Course 24

Agentic Coding, MCP, and Tool-Using AI

You work the way a careful engineer works with an AI coding assistant, using Python 3, Git, VS Code, and an assistant of your choice: GitHub Copilot Free, or a local model served by Ollama, with paid assistants optional. Early modules set up a practice repository where every agent task starts on its own branch, then teach the agent loop itself (model, tool call, result, model) by building a small harness around a scripted fake model, so every example runs offline with no API key. From there you write task specs with acceptance criteria an agent can't misread, map unfamiliar repositories and check the AI's claims with git ls-files, git grep, and the tests, run plans through a checker that catches invented files and out-of-scope edits, and review diffs for weakened tests and plausible-but-wrong fixes, using unittest, Ruff, and mypy for evidence. Later modules design narrow tools validated with JSON Schema (the jsonschema package), serve them over the Model Context Protocol with the MCP Python SDK, put a permission gate and human approval step in front of every sensitive action, and defend against prompt injection hidden in repository files and tool output. Each core module has a Notes lesson, a Build-along that produces working Python, and a Practice set with full solutions. The course ends with a capstone: a sandboxed coding agent that plans, makes scoped edits, runs checks, respects permissions, asks before sensitive actions, and produces an auditable report.

Free completion promise: Every lesson can be completed for $0. Python, Git, VS Code, Ollama, jsonschema, Ruff, mypy, and the MCP Python SDK are free, and GitHub Copilot Free costs nothing for individual accounts. Every runnable example uses a scripted fake model, so no API key or paid plan is ever required.

What's inside

  • 24hand-written lessons
  • 18videos
  • 5step-through animations
  • 24diagrams, charts & live previews
  • 57quiz questions
  • 146code examples

Before you begin

Requirements & setup for Agentic Coding, MCP, and Tool-Using AI

Start with the complete free pathway below. Hardware, subscriptions, paid APIs, and cloud credits are never required.

Start here ยท free path

Your complete $0 setup

Every lesson can be completed for $0. Python, Git, VS Code, Ollama, jsonschema, Ruff, mypy, and the MCP Python SDK are free, and GitHub Copilot Free costs nothing for individual accounts. Every runnable example uses a scripted fake model, so no API key or paid plan is ever required.

$0 required

Setup checklist

0 of 10 complete

This checklist is a temporary setup aid and resets when the page reloads. Saved course progress begins in the setup lessons below.

  1. Everything required for this course is free. Paid software, APIs, cloud credits, GPUs, and physical equipment are optional.

    About 2 min
  2. Install Python 3.10 or newer from python.org (on Windows, the Python install manager).

  3. Install Git from git-scm.com and set user.name, user.email, and init.defaultBranch main.

    About 5 min
  4. Install VS Code and Microsoft's Python extension.

    About 5 min
  5. Create an agent-course folder with a virtual environment (python -m venv .venv) and install jsonschema into it.

    About 5 min
  6. Connect an assistant: sign in to GitHub Copilot Free from the Copilot icon in VS Code's Status Bar, or install Ollama and run ollama pull qwen3:1.7b.

    About 5 min
  7. Every lesson works in Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama), so Ollama with a small local model is never required.

  8. If you have Ollama with a small local model, use it where a lesson mentions it and compare your result with the lesson's.

    About 5 min
  9. If it doesn't match, finish that step in Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama) and keep going.

    About 5 min
  10. Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama): Inside the activated virtual environment, check_setup.py prints your Python and Git versions and confirms jsonschema is installed, and your assistant answers a question in the VS Code Chat view. Ollama with a small local model: Inside the activated virtual environment, check_setup.py prints your Python and Git versions and confirms jsonschema is installed, and your assistant answers a question in the VS Code Chat view.

    About 5 min

Software

1 item

Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama)

Python runs every example and test, Git records each agent change on its own branch so it can be reviewed and undone, and VS Code is where you talk to the assistant and read its diffs. For the assistant, sign in to GitHub Copilot Free from VS Code, or install Ollama and a small local model such as qwen3:1.7b so nothing leaves your computer. The course stays provider-neutral: every concept runs offline against a scripted fake model, and the habits carry over to any assistant.

Course need
Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama)
Free

Python runs every example and test, Git records each agent change on its own branch so it can be reviewed and undone, and VS Code is where you talk to the assistant and read its diffs. For the assistant, sign in to GitHub Copilot Free from VS Code, or install Ollama and a small local model such as qwen3:1.7b so nothing leaves your computer. The course stays provider-neutral: every concept runs offline against a scripted fake model, and the habits carry over to any assistant. Every lesson is readable text with copyable code, keyboard-friendly quizzes and step-throughs, and videos with YouTube captions.

  1. Install Python 3.10 or newer from python.org (on Windows, the Python install manager).
  2. Install Git from git-scm.com and set user.name, user.email, and init.defaultBranch main.
  3. Install VS Code and Microsoft's Python extension.
  4. Create an agent-course folder with a virtual environment (python -m venv .venv) and install jsonschema into it.
  5. Connect an assistant: sign in to GitHub Copilot Free from the Copilot icon in VS Code's Status Bar, or install Ollama and run ollama pull qwen3:1.7b.

Hardware

1 item

Ollama with a small local model

Optional; runs a model such as qwen3:1.7b on your own computer, so no account is needed and prompts never leave your machine. Smaller models make more mistakes on agent tasks.

Optional
Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama)
Free

Optional. Every lesson can be completed with Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama); Ollama with a small local model is an extra for learners who have it. Optional equipment: every assessed outcome can be completed without it.

  1. Every lesson works in Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama), so Ollama with a small local model is never required.
  2. If you have Ollama with a small local model, use it where a lesson mentions it and compare your result with the lesson's.
  3. If it doesn't match, finish that step in Python 3, Git, and VS Code with an AI assistant (GitHub Copilot Free or a local model through Ollama) and keep going.

Accounts

Nothing required

No external account is needed for this course.

What you will be able to do

Learning outcomes

  • Choose between autocomplete, chat, and an agent for a task, and write a task spec with scope, checkable acceptance criteria, and a stop-and-ask rule.
  • Explain and build the agent loop, including step limits, error results, write-scope enforcement, and an independent finish-line check.
  • Verify an AI's claims about a repository with search and tests, and reject plans that are ungrounded, out of scope, unordered, or unverified.
  • Review diffs for edited expectations, skipped tests, and silenced failures, and demand reproducible evidence: command, output, and exit code.
  • Design narrow tools with validated arguments and connect them to agents through MCP clients and servers.
  • Enforce least-privilege permissions, human approval for sensitive actions, and defenses against prompt injection and untrusted tool output.

Build real work

Assignments & capstone

Free tools accepted

Validated tools served over MCP

Write JSON Schema definitions for three repository tools, validate every call before it runs, cap the agent loop, then serve the same tools from an MCP server and connect it to a host such as VS Code.

Every lesson can be completed for $0. Python, Git, VS Code, Ollama, jsonschema, Ruff, mypy, and the MCP Python SDK are free, and GitHub Copilot Free costs nothing for individual accounts. Every runnable example uses a scripted fake model, so no API key or paid plan is ever required. Submit your project file, or screenshots with descriptions, or a short demo.

Plan and patch review

Give an AI agent a bug to fix, then check its plan against the real repo, write tests from the spec rather than from its patch, and approve or reject the change with the failing and passing test output.

Every lesson can be completed for $0. Python, Git, VS Code, Ollama, jsonschema, Ruff, mypy, and the MCP Python SDK are free, and GitHub Copilot Free costs nothing for individual accounts. Every runnable example uses a scripted fake model, so no API key or paid plan is ever required. Submit your project file, or screenshots with descriptions, or a short demo.

Final assessment

Safe sandboxed coding agent

Build an offline coding agent that fixes a failing test inside a sandboxed repository, with validated tools, a path sandbox, read/write/external permission tiers, human approval bound to the exact call, and a red-team suite that blocks prompt injection and secret exfiltration. Deliverables: Agent repo with schemas, sandbox, and approval gate, Threat model and task profile, Red-team and normal-work test suite, all passing, Audit log and harness-written report, and Four-minute demo showing a blocked attack.

Prerequisites & pacing

Skills assumed

  • Comfortable writing Python functions, classes, and unittest tests
  • Everyday Git on the command line: commit, branch, diff, and merge
  • Basic familiarity with the terminal and with how web APIs and JSON work

Recommended prior courses

These are advisory, not locks. If you already have the skills listed above, enroll directly.

Choose your pace

  • self paced: 10 weeks at 5 hours per week
  • weekly: 10 weeks at 5 hours per week

Part of this learning path

Course created by Zafir Shamsi.